Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351594
b: refs/heads/master
c: ad9b435
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jan 23, 2013
1 parent cff44df commit 41b367d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 580d9d081341aad5341884f9e6b070c01512e94c
refs/heads/master: ad9b4359c7839d4d87aad2c0d50c8a2ef3bcddb3
14 changes: 6 additions & 8 deletions trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1875,14 +1875,12 @@ irqreturn_t bnx2x_interrupt(int irq, void *dev_instance)
if (status & (mask | 0x1)) {
struct cnic_ops *c_ops = NULL;

if (likely(bp->state == BNX2X_STATE_OPEN)) {
rcu_read_lock();
c_ops = rcu_dereference(bp->cnic_ops);
if (c_ops)
c_ops->cnic_handler(bp->cnic_data,
NULL);
rcu_read_unlock();
}
rcu_read_lock();
c_ops = rcu_dereference(bp->cnic_ops);
if (c_ops && (bp->cnic_eth_dev.drv_state &
CNIC_DRV_STATE_HANDLES_IRQ))
c_ops->cnic_handler(bp->cnic_data, NULL);
rcu_read_unlock();

status &= ~mask;
}
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/ethernet/broadcom/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -4816,6 +4816,8 @@ static int cnic_start_bnx2_hw(struct cnic_dev *dev)
return err;
}

ethdev->drv_state |= CNIC_DRV_STATE_HANDLES_IRQ;

return 0;
}

Expand Down Expand Up @@ -5136,6 +5138,7 @@ static int cnic_start_bnx2x_hw(struct cnic_dev *dev)
if (ret)
return ret;

ethdev->drv_state |= CNIC_DRV_STATE_HANDLES_IRQ;
return 0;
}

Expand Down Expand Up @@ -5387,6 +5390,7 @@ static void cnic_stop_hw(struct cnic_dev *dev)
}
cnic_shutdown_rings(dev);
cp->stop_cm(dev);
cp->ethdev->drv_state &= ~CNIC_DRV_STATE_HANDLES_IRQ;
clear_bit(CNIC_F_CNIC_UP, &dev->flags);
RCU_INIT_POINTER(cp->ulp_ops[CNIC_ULP_L4], NULL);
synchronize_rcu();
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/ethernet/broadcom/cnic_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ struct cnic_eth_dev {
#define CNIC_DRV_STATE_NO_ISCSI_OOO 0x00000004
#define CNIC_DRV_STATE_NO_ISCSI 0x00000008
#define CNIC_DRV_STATE_NO_FCOE 0x00000010
#define CNIC_DRV_STATE_HANDLES_IRQ 0x00000020
u32 chip_id;
u32 max_kwqe_pending;
struct pci_dev *pdev;
Expand Down

0 comments on commit 41b367d

Please sign in to comment.