Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255529
b: refs/heads/master
c: 4b7ed89
h: refs/heads/master
i:
  255527: d61252d
v: v3
  • Loading branch information
Dmitry Kravkov authored and David S. Miller committed Jun 15, 2011
1 parent 30dc23e commit 26344da
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 57 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: 8eef2af1824da37b428ad34e7ff3490b327b39c1
refs/heads/master: 4b7ed8978dc79de45e9fbc202f4328388311f81f
2 changes: 0 additions & 2 deletions trunk/drivers/net/bnx2x/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -925,8 +925,6 @@ struct bnx2x {
struct iro *iro_arr;
#define IRO (bp->iro_arr)

atomic_t intr_sem;

bnx2x_recovery_state_t recovery_state;
int is_leader;
struct msix_entry *msix_table;
Expand Down
23 changes: 5 additions & 18 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,12 +739,6 @@ static irqreturn_t bnx2x_msix_fp_int(int irq, void *fp_cookie)
struct bnx2x_fastpath *fp = fp_cookie;
struct bnx2x *bp = fp->bp;

/* Return here if interrupt is disabled */
if (unlikely(atomic_read(&bp->intr_sem) != 0)) {
DP(NETIF_MSG_INTR, "called but intr_sem not 0, returning\n");
return IRQ_HANDLED;
}

DP(BNX2X_MSG_FP, "got an MSI-X interrupt on IDX:SB "
"[fp %d fw_sd %d igusb %d]\n",
fp->index, fp->fw_sb_id, fp->igu_sb_id);
Expand Down Expand Up @@ -1289,18 +1283,11 @@ static void bnx2x_napi_disable(struct bnx2x *bp)

void bnx2x_netif_start(struct bnx2x *bp)
{
int intr_sem;

intr_sem = atomic_dec_and_test(&bp->intr_sem);
smp_wmb(); /* Ensure that bp->intr_sem update is SMP-safe */

if (intr_sem) {
if (netif_running(bp->dev)) {
bnx2x_napi_enable(bp);
bnx2x_int_enable(bp);
if (bp->state == BNX2X_STATE_OPEN)
netif_tx_wake_all_queues(bp->dev);
}
if (netif_running(bp->dev)) {
bnx2x_napi_enable(bp);
bnx2x_int_enable(bp);
if (bp->state == BNX2X_STATE_OPEN)
netif_tx_wake_all_queues(bp->dev);
}
}

Expand Down
36 changes: 0 additions & 36 deletions trunk/drivers/net/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,10 +1285,6 @@ void bnx2x_int_disable_sync(struct bnx2x *bp, int disable_hw)
int msix = (bp->flags & USING_MSIX_FLAG) ? 1 : 0;
int i, offset;

/* disable interrupt handling */
atomic_inc(&bp->intr_sem);
smp_wmb(); /* Ensure that bp->intr_sem update is SMP-safe */

if (disable_hw)
/* prevent the HW from sending interrupts */
bnx2x_int_disable(bp);
Expand Down Expand Up @@ -1411,12 +1407,6 @@ irqreturn_t bnx2x_interrupt(int irq, void *dev_instance)
}
DP(NETIF_MSG_INTR, "got an interrupt status 0x%x\n", status);

/* Return here if interrupt is disabled */
if (unlikely(atomic_read(&bp->intr_sem) != 0)) {
DP(NETIF_MSG_INTR, "called but intr_sem not 0, returning\n");
return IRQ_HANDLED;
}

#ifdef BNX2X_STOP_ON_ERROR
if (unlikely(bp->panic))
return IRQ_HANDLED;
Expand Down Expand Up @@ -3771,12 +3761,6 @@ static void bnx2x_sp_task(struct work_struct *work)
struct bnx2x *bp = container_of(work, struct bnx2x, sp_task.work);
u16 status;

/* Return here if interrupt is disabled */
if (unlikely(atomic_read(&bp->intr_sem) != 0)) {
DP(NETIF_MSG_INTR, "called but intr_sem not 0, returning\n");
return;
}

status = bnx2x_update_dsb_idx(bp);
/* if (status == 0) */
/* BNX2X_ERR("spurious slowpath interrupt!\n"); */
Expand Down Expand Up @@ -3820,12 +3804,6 @@ irqreturn_t bnx2x_msix_sp_int(int irq, void *dev_instance)
struct net_device *dev = dev_instance;
struct bnx2x *bp = netdev_priv(dev);

/* Return here if interrupt is disabled */
if (unlikely(atomic_read(&bp->intr_sem) != 0)) {
DP(NETIF_MSG_INTR, "called but intr_sem not 0, returning\n");
return IRQ_HANDLED;
}

bnx2x_ack_sb(bp, bp->igu_dsb_id, USTORM_ID, 0,
IGU_INT_DISABLE, 0);

Expand Down Expand Up @@ -3859,9 +3837,6 @@ static void bnx2x_timer(unsigned long data)
if (!netif_running(bp->dev))
return;

if (atomic_read(&bp->intr_sem) != 0)
goto timer_restart;

if (poll) {
struct bnx2x_fastpath *fp = &bp->fp[0];

Expand Down Expand Up @@ -3896,7 +3871,6 @@ static void bnx2x_timer(unsigned long data)
if (bp->state == BNX2X_STATE_OPEN)
bnx2x_stats_handle(bp, STATS_EVENT_UPDATE);

timer_restart:
mod_timer(&bp->timer, jiffies + bp->current_interval);
}

Expand Down Expand Up @@ -4470,9 +4444,6 @@ void bnx2x_nic_init(struct bnx2x *bp, u32 load_code)
bnx2x_init_ind_table(bp);
bnx2x_stats_init(bp);

/* At this point, we are ready for interrupts */
atomic_set(&bp->intr_sem, 0);

/* flush all before enabling interrupts */
mb();
mmiowb();
Expand Down Expand Up @@ -8648,10 +8619,6 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)
int timer_interval;
int rc;

/* Disable interrupt handling until HW is initialized */
atomic_set(&bp->intr_sem, 1);
smp_wmb(); /* Ensure that bp->intr_sem update is SMP-safe */

mutex_init(&bp->port.phy_mutex);
mutex_init(&bp->fw_mb_mutex);
spin_lock_init(&bp->stats_lock);
Expand Down Expand Up @@ -10169,9 +10136,6 @@ static int bnx2x_register_cnic(struct net_device *dev, struct cnic_ops *ops,
if (ops == NULL)
return -EINVAL;

if (atomic_read(&bp->intr_sem) != 0)
return -EBUSY;

bp->cnic_kwq = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!bp->cnic_kwq)
return -ENOMEM;
Expand Down

0 comments on commit 26344da

Please sign in to comment.