qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH qemu 1/2] hw/at24c : modify at24c to support 1 byte address m


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH qemu 1/2] hw/at24c : modify at24c to support 1 byte address mode
Date: Thu, 16 Feb 2023 09:25:02 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2

On 10/2/23 07:20, ~ssinprem wrote:
From: Sittisak Sinprem <ssinprem@celestca.com>

---
  hw/nvram/eeprom_at24c.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/nvram/eeprom_at24c.c b/hw/nvram/eeprom_at24c.c
index 2d4d8b952f..693212b661 100644
--- a/hw/nvram/eeprom_at24c.c
+++ b/hw/nvram/eeprom_at24c.c
@@ -87,7 +87,7 @@ uint8_t at24c_eeprom_recv(I2CSlave *s)
      EEPROMState *ee = AT24C_EE(s);
      uint8_t ret;
- if (ee->haveaddr == 1) {
+    if (ee->rsize > 256 && ee->haveaddr == 1) {
          return 0xff;
      }

What represents this '256' magic value? Please add a definition.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]