diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-05-11 15:07:28 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@osdl.org> | 2006-05-15 12:35:01 -0700 |
commit | 843a46f423a508b3a443a08baa903c6da02f3297 (patch) | |
tree | 635b032413590677e32b968e4c301bac3d7af554 /drivers | |
parent | de54bc0f00c23a805f4ad2146c5a1fd5e2abe1e9 (diff) |
sky2: prevent dual port receiver problems
When both ports are receiving simultaneously, the receive logic gets confused
and may pass up a packet before it is full. This causes hangs, and IP will see
lots of garbage packets. There is even the potential for data corruption if
a later arriving packet DMA's into freed memory.
It looks like a hardware bug because status arrives for a packet but no
data is there. Until this bug is worked out, block the user from bringing
up both ports at once.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/sky2.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index ffd267fab21..62be6d99d05 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -1020,8 +1020,19 @@ static int sky2_up(struct net_device *dev) struct sky2_hw *hw = sky2->hw; unsigned port = sky2->port; u32 ramsize, rxspace, imask; - int err = -ENOMEM; + int err; + struct net_device *otherdev = hw->dev[sky2->port^1]; + /* Block bringing up both ports at the same time on a dual port card. + * There is an unfixed bug where receiver gets confused and picks up + * packets out of order. Until this is fixed, prevent data corruption. + */ + if (otherdev && netif_running(otherdev)) { + printk(KERN_INFO PFX "dual port support is disabled.\n"); + return -EBUSY; + } + + err = -ENOMEM; if (netif_msg_ifup(sky2)) printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); |