]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[realtek] Ensure EEPROM writes reach chip before starting udelay()
authorMichael Brown <mcb30@ipxe.org>
Wed, 1 May 2013 08:15:51 +0000 (09:15 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 1 May 2013 08:21:56 +0000 (09:21 +0100)
commit9b1ec3132fed94c644c77a5e59a8ba2112110455
tree434cb2d4a7417c6f5483521855ae706e0d7e0bda
parentc6375a85be0573c12fc89d55009d2905521d78c4
[realtek] Ensure EEPROM writes reach chip before starting udelay()

On some systems, it appears to be possible for writes to the EEPROM
registers to be delayed for long enough that the EEPROM's setup and
hold times are violated, resulting in invalid data being read from the
EEPROM.

Fix by inserting a PCI read cycle immediately after writes to
RTL_9346CR, to ensure that the write has completed before starting the
udelay() used to time the SPI bus transitions.

Reported-by: Gelip <mrgelip@gmail.com>
Tested-by: Gelip <mrgelip@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/realtek.c