Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203157
b: refs/heads/master
c: 66fee9e
h: refs/heads/master
i:
  203155: 147de3a
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jun 26, 2010
1 parent f74b42d commit ba0c808
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 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: 520efdf44f0140eef9018518fdae5edfc86f3b6c
refs/heads/master: 66fee9ed03a4413ea054e437b65af6fd3583b4db
33 changes: 20 additions & 13 deletions trunk/drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,9 @@ static void cnic_chk_pkt_rings(struct cnic_local *cp)
u16 tx_cons = *cp->tx_cons_ptr;
int comp = 0;

if (!test_bit(CNIC_F_CNIC_UP, &cp->dev->flags))
return;

if (cp->tx_cons != tx_cons || cp->rx_cons != rx_cons) {
if (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags))
comp = cnic_l2_completion(cp);
Expand Down Expand Up @@ -2284,20 +2287,28 @@ static void cnic_service_bnx2_msix(unsigned long data)
BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | cp->last_status_idx);
}

static void cnic_doirq(struct cnic_dev *dev)
{
struct cnic_local *cp = dev->cnic_priv;
u16 prod = cp->kcq_prod_idx & MAX_KCQ_IDX;

if (likely(test_bit(CNIC_F_CNIC_UP, &dev->flags))) {
prefetch(cp->status_blk.gen);
prefetch(&cp->kcq[KCQ_PG(prod)][KCQ_IDX(prod)]);

tasklet_schedule(&cp->cnic_irq_task);
}
}

static irqreturn_t cnic_irq(int irq, void *dev_instance)
{
struct cnic_dev *dev = dev_instance;
struct cnic_local *cp = dev->cnic_priv;
u16 prod = cp->kcq_prod_idx & MAX_KCQ_IDX;

if (cp->ack_int)
cp->ack_int(dev);

prefetch(cp->status_blk.gen);
prefetch(&cp->kcq[KCQ_PG(prod)][KCQ_IDX(prod)]);

if (likely(test_bit(CNIC_F_CNIC_UP, &dev->flags)))
tasklet_schedule(&cp->cnic_irq_task);
cnic_doirq(dev);

return IRQ_HANDLED;
}
Expand Down Expand Up @@ -2373,15 +2384,11 @@ static int cnic_service_bnx2x(void *data, void *status_blk)
{
struct cnic_dev *dev = data;
struct cnic_local *cp = dev->cnic_priv;
u16 prod = cp->kcq_prod_idx & MAX_KCQ_IDX;

if (likely(test_bit(CNIC_F_CNIC_UP, &dev->flags))) {
prefetch(cp->status_blk.bnx2x);
prefetch(&cp->kcq[KCQ_PG(prod)][KCQ_IDX(prod)]);
if (!(cp->ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX))
cnic_doirq(dev);

tasklet_schedule(&cp->cnic_irq_task);
cnic_chk_pkt_rings(cp);
}
cnic_chk_pkt_rings(cp);

return 0;
}
Expand Down

0 comments on commit ba0c808

Please sign in to comment.