Commit graph

4 commits

Author SHA1 Message Date
Michael Chan
cd339a0ed6 [BNX2]: speedup serdes linkup
This speeds up link-up time on 5706 SerDes if the link partner does
not autoneg, a rather common scenario in blade servers. Some blade
servers use IPMI for keyboard input and it's important to minimize
link disruptions.

The speedup is achieved by shortening the timer to (HZ / 3) during
the transient period right after initiating a SerDes autoneg. If
autoneg does not complete, parallel detect can be done sooner. After
the transient period is over, the timer goes back to its normal HZ
interval.

As suggested by Jeff Garzik, the timer initialization is moved to
bnx2_init_board() from bnx2_open().

An eeprom bit is also added to allow default forced SerDes speed for
even faster link-up time.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 16:10:34 -07:00
Michael Chan
afdc08b9f9 [BNX2]: Fix rtnl deadlock in bnx2_close
This fixes an rtnl deadlock problem when flush_scheduled_work() is
called from bnx2_close(). In rare cases, linkwatch_event() may be on
the workqueue from a previous close of a different device and it will
try to get the rtnl lock which is already held by dev_close().

The fix is to set a flag if we are in the reset task which is run
from the workqueue. bnx2_close() will loop until the flag is cleared.
As suggested by Jeff Garzik, the loop is changed to call msleep(1)
instead of yield() in the original patch.

flush_scheduled_work() is also moved to bnx2_remove_one() before the
netdev is freed.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 16:10:29 -07:00
Peter Hagervall
14ab9b867a [BNX2]: Possible sparse fixes, take two
This patch contains the following possible cleanups/fixes:

- use C99 struct initializers
- make a few arrays and structs static
- remove a few uses of literal 0 as NULL pointer
- use convenience function instead of cast+dereference in bnx2_ioctl()
- remove superfluous casts to u8 * in calls to readl/writel

Signed-off-by: Peter Hagervall <hager@cs.umu.se>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:56:43 -07:00
Michael Chan
b6016b7673 [BNX2]: New Broadcom gigabit network driver.
A new driver bnx2 for Broadcom bcm5706 is available.

The patch also includes new 1000BASE-X advertisement bit definitions in
mii.h

Thanks to David Miller and Jeff Garzik for reviewing and their valuable
feedback.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-05-26 13:03:09 -07:00