From da5a662a2326931bef25f0e534c9c1702f862399 Mon Sep 17 00:00:00 2001 From: Vladislav Zolotarov Date: Wed, 13 Aug 2008 15:50:00 -0700 Subject: bnx2x: Load/Unload under traffic 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 Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller --- drivers/net/bnx2x.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/net/bnx2x.h') diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h index 9cbf0e82ef38..b9aa6f48ae2e 100644 --- a/drivers/net/bnx2x.h +++ b/drivers/net/bnx2x.h @@ -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 */ -- cgit v1.2.3-59-g8ed1b