]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
enic: Get/Set interrupt resource index for transmit and receive queues
authorVasanthy Kolluri <vkolluri@cisco.com>
Thu, 9 Jun 2011 10:37:02 +0000 (10:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Jun 2011 21:58:09 +0000 (14:58 -0700)
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: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/enic/enic.h
drivers/net/enic/enic_main.c
drivers/net/enic/vnic_cq.c
drivers/net/enic/vnic_cq.h

index 23e21037410fddc4ef9d48cd5cb2f40bf63f8714..2dcf310d837cdd10a6aa220657c10ed4a0bfeb2f 100644 (file)
@@ -32,7 +32,7 @@
 
 #define DRV_NAME               "enic"
 #define DRV_DESCRIPTION                "Cisco VIC Ethernet NIC Driver"
-#define DRV_VERSION            "2.1.1.17"
+#define DRV_VERSION            "2.1.1.19"
 #define DRV_COPYRIGHT          "Copyright 2008-2011 Cisco Systems, Inc"
 
 #define ENIC_BARS_MAX          6
index ea4aededbfe1dacc4f31a3eea81302077e4a7270..e3bffe1aafb75069887f092e730b1c4356415967 100644 (file)
@@ -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)
index b86d6ef8dad38bf97db0c3cceefc09423d196bf1..0daa1c7073cb008fb79d774adb5c35c9c1a69bde 100644 (file)
@@ -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)
index 552d3daf250812bd839f77615e4203660f3eb096..579315cbe803c91130c978b5e21538240aff3018 100644 (file)
@@ -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,