diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2014-11-22 02:59:56 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-12-05 12:13:08 -0500 |
commit | 47068b0ddfa9c7d16ed4fd4c831579699ef89571 (patch) | |
tree | 2cacab1b44df291f5ba003d6560b33902f94b71f | |
parent | 0fb6a55cc31ff216ef86332404ad3e425cb669eb (diff) |
ixgbevf: add support for X550 VFs
This patch adds initial support for VFs on a new mac - X550.
The patch adds the basic structures and device IDs for the X550 VFs
that would allow the driver to load and pass traffic.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/defines.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 25 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/vf.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/vf.h | 2 |
5 files changed, 38 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/defines.h b/drivers/net/ethernet/intel/ixgbevf/defines.h index 05e4f32d84f7..7412d378b77b 100644 --- a/drivers/net/ethernet/intel/ixgbevf/defines.h +++ b/drivers/net/ethernet/intel/ixgbevf/defines.h | |||
@@ -31,6 +31,8 @@ | |||
31 | /* Device IDs */ | 31 | /* Device IDs */ |
32 | #define IXGBE_DEV_ID_82599_VF 0x10ED | 32 | #define IXGBE_DEV_ID_82599_VF 0x10ED |
33 | #define IXGBE_DEV_ID_X540_VF 0x1515 | 33 | #define IXGBE_DEV_ID_X540_VF 0x1515 |
34 | #define IXGBE_DEV_ID_X550_VF 0x1565 | ||
35 | #define IXGBE_DEV_ID_X550EM_X_VF 0x15A8 | ||
34 | 36 | ||
35 | #define IXGBE_VF_IRQ_CLEAR_MASK 7 | 37 | #define IXGBE_VF_IRQ_CLEAR_MASK 7 |
36 | #define IXGBE_VF_MAX_TX_QUEUES 8 | 38 | #define IXGBE_VF_MAX_TX_QUEUES 8 |
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h index bb6726cbeb86..8c44ab25f3fa 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | |||
@@ -432,10 +432,14 @@ enum ixbgevf_state_t { | |||
432 | enum ixgbevf_boards { | 432 | enum ixgbevf_boards { |
433 | board_82599_vf, | 433 | board_82599_vf, |
434 | board_X540_vf, | 434 | board_X540_vf, |
435 | board_X550_vf, | ||
436 | board_X550EM_x_vf, | ||
435 | }; | 437 | }; |
436 | 438 | ||
437 | extern const struct ixgbevf_info ixgbevf_82599_vf_info; | 439 | extern const struct ixgbevf_info ixgbevf_82599_vf_info; |
438 | extern const struct ixgbevf_info ixgbevf_X540_vf_info; | 440 | extern const struct ixgbevf_info ixgbevf_X540_vf_info; |
441 | extern const struct ixgbevf_info ixgbevf_X550_vf_info; | ||
442 | extern const struct ixgbevf_info ixgbevf_X550EM_x_vf_info; | ||
439 | extern const struct ixgbe_mbx_operations ixgbevf_mbx_ops; | 443 | extern const struct ixgbe_mbx_operations ixgbevf_mbx_ops; |
440 | 444 | ||
441 | /* needed by ethtool.c */ | 445 | /* needed by ethtool.c */ |
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 755f71f07ae1..54f7f9cdc4f7 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | |||
@@ -66,6 +66,8 @@ static char ixgbevf_copyright[] = | |||
66 | static const struct ixgbevf_info *ixgbevf_info_tbl[] = { | 66 | static const struct ixgbevf_info *ixgbevf_info_tbl[] = { |
67 | [board_82599_vf] = &ixgbevf_82599_vf_info, | 67 | [board_82599_vf] = &ixgbevf_82599_vf_info, |
68 | [board_X540_vf] = &ixgbevf_X540_vf_info, | 68 | [board_X540_vf] = &ixgbevf_X540_vf_info, |
69 | [board_X550_vf] = &ixgbevf_X550_vf_info, | ||
70 | [board_X550EM_x_vf] = &ixgbevf_X550EM_x_vf_info, | ||
69 | }; | 71 | }; |
70 | 72 | ||
71 | /* ixgbevf_pci_tbl - PCI Device ID Table | 73 | /* ixgbevf_pci_tbl - PCI Device ID Table |
@@ -79,6 +81,8 @@ static const struct ixgbevf_info *ixgbevf_info_tbl[] = { | |||
79 | static const struct pci_device_id ixgbevf_pci_tbl[] = { | 81 | static const struct pci_device_id ixgbevf_pci_tbl[] = { |
80 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF), board_82599_vf }, | 82 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF), board_82599_vf }, |
81 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF), board_X540_vf }, | 83 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF), board_X540_vf }, |
84 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF), board_X550_vf }, | ||
85 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF), board_X550EM_x_vf }, | ||
82 | /* required last entry */ | 86 | /* required last entry */ |
83 | {0, } | 87 | {0, } |
84 | }; | 88 | }; |
@@ -3529,7 +3533,7 @@ static int ixgbevf_change_mtu(struct net_device *netdev, int new_mtu) | |||
3529 | max_possible_frame = IXGBE_MAX_JUMBO_FRAME_SIZE; | 3533 | max_possible_frame = IXGBE_MAX_JUMBO_FRAME_SIZE; |
3530 | break; | 3534 | break; |
3531 | default: | 3535 | default: |
3532 | if (adapter->hw.mac.type == ixgbe_mac_X540_vf) | 3536 | if (adapter->hw.mac.type != ixgbe_mac_82599_vf) |
3533 | max_possible_frame = IXGBE_MAX_JUMBO_FRAME_SIZE; | 3537 | max_possible_frame = IXGBE_MAX_JUMBO_FRAME_SIZE; |
3534 | break; | 3538 | break; |
3535 | } | 3539 | } |
@@ -3860,12 +3864,23 @@ static int ixgbevf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3860 | 3864 | ||
3861 | ixgbevf_init_last_counter_stats(adapter); | 3865 | ixgbevf_init_last_counter_stats(adapter); |
3862 | 3866 | ||
3863 | /* print the MAC address */ | 3867 | /* print the VF info */ |
3864 | hw_dbg(hw, "%pM\n", netdev->dev_addr); | 3868 | dev_info(&pdev->dev, "%pM\n", netdev->dev_addr); |
3869 | dev_info(&pdev->dev, "MAC: %d\n", hw->mac.type); | ||
3865 | 3870 | ||
3866 | hw_dbg(hw, "MAC: %d\n", hw->mac.type); | 3871 | switch (hw->mac.type) { |
3872 | case ixgbe_mac_X550_vf: | ||
3873 | dev_info(&pdev->dev, "Intel(R) X550 Virtual Function\n"); | ||
3874 | break; | ||
3875 | case ixgbe_mac_X540_vf: | ||
3876 | dev_info(&pdev->dev, "Intel(R) X540 Virtual Function\n"); | ||
3877 | break; | ||
3878 | case ixgbe_mac_82599_vf: | ||
3879 | default: | ||
3880 | dev_info(&pdev->dev, "Intel(R) 82599 Virtual Function\n"); | ||
3881 | break; | ||
3882 | } | ||
3867 | 3883 | ||
3868 | hw_dbg(hw, "Intel(R) 82599 Virtual Function\n"); | ||
3869 | return 0; | 3884 | return 0; |
3870 | 3885 | ||
3871 | err_register: | 3886 | err_register: |
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c b/drivers/net/ethernet/intel/ixgbevf/vf.c index 9cddd56d02c3..cdb53be7d995 100644 --- a/drivers/net/ethernet/intel/ixgbevf/vf.c +++ b/drivers/net/ethernet/intel/ixgbevf/vf.c | |||
@@ -617,3 +617,13 @@ const struct ixgbevf_info ixgbevf_X540_vf_info = { | |||
617 | .mac = ixgbe_mac_X540_vf, | 617 | .mac = ixgbe_mac_X540_vf, |
618 | .mac_ops = &ixgbevf_mac_ops, | 618 | .mac_ops = &ixgbevf_mac_ops, |
619 | }; | 619 | }; |
620 | |||
621 | const struct ixgbevf_info ixgbevf_X550_vf_info = { | ||
622 | .mac = ixgbe_mac_X550_vf, | ||
623 | .mac_ops = &ixgbevf_mac_ops, | ||
624 | }; | ||
625 | |||
626 | const struct ixgbevf_info ixgbevf_X550EM_x_vf_info = { | ||
627 | .mac = ixgbe_mac_X550EM_x_vf, | ||
628 | .mac_ops = &ixgbevf_mac_ops, | ||
629 | }; | ||
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.h b/drivers/net/ethernet/intel/ixgbevf/vf.h index aa8cc8dc25d1..5b172427f459 100644 --- a/drivers/net/ethernet/intel/ixgbevf/vf.h +++ b/drivers/net/ethernet/intel/ixgbevf/vf.h | |||
@@ -74,6 +74,8 @@ enum ixgbe_mac_type { | |||
74 | ixgbe_mac_unknown = 0, | 74 | ixgbe_mac_unknown = 0, |
75 | ixgbe_mac_82599_vf, | 75 | ixgbe_mac_82599_vf, |
76 | ixgbe_mac_X540_vf, | 76 | ixgbe_mac_X540_vf, |
77 | ixgbe_mac_X550_vf, | ||
78 | ixgbe_mac_X550EM_x_vf, | ||
77 | ixgbe_num_macs | 79 | ixgbe_num_macs |
78 | }; | 80 | }; |
79 | 81 | ||