aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorMike McCormack <mikem@ring3k.org>2009-09-21 00:08:52 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-22 17:00:11 -0400
commit74a61ebf653c6abe459f228eb40e9f24f7ef1fb7 (patch)
tree8fa91d0ae6a6fe3130ab5bdb6b68115d205138df /drivers/net/sky2.c
parent55865c66d24b8f1a885a1a03836d219286d41818 (diff)
sky2: Set SKY2_HW_RAM_BUFFER in sky2_init
The SKY2_HW_RAM_BUFFER bit in hw->flags was checked in sky2_mac_init(), before being set later in sky2_up(). Setting SKY2_HW_RAM_BUFFER in sky2_init() where other hw->flags are set should avoid this problem recurring. Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 4bb52e9cd371..68d256b9638c 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1497,7 +1497,6 @@ static int sky2_up(struct net_device *dev)
1497 if (ramsize > 0) { 1497 if (ramsize > 0) {
1498 u32 rxspace; 1498 u32 rxspace;
1499 1499
1500 hw->flags |= SKY2_HW_RAM_BUFFER;
1501 pr_debug(PFX "%s: ram buffer %dK\n", dev->name, ramsize); 1500 pr_debug(PFX "%s: ram buffer %dK\n", dev->name, ramsize);
1502 if (ramsize < 16) 1501 if (ramsize < 16)
1503 rxspace = ramsize / 2; 1502 rxspace = ramsize / 2;
@@ -2926,6 +2925,9 @@ static int __devinit sky2_init(struct sky2_hw *hw)
2926 ++hw->ports; 2925 ++hw->ports;
2927 } 2926 }
2928 2927
2928 if (sky2_read8(hw, B2_E_0))
2929 hw->flags |= SKY2_HW_RAM_BUFFER;
2930
2929 return 0; 2931 return 0;
2930} 2932}
2931 2933