hw/nvram: at24 return 0xff if 1 byte address
commit1cbab82e9d1bdb2c7b9ef46a396fdc03ea3fa04c
authorPatrick Venture <venture@google.com>
Mon, 20 Dec 2021 21:21:37 +0000 (20 13:21 -0800)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 14 Mar 2022 13:48:35 +0000 (14 14:48 +0100)
tree6158086c0e3a76b58993f03fb390f35e3d0236bc
parent15df33ceb73cb6bb3c6736cf4d2cff51129ed4b4
hw/nvram: at24 return 0xff if 1 byte address

The at24 eeproms are 2 byte devices that return 0xff when they are read
from with a partial (1-byte) address written.  This distinction was
found comparing model behavior to real hardware testing.

Tested: `i2ctransfer -f -y 45 w1@85 0 r1` returns 0xff instead of next
byte

Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211220212137.1244511-1-venture@google.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/nvram/eeprom_at24c.c