diff options
author | Scott Feldman <scofeldm@cisco.com> | 2009-02-10 02:23:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-10 02:23:50 -0500 |
commit | ed8af6b288c0643dfe0ad91f1bfc8c56c0d307cc (patch) | |
tree | 6c15a77bec04fe3b5616c4ec5c0b6b2dd1502285 /drivers/net/enic/vnic_intr.h | |
parent | 0ecc103aec454288cbaa5a33d8960ab3467e8a11 (diff) |
enic: bug fix: return notify intr credits
Return notify intr credits after notify intr from firmware. This is
especially important for legacy PCI intr mode, where not returning
credits would cause PBA to remain asserted which would get us right
back into the ISR.
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic/vnic_intr.h')
-rw-r--r-- | drivers/net/enic/vnic_intr.h | 14 |
1 files changed, 14 insertions, 0 deletions
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 */ |