diff options
author | Jason Wang <jasowang@redhat.com> | 2012-05-31 14:19:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-01 14:22:11 -0400 |
commit | 0bc777bca480357941418952cf228484f5485daf (patch) | |
tree | cd9aa5fe95720d37ab0f66202963eaaab7284b02 /drivers | |
parent | b01af4579ec41f48e9b9c774e70bd6474ad210db (diff) |
8139cp/8139too: terminate the eeprom access with the right opmode
Currently, we terminate the eeprom access through clearing the CS by:
RTL_W8 (Cfg9346, ~EE_CS); or writeb (~EE_CS, ee_addr);
This would left the eeprom into "Config. Register Write Enable:"
state which is not expcted as the highest two bits were set to
0x11 ( expected is the "Normal" mode (0x00)). Solving this by write
0x0 instead of ~EE_CS when terminating the eeprom access.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/realtek/8139cp.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/realtek/8139too.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c index 7f08779acba..995d0cfc4c0 100644 --- a/drivers/net/ethernet/realtek/8139cp.c +++ b/drivers/net/ethernet/realtek/8139cp.c | |||
@@ -1636,7 +1636,7 @@ static void eeprom_cmd(void __iomem *ee_addr, int cmd, int cmd_len) | |||
1636 | 1636 | ||
1637 | static void eeprom_cmd_end(void __iomem *ee_addr) | 1637 | static void eeprom_cmd_end(void __iomem *ee_addr) |
1638 | { | 1638 | { |
1639 | writeb (~EE_CS, ee_addr); | 1639 | writeb(0, ee_addr); |
1640 | eeprom_delay (); | 1640 | eeprom_delay (); |
1641 | } | 1641 | } |
1642 | 1642 | ||
diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c index 03df076ed59..1d83565cc6a 100644 --- a/drivers/net/ethernet/realtek/8139too.c +++ b/drivers/net/ethernet/realtek/8139too.c | |||
@@ -1173,7 +1173,7 @@ static int __devinit read_eeprom (void __iomem *ioaddr, int location, int addr_l | |||
1173 | } | 1173 | } |
1174 | 1174 | ||
1175 | /* Terminate the EEPROM access. */ | 1175 | /* Terminate the EEPROM access. */ |
1176 | RTL_W8 (Cfg9346, ~EE_CS); | 1176 | RTL_W8(Cfg9346, 0); |
1177 | eeprom_delay (); | 1177 | eeprom_delay (); |
1178 | 1178 | ||
1179 | return retval; | 1179 | return retval; |