qlcnic: Enable support for 844X adapter
authorManish Chopra <manish.chopra@qlogic.com>
Fri, 16 Aug 2013 23:07:13 +0000 (19:07 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Aug 2013 07:32:01 +0000 (00:32 -0700)
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c

index 73873541786f6be1a1c319eb6a1a6ecff09128c3..9ae5d2eb1a2d4d113fc9faf4ad963efa6e47673a 100644 (file)
@@ -1972,9 +1972,11 @@ extern const struct ethtool_ops qlcnic_ethtool_failed_ops;
                        __func__, ##_args);             \
        } while (0)
 
-#define PCI_DEVICE_ID_QLOGIC_QLE834X    0x8030
+#define PCI_DEVICE_ID_QLOGIC_QLE824X           0x8020
+#define PCI_DEVICE_ID_QLOGIC_QLE834X           0x8030
 #define PCI_DEVICE_ID_QLOGIC_VF_QLE834X        0x8430
-#define PCI_DEVICE_ID_QLOGIC_QLE824X   0x8020
+#define PCI_DEVICE_ID_QLOGIC_QLE844X           0x8040
+#define PCI_DEVICE_ID_QLOGIC_VF_QLE844X        0x8440
 
 static inline bool qlcnic_82xx_check(struct qlcnic_adapter *adapter)
 {
@@ -1988,6 +1990,8 @@ static inline bool qlcnic_83xx_check(struct qlcnic_adapter *adapter)
        bool status;
 
        status = ((device == PCI_DEVICE_ID_QLOGIC_QLE834X) ||
+                 (device == PCI_DEVICE_ID_QLOGIC_QLE844X) ||
+                 (device == PCI_DEVICE_ID_QLOGIC_VF_QLE844X) ||
                  (device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X)) ? true : false;
 
        return status;
@@ -2001,7 +2005,11 @@ static inline bool qlcnic_sriov_pf_check(struct qlcnic_adapter *adapter)
 static inline bool qlcnic_sriov_vf_check(struct qlcnic_adapter *adapter)
 {
        unsigned short device = adapter->pdev->device;
+       bool status;
+
+       status = ((device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X) ||
+                 (device == PCI_DEVICE_ID_QLOGIC_VF_QLE844X)) ? true : false;
 
-       return (device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X) ? true : false;
+       return status;
 }
 #endif                         /* __QLCNIC_H_ */
index f807f3b949e202de2aab7c8ffab8bdb659adc39f..cec0908bb1d6ee5a98cdd1efa6e15bd1c7fb8ca3 100644 (file)
@@ -147,10 +147,7 @@ static inline u8 qlcnic_mac_hash(u64 mac)
 static inline u32 qlcnic_get_ref_handle(struct qlcnic_adapter *adapter,
                                        u16 handle, u8 ring_id)
 {
-       unsigned short device = adapter->pdev->device;
-
-       if ((device == PCI_DEVICE_ID_QLOGIC_QLE834X) ||
-           (device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X))
+       if (qlcnic_83xx_check(adapter))
                return handle | (ring_id << 15);
        else
                return handle;
index a780b73e8b2b89439e85ab4acabffcaf53fb1931..1f97a73d56978432217b75763049328cbf760046 100644 (file)
@@ -100,6 +100,8 @@ static DEFINE_PCI_DEVICE_TABLE(qlcnic_pci_tbl) = {
        ENTRY(PCI_DEVICE_ID_QLOGIC_QLE824X),
        ENTRY(PCI_DEVICE_ID_QLOGIC_QLE834X),
        ENTRY(PCI_DEVICE_ID_QLOGIC_VF_QLE834X),
+       ENTRY(PCI_DEVICE_ID_QLOGIC_QLE844X),
+       ENTRY(PCI_DEVICE_ID_QLOGIC_VF_QLE844X),
        {0,}
 };
 
@@ -145,6 +147,11 @@ static const u32 qlcnic_reg_tbl[] = {
 };
 
 static const struct qlcnic_board_info qlcnic_boards[] = {
+       { PCI_VENDOR_ID_QLOGIC,
+         PCI_DEVICE_ID_QLOGIC_QLE844X,
+         0x0,
+         0x0,
+         "8400 series 10GbE Converged Network Adapter (TCP/IP Networking)" },
        { PCI_VENDOR_ID_QLOGIC,
          PCI_DEVICE_ID_QLOGIC_QLE834X,
          PCI_VENDOR_ID_QLOGIC,
@@ -829,7 +836,9 @@ static void qlcnic_get_bar_length(u32 dev_id, ulong *bar)
                *bar = QLCNIC_82XX_BAR0_LENGTH;
                break;
        case PCI_DEVICE_ID_QLOGIC_QLE834X:
+       case PCI_DEVICE_ID_QLOGIC_QLE844X:
        case PCI_DEVICE_ID_QLOGIC_VF_QLE834X:
+       case PCI_DEVICE_ID_QLOGIC_VF_QLE844X:
                *bar = QLCNIC_83XX_BAR0_LENGTH;
                break;
        default:
@@ -2048,9 +2057,11 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                ahw->reg_tbl = (u32 *) qlcnic_reg_tbl;
                break;
        case PCI_DEVICE_ID_QLOGIC_QLE834X:
+       case PCI_DEVICE_ID_QLOGIC_QLE844X:
                qlcnic_83xx_register_map(ahw);
                break;
        case PCI_DEVICE_ID_QLOGIC_VF_QLE834X:
+       case PCI_DEVICE_ID_QLOGIC_VF_QLE844X:
                qlcnic_sriov_vf_register_map(ahw);
                break;
        default: