diff options
Diffstat (limited to 'drivers/net/enic')
-rw-r--r-- | drivers/net/enic/enic.h | 2 | ||||
-rw-r--r-- | drivers/net/enic/enic_main.c | 17 | ||||
-rw-r--r-- | drivers/net/enic/vnic_intr.h | 14 |
3 files changed, 26 insertions, 7 deletions
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h index a832cc5d6a1e..86b8c15b4d3e 100644 --- a/drivers/net/enic/enic.h +++ b/drivers/net/enic/enic.h | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | #define DRV_NAME "enic" | 34 | #define DRV_NAME "enic" |
35 | #define DRV_DESCRIPTION "Cisco 10G Ethernet Driver" | 35 | #define DRV_DESCRIPTION "Cisco 10G Ethernet Driver" |
36 | #define DRV_VERSION "1.0.0.648" | 36 | #define DRV_VERSION "1.0.0.933" |
37 | #define DRV_COPYRIGHT "Copyright 2008 Cisco Systems, Inc" | 37 | #define DRV_COPYRIGHT "Copyright 2008 Cisco Systems, Inc" |
38 | #define PFX DRV_NAME ": " | 38 | #define PFX DRV_NAME ": " |
39 | 39 | ||
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 5dd11563553e..e9bc79a6f303 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -400,10 +400,13 @@ static irqreturn_t enic_isr_legacy(int irq, void *data) | |||
400 | return IRQ_NONE; /* not our interrupt */ | 400 | return IRQ_NONE; /* not our interrupt */ |
401 | } | 401 | } |
402 | 402 | ||
403 | if (ENIC_TEST_INTR(pba, ENIC_INTX_NOTIFY)) | 403 | if (ENIC_TEST_INTR(pba, ENIC_INTX_NOTIFY)) { |
404 | vnic_intr_return_all_credits(&enic->intr[ENIC_INTX_NOTIFY]); | ||
404 | enic_notify_check(enic); | 405 | enic_notify_check(enic); |
406 | } | ||
405 | 407 | ||
406 | if (ENIC_TEST_INTR(pba, ENIC_INTX_ERR)) { | 408 | if (ENIC_TEST_INTR(pba, ENIC_INTX_ERR)) { |
409 | vnic_intr_return_all_credits(&enic->intr[ENIC_INTX_ERR]); | ||
407 | enic_log_q_error(enic); | 410 | enic_log_q_error(enic); |
408 | /* schedule recovery from WQ/RQ error */ | 411 | /* schedule recovery from WQ/RQ error */ |
409 | schedule_work(&enic->reset); | 412 | schedule_work(&enic->reset); |
@@ -476,6 +479,8 @@ static irqreturn_t enic_isr_msix_err(int irq, void *data) | |||
476 | { | 479 | { |
477 | struct enic *enic = data; | 480 | struct enic *enic = data; |
478 | 481 | ||
482 | vnic_intr_return_all_credits(&enic->intr[ENIC_MSIX_ERR]); | ||
483 | |||
479 | enic_log_q_error(enic); | 484 | enic_log_q_error(enic); |
480 | 485 | ||
481 | /* schedule recovery from WQ/RQ error */ | 486 | /* schedule recovery from WQ/RQ error */ |
@@ -488,8 +493,8 @@ static irqreturn_t enic_isr_msix_notify(int irq, void *data) | |||
488 | { | 493 | { |
489 | struct enic *enic = data; | 494 | struct enic *enic = data; |
490 | 495 | ||
496 | vnic_intr_return_all_credits(&enic->intr[ENIC_MSIX_NOTIFY]); | ||
491 | enic_notify_check(enic); | 497 | enic_notify_check(enic); |
492 | vnic_intr_unmask(&enic->intr[ENIC_MSIX_NOTIFY]); | ||
493 | 498 | ||
494 | return IRQ_HANDLED; | 499 | return IRQ_HANDLED; |
495 | } | 500 | } |
@@ -616,7 +621,7 @@ static inline void enic_queue_wq_skb(struct enic *enic, | |||
616 | vlan_tag_insert, vlan_tag); | 621 | vlan_tag_insert, vlan_tag); |
617 | } | 622 | } |
618 | 623 | ||
619 | /* netif_tx_lock held, process context with BHs disabled */ | 624 | /* netif_tx_lock held, process context with BHs disabled, or BH */ |
620 | static int enic_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev) | 625 | static int enic_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev) |
621 | { | 626 | { |
622 | struct enic *enic = netdev_priv(netdev); | 627 | struct enic *enic = netdev_priv(netdev); |
@@ -1069,7 +1074,7 @@ static int enic_poll(struct napi_struct *napi, int budget) | |||
1069 | lro_flush_all(&enic->lro_mgr); | 1074 | lro_flush_all(&enic->lro_mgr); |
1070 | 1075 | ||
1071 | napi_complete(napi); | 1076 | napi_complete(napi); |
1072 | vnic_intr_unmask(&enic->intr[ENIC_MSIX_RQ]); | 1077 | vnic_intr_unmask(&enic->intr[ENIC_INTX_WQ_RQ]); |
1073 | } | 1078 | } |
1074 | 1079 | ||
1075 | return rq_work_done; | 1080 | return rq_work_done; |
@@ -1095,9 +1100,9 @@ static int enic_poll_msix(struct napi_struct *napi, int budget) | |||
1095 | 1100 | ||
1096 | vnic_rq_fill(&enic->rq[0], enic_rq_alloc_buf); | 1101 | vnic_rq_fill(&enic->rq[0], enic_rq_alloc_buf); |
1097 | 1102 | ||
1098 | /* Accumulate intr event credits for this polling | 1103 | /* Return intr event credits for this polling |
1099 | * cycle. An intr event is the completion of a | 1104 | * cycle. An intr event is the completion of a |
1100 | * a WQ or RQ packet. | 1105 | * RQ packet. |
1101 | */ | 1106 | */ |
1102 | 1107 | ||
1103 | vnic_intr_return_credits(&enic->intr[ENIC_MSIX_RQ], | 1108 | vnic_intr_return_credits(&enic->intr[ENIC_MSIX_RQ], |
diff --git a/drivers/net/enic/vnic_intr.h b/drivers/net/enic/vnic_intr.h index ce633a5a7e3c..9a53604edce6 100644 --- a/drivers/net/enic/vnic_intr.h +++ b/drivers/net/enic/vnic_intr.h | |||
@@ -76,6 +76,20 @@ static inline void vnic_intr_return_credits(struct vnic_intr *intr, | |||
76 | iowrite32(int_credit_return, &intr->ctrl->int_credit_return); | 76 | iowrite32(int_credit_return, &intr->ctrl->int_credit_return); |
77 | } | 77 | } |
78 | 78 | ||
79 | static inline unsigned int vnic_intr_credits(struct vnic_intr *intr) | ||
80 | { | ||
81 | return ioread32(&intr->ctrl->int_credits); | ||
82 | } | ||
83 | |||
84 | static inline void vnic_intr_return_all_credits(struct vnic_intr *intr) | ||
85 | { | ||
86 | unsigned int credits = vnic_intr_credits(intr); | ||
87 | int unmask = 1; | ||
88 | int reset_timer = 1; | ||
89 | |||
90 | vnic_intr_return_credits(intr, credits, unmask, reset_timer); | ||
91 | } | ||
92 | |||
79 | static inline u32 vnic_intr_legacy_pba(u32 __iomem *legacy_pba) | 93 | static inline u32 vnic_intr_legacy_pba(u32 __iomem *legacy_pba) |
80 | { | 94 | { |
81 | /* read PBA without clearing */ | 95 | /* read PBA without clearing */ |