]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[spi] Reset device on each access
authorMichael Brown <mcb30@ipxe.org>
Fri, 4 Mar 2011 19:17:53 +0000 (19:17 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 4 Mar 2011 19:32:56 +0000 (19:32 +0000)
commit530a01eff0351d177d95e021249ec65ec631108c
tree193aaa927a5e82b9e7e769801ea8824cae8ad7b5
parent7d5dcc92994dae75831453b8d7fff411f23d9126
[spi] Reset device on each access

When chainloading rtl8139.pxe from an old Etherboot rtl8139.zrom, iPXE
can end up misreading the first word of the MAC address from the
EEPROM as being all zeroes.  This is presumably because Etherboot has
left the serial EEPROM in an unexpected state.

Fix by using the chip select line to reset the SPI device before we
start accessing it.

Reported-by: Mandar U Jog <mandarjog@gmail.com>
Tested-by: Mandar U Jog <mandarjog@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/bitbash/spi_bit.c