aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c62
1 files changed, 33 insertions, 29 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index acef3c65cd2c..d2f4d5f508b7 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -318,6 +318,9 @@ static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter,
318 rxctrl |= dca3_get_tag(&adapter->pdev->dev, cpu); 318 rxctrl |= dca3_get_tag(&adapter->pdev->dev, cpu);
319 rxctrl |= IXGBE_DCA_RXCTRL_DESC_DCA_EN; 319 rxctrl |= IXGBE_DCA_RXCTRL_DESC_DCA_EN;
320 rxctrl |= IXGBE_DCA_RXCTRL_HEAD_DCA_EN; 320 rxctrl |= IXGBE_DCA_RXCTRL_HEAD_DCA_EN;
321 rxctrl &= ~(IXGBE_DCA_RXCTRL_DESC_RRO_EN);
322 rxctrl &= ~(IXGBE_DCA_RXCTRL_DESC_WRO_EN |
323 IXGBE_DCA_RXCTRL_DESC_HSRO_EN);
321 IXGBE_WRITE_REG(&adapter->hw, IXGBE_DCA_RXCTRL(q), rxctrl); 324 IXGBE_WRITE_REG(&adapter->hw, IXGBE_DCA_RXCTRL(q), rxctrl);
322 rx_ring->cpu = cpu; 325 rx_ring->cpu = cpu;
323 } 326 }
@@ -1741,6 +1744,32 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
1741 IXGBE_WRITE_REG(hw, IXGBE_RXCSUM, rxcsum); 1744 IXGBE_WRITE_REG(hw, IXGBE_RXCSUM, rxcsum);
1742} 1745}
1743 1746
1747static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
1748{
1749 struct ixgbe_adapter *adapter = netdev_priv(netdev);
1750 struct ixgbe_hw *hw = &adapter->hw;
1751
1752 /* add VID to filter table */
1753 hw->mac.ops.set_vfta(&adapter->hw, vid, 0, true);
1754}
1755
1756static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
1757{
1758 struct ixgbe_adapter *adapter = netdev_priv(netdev);
1759 struct ixgbe_hw *hw = &adapter->hw;
1760
1761 if (!test_bit(__IXGBE_DOWN, &adapter->state))
1762 ixgbe_irq_disable(adapter);
1763
1764 vlan_group_set_device(adapter->vlgrp, vid, NULL);
1765
1766 if (!test_bit(__IXGBE_DOWN, &adapter->state))
1767 ixgbe_irq_enable(adapter);
1768
1769 /* remove VID from filter table */
1770 hw->mac.ops.set_vfta(&adapter->hw, vid, 0, false);
1771}
1772
1744static void ixgbe_vlan_rx_register(struct net_device *netdev, 1773static void ixgbe_vlan_rx_register(struct net_device *netdev,
1745 struct vlan_group *grp) 1774 struct vlan_group *grp)
1746{ 1775{
@@ -1760,6 +1789,7 @@ static void ixgbe_vlan_rx_register(struct net_device *netdev,
1760 ctrl |= IXGBE_VLNCTRL_VME; 1789 ctrl |= IXGBE_VLNCTRL_VME;
1761 ctrl &= ~IXGBE_VLNCTRL_CFIEN; 1790 ctrl &= ~IXGBE_VLNCTRL_CFIEN;
1762 IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl); 1791 IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl);
1792 ixgbe_vlan_rx_add_vid(netdev, 0);
1763 1793
1764 if (grp) { 1794 if (grp) {
1765 /* enable VLAN tag insert/strip */ 1795 /* enable VLAN tag insert/strip */
@@ -1773,32 +1803,6 @@ static void ixgbe_vlan_rx_register(struct net_device *netdev,
1773 ixgbe_irq_enable(adapter); 1803 ixgbe_irq_enable(adapter);
1774} 1804}
1775 1805
1776static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
1777{
1778 struct ixgbe_adapter *adapter = netdev_priv(netdev);
1779 struct ixgbe_hw *hw = &adapter->hw;
1780
1781 /* add VID to filter table */
1782 hw->mac.ops.set_vfta(&adapter->hw, vid, 0, true);
1783}
1784
1785static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
1786{
1787 struct ixgbe_adapter *adapter = netdev_priv(netdev);
1788 struct ixgbe_hw *hw = &adapter->hw;
1789
1790 if (!test_bit(__IXGBE_DOWN, &adapter->state))
1791 ixgbe_irq_disable(adapter);
1792
1793 vlan_group_set_device(adapter->vlgrp, vid, NULL);
1794
1795 if (!test_bit(__IXGBE_DOWN, &adapter->state))
1796 ixgbe_irq_enable(adapter);
1797
1798 /* remove VID from filter table */
1799 hw->mac.ops.set_vfta(&adapter->hw, vid, 0, false);
1800}
1801
1802static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter) 1806static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter)
1803{ 1807{
1804 ixgbe_vlan_rx_register(adapter->netdev, adapter->vlgrp); 1808 ixgbe_vlan_rx_register(adapter->netdev, adapter->vlgrp);
@@ -2074,6 +2078,9 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
2074 2078
2075 ixgbe_irq_enable(adapter); 2079 ixgbe_irq_enable(adapter);
2076 2080
2081 /* enable transmits */
2082 netif_tx_start_all_queues(netdev);
2083
2077 /* bring the link up in the watchdog, this could race with our first 2084 /* bring the link up in the watchdog, this could race with our first
2078 * link up interrupt but shouldn't be a problem */ 2085 * link up interrupt but shouldn't be a problem */
2079 adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE; 2086 adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE;
@@ -3475,7 +3482,6 @@ static void ixgbe_watchdog_task(struct work_struct *work)
3475 (FLOW_TX ? "TX" : "None")))); 3482 (FLOW_TX ? "TX" : "None"))));
3476 3483
3477 netif_carrier_on(netdev); 3484 netif_carrier_on(netdev);
3478 netif_tx_wake_all_queues(netdev);
3479 } else { 3485 } else {
3480 /* Force detection of hung controller */ 3486 /* Force detection of hung controller */
3481 adapter->detect_tx_hung = true; 3487 adapter->detect_tx_hung = true;
@@ -3487,7 +3493,6 @@ static void ixgbe_watchdog_task(struct work_struct *work)
3487 printk(KERN_INFO "ixgbe: %s NIC Link is Down\n", 3493 printk(KERN_INFO "ixgbe: %s NIC Link is Down\n",
3488 netdev->name); 3494 netdev->name);
3489 netif_carrier_off(netdev); 3495 netif_carrier_off(netdev);
3490 netif_tx_stop_all_queues(netdev);
3491 } 3496 }
3492 } 3497 }
3493 3498
@@ -4218,7 +4223,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
4218 } 4223 }
4219 4224
4220 netif_carrier_off(netdev); 4225 netif_carrier_off(netdev);
4221 netif_tx_stop_all_queues(netdev);
4222 4226
4223 strcpy(netdev->name, "eth%d"); 4227 strcpy(netdev->name, "eth%d");
4224 err = register_netdev(netdev); 4228 err = register_netdev(netdev);