cnic, bnx2i: Add support for new devices - 57800, 57810, and 57840
authorMichael Chan <mchan@broadcom.com>
Mon, 20 Jun 2011 15:15:56 +0000 (15:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jun 2011 23:06:11 +0000 (16:06 -0700)
And change iSCSI RQ doorbell size from 16B to 64B to match new firmware.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cnic.h
drivers/scsi/bnx2i/57xx_iscsi_constants.h
drivers/scsi/bnx2i/bnx2i.h
drivers/scsi/bnx2i/bnx2i_init.c
include/linux/pci_ids.h

index 330ef935041367438fc7751c29d68714360e11de..7a2928f82d40621a6d3f1eec09b403ed609f6b49 100644 (file)
@@ -384,6 +384,9 @@ struct bnx2x_bd_chain_next {
 #define BNX2X_CHIP_NUM_57712E          0x1663
 #define BNX2X_CHIP_NUM_57713           0x1651
 #define BNX2X_CHIP_NUM_57713E          0x1652
+#define BNX2X_CHIP_NUM_57800           0x168a
+#define BNX2X_CHIP_NUM_57810           0x168e
+#define BNX2X_CHIP_NUM_57840           0x168d
 
 #define BNX2X_CHIP_NUM(x)              (x >> 16)
 #define BNX2X_CHIP_IS_57710(x)         \
@@ -402,10 +405,19 @@ struct bnx2x_bd_chain_next {
        (BNX2X_CHIP_NUM(x) == BNX2X_CHIP_NUM_57713)
 #define BNX2X_CHIP_IS_57713E(x)                \
        (BNX2X_CHIP_NUM(x) == BNX2X_CHIP_NUM_57713E)
+#define BNX2X_CHIP_IS_57800(x)         \
+       (BNX2X_CHIP_NUM(x) == BNX2X_CHIP_NUM_57800)
+#define BNX2X_CHIP_IS_57810(x)         \
+       (BNX2X_CHIP_NUM(x) == BNX2X_CHIP_NUM_57810)
+#define BNX2X_CHIP_IS_57840(x)         \
+       (BNX2X_CHIP_NUM(x) == BNX2X_CHIP_NUM_57840)
 #define BNX2X_CHIP_IS_E2(x)            \
        (BNX2X_CHIP_IS_57712(x) || BNX2X_CHIP_IS_57712E(x) || \
         BNX2X_CHIP_IS_57713(x) || BNX2X_CHIP_IS_57713E(x))
-#define BNX2X_CHIP_IS_E2_PLUS(x) BNX2X_CHIP_IS_E2(x)
+#define BNX2X_CHIP_IS_E3(x)                    \
+       (BNX2X_CHIP_IS_57800(x) || BNX2X_CHIP_IS_57810(x) || \
+        BNX2X_CHIP_IS_57840(x))
+#define BNX2X_CHIP_IS_E2_PLUS(x) (BNX2X_CHIP_IS_E2(x) || BNX2X_CHIP_IS_E3(x))
 
 #define IS_E1H_OFFSET                  BNX2X_CHIP_IS_E1H(cp->chip_id)
 
index 30e6bdbd65afaeccc07295ec18b513d9262a4751..15673cc786ff5b635cb18b0586a30c0478761c5b 100644 (file)
 
 /* SQ/RQ/CQ DB structure sizes */
 #define ISCSI_SQ_DB_SIZE    (16)
-#define ISCSI_RQ_DB_SIZE    (16)
+#define ISCSI_RQ_DB_SIZE    (64)
 #define ISCSI_CQ_DB_SIZE    (80)
 
 #define ISCSI_SQN_TO_NOTIFY_NOT_VALID                                   0xFFFF
index 6bdd25a93db96878be48dd0014cf85e0e479a611..e7cb7ecf684779ab0f055f8bffecb3e872114941 100644 (file)
@@ -478,7 +478,7 @@ struct bnx2i_5771x_cq_db {
 
 struct bnx2i_5771x_sq_rq_db {
        u16 prod_idx;
-       u8 reserved0[14]; /* Pad structure size to 16 bytes */
+       u8 reserved0[62]; /* Pad structure size to 64 bytes */
 };
 
 
index 6adbdc34a9a5727c877b56f0fe58b564413a0370..6973413e91ecd5fbd280bb5e51d8abdf18058481 100644 (file)
@@ -30,7 +30,7 @@ MODULE_AUTHOR("Anil Veerabhadrappa <anilgv@broadcom.com> and "
              "Eddie Wai <eddie.wai@broadcom.com>");
 
 MODULE_DESCRIPTION("Broadcom NetXtreme II BCM5706/5708/5709/57710/57711/57712"
-                  " iSCSI Driver");
+                  "/57800/57810/57840 iSCSI Driver");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_MODULE_VERSION);
 
@@ -88,11 +88,20 @@ void bnx2i_identify_device(struct bnx2i_hba *hba)
            (hba->pci_did == PCI_DEVICE_ID_NX2_5709S)) {
                set_bit(BNX2I_NX2_DEV_5709, &hba->cnic_dev_type);
                hba->mail_queue_access = BNX2I_MQ_BIN_MODE;
-       } else if (hba->pci_did == PCI_DEVICE_ID_NX2_57710  ||
-                  hba->pci_did == PCI_DEVICE_ID_NX2_57711  ||
-                  hba->pci_did == PCI_DEVICE_ID_NX2_57711E ||
-                  hba->pci_did == PCI_DEVICE_ID_NX2_57712  ||
-                  hba->pci_did == PCI_DEVICE_ID_NX2_57712E)
+       } else if (hba->pci_did == PCI_DEVICE_ID_NX2_57710    ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57711    ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57711E   ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57712    ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57712E   ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57800    ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57800_MF ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57800_VF ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57810    ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57810_MF ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57810_VF ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57840    ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57840_MF ||
+                  hba->pci_did == PCI_DEVICE_ID_NX2_57840_VF)
                set_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type);
        else
                printk(KERN_ALERT "bnx2i: unknown device, 0x%x\n",
index a311008af5e1538c262990459fb2daefe7d8dddb..d76bd9e4c784194dc6f0b0472ff0032ee094f36e 100644 (file)
 #define PCI_DEVICE_ID_TIGON3_5761E     0x1680
 #define PCI_DEVICE_ID_TIGON3_5761      0x1681
 #define PCI_DEVICE_ID_TIGON3_5764      0x1684
+#define PCI_DEVICE_ID_NX2_57800                0x168a
+#define PCI_DEVICE_ID_NX2_57840                0x168d
+#define PCI_DEVICE_ID_NX2_57810                0x168e
 #define PCI_DEVICE_ID_TIGON3_5787M     0x1693
 #define PCI_DEVICE_ID_TIGON3_5782      0x1696
 #define PCI_DEVICE_ID_TIGON3_5784      0x1698
 #define PCI_DEVICE_ID_TIGON3_5787      0x169b
 #define PCI_DEVICE_ID_TIGON3_5788      0x169c
 #define PCI_DEVICE_ID_TIGON3_5789      0x169d
+#define PCI_DEVICE_ID_NX2_57800_MF     0x16a5
 #define PCI_DEVICE_ID_TIGON3_5702X     0x16a6
 #define PCI_DEVICE_ID_TIGON3_5703X     0x16a7
 #define PCI_DEVICE_ID_TIGON3_5704S     0x16a8
+#define PCI_DEVICE_ID_NX2_57800_VF     0x16a9
 #define PCI_DEVICE_ID_NX2_5706S                0x16aa
+#define PCI_DEVICE_ID_NX2_57840_MF     0x16ab
 #define PCI_DEVICE_ID_NX2_5708S                0x16ac
+#define PCI_DEVICE_ID_NX2_57840_VF     0x16ad
+#define PCI_DEVICE_ID_NX2_57810_MF     0x16ae
+#define PCI_DEVICE_ID_NX2_57810_VF     0x16af
 #define PCI_DEVICE_ID_TIGON3_5702A3    0x16c6
 #define PCI_DEVICE_ID_TIGON3_5703A3    0x16c7
 #define PCI_DEVICE_ID_TIGON3_5781      0x16dd