diff options
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 1a2780374a49..33d69ddc90a3 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -3043,7 +3043,6 @@ bnx2_msi(int irq, void *dev_instance) | |||
3043 | { | 3043 | { |
3044 | struct bnx2_napi *bnapi = dev_instance; | 3044 | struct bnx2_napi *bnapi = dev_instance; |
3045 | struct bnx2 *bp = bnapi->bp; | 3045 | struct bnx2 *bp = bnapi->bp; |
3046 | struct net_device *dev = bp->dev; | ||
3047 | 3046 | ||
3048 | prefetch(bnapi->status_blk.msi); | 3047 | prefetch(bnapi->status_blk.msi); |
3049 | REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, | 3048 | REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, |
@@ -3054,7 +3053,7 @@ bnx2_msi(int irq, void *dev_instance) | |||
3054 | if (unlikely(atomic_read(&bp->intr_sem) != 0)) | 3053 | if (unlikely(atomic_read(&bp->intr_sem) != 0)) |
3055 | return IRQ_HANDLED; | 3054 | return IRQ_HANDLED; |
3056 | 3055 | ||
3057 | netif_rx_schedule(dev, &bnapi->napi); | 3056 | netif_rx_schedule(&bnapi->napi); |
3058 | 3057 | ||
3059 | return IRQ_HANDLED; | 3058 | return IRQ_HANDLED; |
3060 | } | 3059 | } |
@@ -3064,7 +3063,6 @@ bnx2_msi_1shot(int irq, void *dev_instance) | |||
3064 | { | 3063 | { |
3065 | struct bnx2_napi *bnapi = dev_instance; | 3064 | struct bnx2_napi *bnapi = dev_instance; |
3066 | struct bnx2 *bp = bnapi->bp; | 3065 | struct bnx2 *bp = bnapi->bp; |
3067 | struct net_device *dev = bp->dev; | ||
3068 | 3066 | ||
3069 | prefetch(bnapi->status_blk.msi); | 3067 | prefetch(bnapi->status_blk.msi); |
3070 | 3068 | ||
@@ -3072,7 +3070,7 @@ bnx2_msi_1shot(int irq, void *dev_instance) | |||
3072 | if (unlikely(atomic_read(&bp->intr_sem) != 0)) | 3070 | if (unlikely(atomic_read(&bp->intr_sem) != 0)) |
3073 | return IRQ_HANDLED; | 3071 | return IRQ_HANDLED; |
3074 | 3072 | ||
3075 | netif_rx_schedule(dev, &bnapi->napi); | 3073 | netif_rx_schedule(&bnapi->napi); |
3076 | 3074 | ||
3077 | return IRQ_HANDLED; | 3075 | return IRQ_HANDLED; |
3078 | } | 3076 | } |
@@ -3082,7 +3080,6 @@ bnx2_interrupt(int irq, void *dev_instance) | |||
3082 | { | 3080 | { |
3083 | struct bnx2_napi *bnapi = dev_instance; | 3081 | struct bnx2_napi *bnapi = dev_instance; |
3084 | struct bnx2 *bp = bnapi->bp; | 3082 | struct bnx2 *bp = bnapi->bp; |
3085 | struct net_device *dev = bp->dev; | ||
3086 | struct status_block *sblk = bnapi->status_blk.msi; | 3083 | struct status_block *sblk = bnapi->status_blk.msi; |
3087 | 3084 | ||
3088 | /* When using INTx, it is possible for the interrupt to arrive | 3085 | /* When using INTx, it is possible for the interrupt to arrive |
@@ -3109,9 +3106,9 @@ bnx2_interrupt(int irq, void *dev_instance) | |||
3109 | if (unlikely(atomic_read(&bp->intr_sem) != 0)) | 3106 | if (unlikely(atomic_read(&bp->intr_sem) != 0)) |
3110 | return IRQ_HANDLED; | 3107 | return IRQ_HANDLED; |
3111 | 3108 | ||
3112 | if (netif_rx_schedule_prep(dev, &bnapi->napi)) { | 3109 | if (netif_rx_schedule_prep(&bnapi->napi)) { |
3113 | bnapi->last_status_idx = sblk->status_idx; | 3110 | bnapi->last_status_idx = sblk->status_idx; |
3114 | __netif_rx_schedule(dev, &bnapi->napi); | 3111 | __netif_rx_schedule(&bnapi->napi); |
3115 | } | 3112 | } |
3116 | 3113 | ||
3117 | return IRQ_HANDLED; | 3114 | return IRQ_HANDLED; |
@@ -3221,7 +3218,7 @@ static int bnx2_poll_msix(struct napi_struct *napi, int budget) | |||
3221 | rmb(); | 3218 | rmb(); |
3222 | if (likely(!bnx2_has_fast_work(bnapi))) { | 3219 | if (likely(!bnx2_has_fast_work(bnapi))) { |
3223 | 3220 | ||
3224 | netif_rx_complete(bp->dev, napi); | 3221 | netif_rx_complete(napi); |
3225 | REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bnapi->int_num | | 3222 | REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bnapi->int_num | |
3226 | BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | | 3223 | BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | |
3227 | bnapi->last_status_idx); | 3224 | bnapi->last_status_idx); |
@@ -3254,7 +3251,7 @@ static int bnx2_poll(struct napi_struct *napi, int budget) | |||
3254 | 3251 | ||
3255 | rmb(); | 3252 | rmb(); |
3256 | if (likely(!bnx2_has_work(bnapi))) { | 3253 | if (likely(!bnx2_has_work(bnapi))) { |
3257 | netif_rx_complete(bp->dev, napi); | 3254 | netif_rx_complete(napi); |
3258 | if (likely(bp->flags & BNX2_FLAG_USING_MSI_OR_MSIX)) { | 3255 | if (likely(bp->flags & BNX2_FLAG_USING_MSI_OR_MSIX)) { |
3259 | REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, | 3256 | REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD, |
3260 | BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | | 3257 | BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | |