Skip to content

Commit

Permalink
[PATCH] 8139cp: fix eeprom read command length
Browse files Browse the repository at this point in the history
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: Philip Craig <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
Philip Craig authored and Jeff Garzik committed Jun 23, 2006
1 parent fc13dca commit d73f1e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ static int read_eeprom (void __iomem *ioaddr, int location, int addr_len)
eeprom_delay ();

/* 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;
writeb (EE_ENB | dataval, ee_addr);
eeprom_delay ();
Expand Down

0 comments on commit d73f1e3

Please sign in to comment.