aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
authorCarolyn Wyborny <carolyn.wyborny@intel.com>2013-04-18 18:21:30 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-04-18 19:40:35 -0400
commitceb5f13b70cd6e7afa87ba1b13eb900a766a28e4 (patch)
treea81eabbd1edf494207c2412c274a2c649354a39e /drivers/net/ethernet/intel/igb/igb_main.c
parent70ea47832521e6c0f053b4906484a7a34fbf0e5d (diff)
igb: Add support for i354 devices
This patch adds base support for new i354 devices. Loopback test is unsupported for this release. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c49
1 files changed, 36 insertions, 13 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 666f87c4bfa3..38590252be64 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -77,6 +77,9 @@ static const struct e1000_info *igb_info_tbl[] = {
77}; 77};
78 78
79static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = { 79static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
80 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) },
81 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_SGMII) },
82 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) },
80 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I211_COPPER), board_82575 }, 83 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I211_COPPER), board_82575 },
81 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_COPPER), board_82575 }, 84 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_COPPER), board_82575 },
82 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_FIBER), board_82575 }, 85 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_FIBER), board_82575 },
@@ -735,6 +738,7 @@ static void igb_cache_ring_register(struct igb_adapter *adapter)
735 case e1000_82575: 738 case e1000_82575:
736 case e1000_82580: 739 case e1000_82580:
737 case e1000_i350: 740 case e1000_i350:
741 case e1000_i354:
738 case e1000_i210: 742 case e1000_i210:
739 case e1000_i211: 743 case e1000_i211:
740 default: 744 default:
@@ -820,6 +824,7 @@ static void igb_assign_vector(struct igb_q_vector *q_vector, int msix_vector)
820 break; 824 break;
821 case e1000_82580: 825 case e1000_82580:
822 case e1000_i350: 826 case e1000_i350:
827 case e1000_i354:
823 case e1000_i210: 828 case e1000_i210:
824 case e1000_i211: 829 case e1000_i211:
825 /* On 82580 and newer adapters the scheme is similar to 82576 830 /* On 82580 and newer adapters the scheme is similar to 82576
@@ -887,6 +892,7 @@ static void igb_configure_msix(struct igb_adapter *adapter)
887 case e1000_82576: 892 case e1000_82576:
888 case e1000_82580: 893 case e1000_82580:
889 case e1000_i350: 894 case e1000_i350:
895 case e1000_i354:
890 case e1000_i210: 896 case e1000_i210:
891 case e1000_i211: 897 case e1000_i211:
892 /* Turn on MSI-X capability first, or our settings 898 /* Turn on MSI-X capability first, or our settings
@@ -1238,7 +1244,8 @@ static int igb_alloc_q_vector(struct igb_adapter *adapter,
1238 if (adapter->hw.mac.type >= e1000_82576) 1244 if (adapter->hw.mac.type >= e1000_82576)
1239 set_bit(IGB_RING_FLAG_RX_SCTP_CSUM, &ring->flags); 1245 set_bit(IGB_RING_FLAG_RX_SCTP_CSUM, &ring->flags);
1240 1246
1241 /* On i350, i210, and i211, loopback VLAN packets 1247 /*
1248 * On i350, i354, i210, and i211, loopback VLAN packets
1242 * have the tag byte-swapped. 1249 * have the tag byte-swapped.
1243 */ 1250 */
1244 if (adapter->hw.mac.type >= e1000_i350) 1251 if (adapter->hw.mac.type >= e1000_i350)
@@ -1713,6 +1720,7 @@ void igb_reset(struct igb_adapter *adapter)
1713 */ 1720 */
1714 switch (mac->type) { 1721 switch (mac->type) {
1715 case e1000_i350: 1722 case e1000_i350:
1723 case e1000_i354:
1716 case e1000_82580: 1724 case e1000_82580:
1717 pba = rd32(E1000_RXPBS); 1725 pba = rd32(E1000_RXPBS);
1718 pba = igb_rxpbs_adjust_82580(pba); 1726 pba = igb_rxpbs_adjust_82580(pba);
@@ -2317,17 +2325,20 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2317 igb_ptp_init(adapter); 2325 igb_ptp_init(adapter);
2318 2326
2319 dev_info(&pdev->dev, "Intel(R) Gigabit Ethernet Network Connection\n"); 2327 dev_info(&pdev->dev, "Intel(R) Gigabit Ethernet Network Connection\n");
2320 /* print bus type/speed/width info */ 2328 /* print bus type/speed/width info, not applicable to i354 */
2321 dev_info(&pdev->dev, "%s: (PCIe:%s:%s) %pM\n", 2329 if (hw->mac.type != e1000_i354) {
2322 netdev->name, 2330 dev_info(&pdev->dev, "%s: (PCIe:%s:%s) %pM\n",
2323 ((hw->bus.speed == e1000_bus_speed_2500) ? "2.5Gb/s" : 2331 netdev->name,
2324 (hw->bus.speed == e1000_bus_speed_5000) ? "5.0Gb/s" : 2332 ((hw->bus.speed == e1000_bus_speed_2500) ? "2.5Gb/s" :
2325 "unknown"), 2333 (hw->bus.speed == e1000_bus_speed_5000) ? "5.0Gb/s" :
2326 ((hw->bus.width == e1000_bus_width_pcie_x4) ? "Width x4" : 2334 "unknown"),
2327 (hw->bus.width == e1000_bus_width_pcie_x2) ? "Width x2" : 2335 ((hw->bus.width == e1000_bus_width_pcie_x4) ?
2328 (hw->bus.width == e1000_bus_width_pcie_x1) ? "Width x1" : 2336 "Width x4" :
2329 "unknown"), 2337 (hw->bus.width == e1000_bus_width_pcie_x2) ?
2330 netdev->dev_addr); 2338 "Width x2" :
2339 (hw->bus.width == e1000_bus_width_pcie_x1) ?
2340 "Width x1" : "unknown"), netdev->dev_addr);
2341 }
2331 2342
2332 ret_val = igb_read_part_string(hw, part_str, E1000_PBANUM_LENGTH); 2343 ret_val = igb_read_part_string(hw, part_str, E1000_PBANUM_LENGTH);
2333 if (ret_val) 2344 if (ret_val)
@@ -2344,6 +2355,13 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2344 case e1000_i211: 2355 case e1000_i211:
2345 igb_set_eee_i350(hw); 2356 igb_set_eee_i350(hw);
2346 break; 2357 break;
2358 case e1000_i354:
2359 if (hw->phy.media_type == e1000_media_type_copper) {
2360 if ((rd32(E1000_CTRL_EXT) &
2361 E1000_CTRL_EXT_LINK_MODE_SGMII))
2362 igb_set_eee_i354(hw);
2363 }
2364 break;
2347 default: 2365 default:
2348 break; 2366 break;
2349 } 2367 }
@@ -2597,6 +2615,7 @@ static void igb_init_queue_configuration(struct igb_adapter *adapter)
2597 } 2615 }
2598 /* fall through */ 2616 /* fall through */
2599 case e1000_82580: 2617 case e1000_82580:
2618 case e1000_i354:
2600 default: 2619 default:
2601 max_rss_queues = IGB_MAX_RX_QUEUES; 2620 max_rss_queues = IGB_MAX_RX_QUEUES;
2602 break; 2621 break;
@@ -2621,6 +2640,7 @@ static void igb_init_queue_configuration(struct igb_adapter *adapter)
2621 /* fall through */ 2640 /* fall through */
2622 case e1000_82580: 2641 case e1000_82580:
2623 case e1000_i350: 2642 case e1000_i350:
2643 case e1000_i354:
2624 case e1000_i210: 2644 case e1000_i210:
2625 default: 2645 default:
2626 /* If rss_queues > half of max_rss_queues, pair the queues in 2646 /* If rss_queues > half of max_rss_queues, pair the queues in
@@ -7649,6 +7669,7 @@ static void igb_vmm_control(struct igb_adapter *adapter)
7649 case e1000_82575: 7669 case e1000_82575:
7650 case e1000_i210: 7670 case e1000_i210:
7651 case e1000_i211: 7671 case e1000_i211:
7672 case e1000_i354:
7652 default: 7673 default:
7653 /* replication is not supported for 82575 */ 7674 /* replication is not supported for 82575 */
7654 return; 7675 return;
@@ -7722,7 +7743,9 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
7722 reg |= (1000 >> 5); 7743 reg |= (1000 >> 5);
7723 7744
7724 /* Disable BMC-to-OS Watchdog Enable */ 7745 /* Disable BMC-to-OS Watchdog Enable */
7725 reg &= ~E1000_DMACR_DC_BMC2OSW_EN; 7746 if (hw->mac.type != e1000_i354)
7747 reg &= ~E1000_DMACR_DC_BMC2OSW_EN;
7748
7726 wr32(E1000_DMACR, reg); 7749 wr32(E1000_DMACR, reg);
7727 7750
7728 /* no lower threshold to disable 7751 /* no lower threshold to disable