提交 d73f1e3c 编写于 作者: P Philip Craig 提交者: Jeff Garzik

[PATCH] 8139cp: fix eeprom read command length

The read command for the 93C46/93C56 EEPROMS should be 3 bits plus
the address.  This doesn't appear to affect the operation of the
read command, but similar errors for write commands do cause failures.
Signed-off-by: NPhilip Craig <philipc@snapgear.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 fc13dcae
...@@ -1628,7 +1628,7 @@ static int read_eeprom (void __iomem *ioaddr, int location, int addr_len) ...@@ -1628,7 +1628,7 @@ static int read_eeprom (void __iomem *ioaddr, int location, int addr_len)
eeprom_delay (); eeprom_delay ();
/* Shift the read command bits out. */ /* Shift the read command bits out. */
for (i = 4 + addr_len; i >= 0; i--) { for (i = 3 + addr_len - 1; i >= 0; i--) {
int dataval = (read_cmd & (1 << i)) ? EE_DATA_WRITE : 0; int dataval = (read_cmd & (1 << i)) ? EE_DATA_WRITE : 0;
writeb (EE_ENB | dataval, ee_addr); writeb (EE_ENB | dataval, ee_addr);
eeprom_delay (); eeprom_delay ();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册