Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134359
b: refs/heads/master
c: ed8af6b
h: refs/heads/master
i:
  134357: 86372ab
  134355: a9d8932
  134351: bcda6ac
v: v3
  • Loading branch information
Scott Feldman authored and David S. Miller committed Feb 10, 2009
1 parent 685660c commit 25acb72
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 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: 0ecc103aec454288cbaa5a33d8960ab3467e8a11
refs/heads/master: ed8af6b288c0643dfe0ad91f1bfc8c56c0d307cc
2 changes: 1 addition & 1 deletion trunk/drivers/net/enic/enic.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#define DRV_NAME "enic"
#define DRV_DESCRIPTION "Cisco 10G Ethernet Driver"
#define DRV_VERSION "1.0.0.648"
#define DRV_VERSION "1.0.0.933"
#define DRV_COPYRIGHT "Copyright 2008 Cisco Systems, Inc"
#define PFX DRV_NAME ": "

Expand Down
17 changes: 11 additions & 6 deletions trunk/drivers/net/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,13 @@ static irqreturn_t enic_isr_legacy(int irq, void *data)
return IRQ_NONE; /* not our interrupt */
}

if (ENIC_TEST_INTR(pba, ENIC_INTX_NOTIFY))
if (ENIC_TEST_INTR(pba, ENIC_INTX_NOTIFY)) {
vnic_intr_return_all_credits(&enic->intr[ENIC_INTX_NOTIFY]);
enic_notify_check(enic);
}

if (ENIC_TEST_INTR(pba, ENIC_INTX_ERR)) {
vnic_intr_return_all_credits(&enic->intr[ENIC_INTX_ERR]);
enic_log_q_error(enic);
/* schedule recovery from WQ/RQ error */
schedule_work(&enic->reset);
Expand Down Expand Up @@ -476,6 +479,8 @@ static irqreturn_t enic_isr_msix_err(int irq, void *data)
{
struct enic *enic = data;

vnic_intr_return_all_credits(&enic->intr[ENIC_MSIX_ERR]);

enic_log_q_error(enic);

/* schedule recovery from WQ/RQ error */
Expand All @@ -488,8 +493,8 @@ static irqreturn_t enic_isr_msix_notify(int irq, void *data)
{
struct enic *enic = data;

vnic_intr_return_all_credits(&enic->intr[ENIC_MSIX_NOTIFY]);
enic_notify_check(enic);
vnic_intr_unmask(&enic->intr[ENIC_MSIX_NOTIFY]);

return IRQ_HANDLED;
}
Expand Down Expand Up @@ -616,7 +621,7 @@ static inline void enic_queue_wq_skb(struct enic *enic,
vlan_tag_insert, vlan_tag);
}

/* netif_tx_lock held, process context with BHs disabled */
/* netif_tx_lock held, process context with BHs disabled, or BH */
static int enic_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev)
{
struct enic *enic = netdev_priv(netdev);
Expand Down Expand Up @@ -1069,7 +1074,7 @@ static int enic_poll(struct napi_struct *napi, int budget)
lro_flush_all(&enic->lro_mgr);

napi_complete(napi);
vnic_intr_unmask(&enic->intr[ENIC_MSIX_RQ]);
vnic_intr_unmask(&enic->intr[ENIC_INTX_WQ_RQ]);
}

return rq_work_done;
Expand All @@ -1095,9 +1100,9 @@ static int enic_poll_msix(struct napi_struct *napi, int budget)

vnic_rq_fill(&enic->rq[0], enic_rq_alloc_buf);

/* Accumulate intr event credits for this polling
/* Return intr event credits for this polling
* cycle. An intr event is the completion of a
* a WQ or RQ packet.
* RQ packet.
*/

vnic_intr_return_credits(&enic->intr[ENIC_MSIX_RQ],
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/net/enic/vnic_intr.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,20 @@ static inline void vnic_intr_return_credits(struct vnic_intr *intr,
iowrite32(int_credit_return, &intr->ctrl->int_credit_return);
}

static inline unsigned int vnic_intr_credits(struct vnic_intr *intr)
{
return ioread32(&intr->ctrl->int_credits);
}

static inline void vnic_intr_return_all_credits(struct vnic_intr *intr)
{
unsigned int credits = vnic_intr_credits(intr);
int unmask = 1;
int reset_timer = 1;

vnic_intr_return_credits(intr, credits, unmask, reset_timer);
}

static inline u32 vnic_intr_legacy_pba(u32 __iomem *legacy_pba)
{
/* read PBA without clearing */
Expand Down

0 comments on commit 25acb72

Please sign in to comment.