ar71xx: ag71xx: fix get_port_link callback
[openwrt.git] / target / linux / x86 / patches-3.2 / 901-8139cp_eeprom_delay.patch
1 From 7d03f5a48e4d90854275b06433626243b3b3db17 Mon Sep 17 00:00:00 2001
2 From: Jason Wang <jasowang@redhat.com>
3 Date: Fri, 30 Dec 2011 23:44:33 +0000
4 Subject: [PATCH] 8139cp/8139too: do not read into reserved registers
5
6 delay_eeprom() use long read for Cfg9346 register(offset 0x50) which may read
7 into the area of reserved register(offset 0x53). Use byte read instead.
8
9 Signed-off-by: Jason Wang <jasowang@redhat.com>
10 Signed-off-by: David S. Miller <davem@davemloft.net>
11 ---
12 drivers/net/ethernet/realtek/8139cp.c | 2 +-
13 drivers/net/ethernet/realtek/8139too.c | 2 +-
14 2 files changed, 2 insertions(+), 2 deletions(-)
15
16 --- a/drivers/net/ethernet/realtek/8139cp.c
17 +++ b/drivers/net/ethernet/realtek/8139cp.c
18 @@ -1590,7 +1590,7 @@ static int cp_set_mac_address(struct net
19 No extra delay is needed with 33Mhz PCI, but 66Mhz may change this.
20 */
21
22 -#define eeprom_delay() readl(ee_addr)
23 +#define eeprom_delay() readb(ee_addr)
24
25 /* The EEPROM commands include the alway-set leading bit. */
26 #define EE_EXTEND_CMD (4)
27 --- a/drivers/net/ethernet/realtek/8139too.c
28 +++ b/drivers/net/ethernet/realtek/8139too.c
29 @@ -1122,7 +1122,7 @@ static void __devexit rtl8139_remove_one
30 No extra delay is needed with 33Mhz PCI, but 66Mhz may change this.
31 */
32
33 -#define eeprom_delay() (void)RTL_R32(Cfg9346)
34 +#define eeprom_delay() (void)RTL_R8(Cfg9346)
35
36 /* The EEPROM commands include the alway-set leading bit. */
37 #define EE_WRITE_CMD (5)
This page took 0.040317 seconds and 5 git commands to generate.