qlcnic: fix ocm window register offset calculation
authorRajesh Borundia <rajesh.borundia@qlogic.com>
Thu, 16 Dec 2010 22:59:01 +0000 (22:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Dec 2010 19:39:01 +0000 (11:39 -0800)
OCM window register offset was calculated incorrectly for
pci function greater than zero.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlcnic/qlcnic_hdr.h

index 19328e0..726ef55 100644 (file)
@@ -621,7 +621,7 @@ enum {
 #define PCIX_INT_MASK          (0x10104)
 
 #define PCIX_OCM_WINDOW                (0x10800)
-#define PCIX_OCM_WINDOW_REG(func)      (PCIX_OCM_WINDOW + 0x20 * (func))
+#define PCIX_OCM_WINDOW_REG(func)      (PCIX_OCM_WINDOW + 0x4 * (func))
 
 #define PCIX_TARGET_STATUS     (0x10118)
 #define PCIX_TARGET_STATUS_F1  (0x10160)