Skip to content

Commit

Permalink
bnx2x: Load/Unload under traffic
Browse files Browse the repository at this point in the history
Load/Unload under traffic
Few issues were found when loading and unloading under traffic:
- When receiving Tx interrupt call netif_wake_queue if the queue is
  stopped but the state is open
- Check that interrupts are enabled before doing anything else on the
  msix_fp_int function
- In nic_load, enable the interrupts only when needed and ready for it
- Function stop_leading returns status since it can fail
- Add 1ms delay when unloading the driver to validate that there are no
  open transactions that already started by the FW
- Splitting the "has work" function into Tx and Rx so the same function
  will be used on unload and interrupts
- Do not request for WoL if only resetting the device (save the time
  that it takes the FW to set the link after reset)
- Fixing the device reset after iSCSI boot and before driver load - all
  internal buffers must be cleared before the driver is loaded

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vladislav Zolotarov authored and David S. Miller committed Aug 13, 2008
1 parent 471de71 commit da5a662
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 98 deletions.
9 changes: 9 additions & 0 deletions drivers/net/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,15 @@ struct bnx2x_fastpath {

#define bnx2x_fp(bp, nr, var) (bp->fp[nr].var)

#define BNX2X_HAS_TX_WORK(fp) \
((fp->tx_pkt_prod != le16_to_cpu(*fp->tx_cons_sb)) || \
(fp->tx_pkt_prod != fp->tx_pkt_cons))

#define BNX2X_HAS_RX_WORK(fp) \
(fp->rx_comp_cons != le16_to_cpu(*fp->rx_cons_sb))

#define BNX2X_HAS_WORK(fp) (BNX2X_HAS_RX_WORK(fp) || BNX2X_HAS_TX_WORK(fp))


/* MC hsi */
#define MAX_FETCH_BD 13 /* HW max BDs per packet */
Expand Down
Loading

0 comments on commit da5a662

Please sign in to comment.