summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike McCormack <mikem@ring3k.org>2009-09-21 04:08:52 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 15:52:20 -0700
commit698051b7655e0289f7a49b4a7e363cb6cec10735 (patch)
tree97d0505b5c2b651c4a868945514639846c0efba6
parente965c3dcb699d946bf7faac5a6b0e3149ec66780 (diff)
sky2: Set SKY2_HW_RAM_BUFFER in sky2_init
commit 74a61ebf653c6abe459f228eb40e9f24f7ef1fb7 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-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 42963a9a5bdf..aa9ff46aead6 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1438,7 +1438,6 @@ static int sky2_up(struct net_device *dev)
if (ramsize > 0) {
u32 rxspace;
- hw->flags |= SKY2_HW_RAM_BUFFER;
pr_debug(PFX "%s: ram buffer %dK\n", dev->name, ramsize);
if (ramsize < 16)
rxspace = ramsize / 2;
@@ -2846,6 +2845,9 @@ static int __devinit sky2_init(struct sky2_hw *hw)
++hw->ports;
}
+ if (sky2_read8(hw, B2_E_0))
+ hw->flags |= SKY2_HW_RAM_BUFFER;
+
return 0;
}