Commit 7d260ec2 authored by Vasanthy Kolluri's avatar Vasanthy Kolluri Committed by David S. Miller
Browse files

enic: Get/Set interrupt resource index for transmit and receive queues

Instead of deriving the index of a transmit/receive interrupt resource
from the transmit/receive queue index, always save and retrieve it
using an additional variable.

Signed-off-by: default avatarChristian Benvenuti <>
Signed-off-by: default avatarDanny Guo <>
Signed-off-by: default avatarVasanthy Kolluri <>
Signed-off-by: default avatarRoopa Prabhu <>
Signed-off-by: default avatarDavid Wang <>
Signed-off-by: default avatarDavid S. Miller <>
parent e1fb77bf
......@@ -32,7 +32,7 @@
#define DRV_NAME "enic"
#define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver"
#define DRV_VERSION ""
#define DRV_VERSION ""
#define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc"
#define ENIC_BARS_MAX 6
......@@ -153,12 +153,12 @@ static inline unsigned int enic_legacy_notify_intr(void)
static inline unsigned int enic_msix_rq_intr(struct enic *enic, unsigned int rq)
return rq;
return enic->cq[enic_cq_rq(enic, rq)].interrupt_offset;
static inline unsigned int enic_msix_wq_intr(struct enic *enic, unsigned int wq)
return enic->rq_count + wq;
return enic->cq[enic_cq_wq(enic, wq)].interrupt_offset;
static inline unsigned int enic_msix_err_intr(struct enic *enic)
......@@ -74,6 +74,8 @@ void vnic_cq_init(struct vnic_cq *cq, unsigned int flow_control_enable,
iowrite32(cq_message_enable, &cq->ctrl->cq_message_enable);
iowrite32(interrupt_offset, &cq->ctrl->interrupt_offset);
writeq(cq_message_addr, &cq->ctrl->cq_message_addr);
cq->interrupt_offset = interrupt_offset;
void vnic_cq_clean(struct vnic_cq *cq)
......@@ -57,6 +57,7 @@ struct vnic_cq {
struct vnic_dev_ring ring;
unsigned int to_clean;
unsigned int last_color;
unsigned int interrupt_offset;
static inline unsigned int vnic_cq_service(struct vnic_cq *cq,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment