aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-10-27 19:52:50 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-28 06:26:08 -0400
commit559e9c4987e90e278db347b0a2ba423e7e496fd3 (patch)
tree8e08cde6f01a997c5e5fe7957aed5593c9ddea28 /drivers/net/igb/igb_main.c
parent5b043fb08e1b9e10eef7cc41512462f99811e96e (diff)
igb: cleanup whitespace issues in igb_main.c
This patch goes through and cleans up whitespace issues in igb_main.c to help improve readability. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c41
1 files changed, 19 insertions, 22 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 1a6c07455052..b044c985df0b 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1006,7 +1006,6 @@ static void igb_release_hw_control(struct igb_adapter *adapter)
1006 ctrl_ext & ~E1000_CTRL_EXT_DRV_LOAD); 1006 ctrl_ext & ~E1000_CTRL_EXT_DRV_LOAD);
1007} 1007}
1008 1008
1009
1010/** 1009/**
1011 * igb_get_hw_control - get control of the h/w from f/w 1010 * igb_get_hw_control - get control of the h/w from f/w
1012 * @adapter: address of board private structure 1011 * @adapter: address of board private structure
@@ -1067,7 +1066,6 @@ static void igb_configure(struct igb_adapter *adapter)
1067 * igb_up - Open the interface and prepare it to handle traffic 1066 * igb_up - Open the interface and prepare it to handle traffic
1068 * @adapter: board private structure 1067 * @adapter: board private structure
1069 **/ 1068 **/
1070
1071int igb_up(struct igb_adapter *adapter) 1069int igb_up(struct igb_adapter *adapter)
1072{ 1070{
1073 struct e1000_hw *hw = &adapter->hw; 1071 struct e1000_hw *hw = &adapter->hw;
@@ -1288,7 +1286,7 @@ void igb_reset(struct igb_adapter *adapter)
1288} 1286}
1289 1287
1290static const struct net_device_ops igb_netdev_ops = { 1288static const struct net_device_ops igb_netdev_ops = {
1291 .ndo_open = igb_open, 1289 .ndo_open = igb_open,
1292 .ndo_stop = igb_close, 1290 .ndo_stop = igb_close,
1293 .ndo_start_xmit = igb_xmit_frame_adv, 1291 .ndo_start_xmit = igb_xmit_frame_adv,
1294 .ndo_get_stats = igb_get_stats, 1292 .ndo_get_stats = igb_get_stats,
@@ -1444,7 +1442,6 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1444 netdev->features |= NETIF_F_IPV6_CSUM; 1442 netdev->features |= NETIF_F_IPV6_CSUM;
1445 netdev->features |= NETIF_F_TSO; 1443 netdev->features |= NETIF_F_TSO;
1446 netdev->features |= NETIF_F_TSO6; 1444 netdev->features |= NETIF_F_TSO6;
1447
1448 netdev->features |= NETIF_F_GRO; 1445 netdev->features |= NETIF_F_GRO;
1449 1446
1450 netdev->vlan_features |= NETIF_F_TSO; 1447 netdev->vlan_features |= NETIF_F_TSO;
@@ -1569,7 +1566,6 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1569 } 1566 }
1570 1567
1571#endif 1568#endif
1572
1573 switch (hw->mac.type) { 1569 switch (hw->mac.type) {
1574 case e1000_82576: 1570 case e1000_82576:
1575 /* 1571 /*
@@ -1624,8 +1620,8 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1624 /* print bus type/speed/width info */ 1620 /* print bus type/speed/width info */
1625 dev_info(&pdev->dev, "%s: (PCIe:%s:%s) %pM\n", 1621 dev_info(&pdev->dev, "%s: (PCIe:%s:%s) %pM\n",
1626 netdev->name, 1622 netdev->name,
1627 ((hw->bus.speed == e1000_bus_speed_2500) 1623 ((hw->bus.speed == e1000_bus_speed_2500) ? "2.5Gb/s" :
1628 ? "2.5Gb/s" : "unknown"), 1624 "unknown"),
1629 ((hw->bus.width == e1000_bus_width_pcie_x4) ? "Width x4" : 1625 ((hw->bus.width == e1000_bus_width_pcie_x4) ? "Width x4" :
1630 (hw->bus.width == e1000_bus_width_pcie_x2) ? "Width x2" : 1626 (hw->bus.width == e1000_bus_width_pcie_x2) ? "Width x2" :
1631 (hw->bus.width == e1000_bus_width_pcie_x1) ? "Width x1" : 1627 (hw->bus.width == e1000_bus_width_pcie_x1) ? "Width x1" :
@@ -1658,8 +1654,8 @@ err_sw_init:
1658err_ioremap: 1654err_ioremap:
1659 free_netdev(netdev); 1655 free_netdev(netdev);
1660err_alloc_etherdev: 1656err_alloc_etherdev:
1661 pci_release_selected_regions(pdev, pci_select_bars(pdev, 1657 pci_release_selected_regions(pdev,
1662 IORESOURCE_MEM)); 1658 pci_select_bars(pdev, IORESOURCE_MEM));
1663err_pci_reg: 1659err_pci_reg:
1664err_dma: 1660err_dma:
1665 pci_disable_device(pdev); 1661 pci_disable_device(pdev);
@@ -1723,11 +1719,12 @@ static void __devexit igb_remove(struct pci_dev *pdev)
1723 dev_info(&pdev->dev, "IOV Disabled\n"); 1719 dev_info(&pdev->dev, "IOV Disabled\n");
1724 } 1720 }
1725#endif 1721#endif
1722
1726 iounmap(hw->hw_addr); 1723 iounmap(hw->hw_addr);
1727 if (hw->flash_address) 1724 if (hw->flash_address)
1728 iounmap(hw->flash_address); 1725 iounmap(hw->flash_address);
1729 pci_release_selected_regions(pdev, pci_select_bars(pdev, 1726 pci_release_selected_regions(pdev,
1730 IORESOURCE_MEM)); 1727 pci_select_bars(pdev, IORESOURCE_MEM));
1731 1728
1732 free_netdev(netdev); 1729 free_netdev(netdev);
1733 1730
@@ -2288,9 +2285,7 @@ void igb_setup_rctl(struct igb_adapter *adapter)
2288 */ 2285 */
2289 rctl |= E1000_RCTL_SECRC; 2286 rctl |= E1000_RCTL_SECRC;
2290 2287
2291 /* 2288 /* disable store bad packets and clear size bits. */
2292 * disable store bad packets and clear size bits.
2293 */
2294 rctl &= ~(E1000_RCTL_SBP | E1000_RCTL_SZ_256); 2289 rctl &= ~(E1000_RCTL_SBP | E1000_RCTL_SZ_256);
2295 2290
2296 /* enable LPE to prevent packets larger than max_frame_size */ 2291 /* enable LPE to prevent packets larger than max_frame_size */
@@ -2916,7 +2911,8 @@ static void igb_watchdog(unsigned long data)
2916static void igb_watchdog_task(struct work_struct *work) 2911static void igb_watchdog_task(struct work_struct *work)
2917{ 2912{
2918 struct igb_adapter *adapter = container_of(work, 2913 struct igb_adapter *adapter = container_of(work,
2919 struct igb_adapter, watchdog_task); 2914 struct igb_adapter,
2915 watchdog_task);
2920 struct e1000_hw *hw = &adapter->hw; 2916 struct e1000_hw *hw = &adapter->hw;
2921 struct net_device *netdev = adapter->netdev; 2917 struct net_device *netdev = adapter->netdev;
2922 struct igb_ring *tx_ring = adapter->tx_ring; 2918 struct igb_ring *tx_ring = adapter->tx_ring;
@@ -2935,14 +2931,14 @@ static void igb_watchdog_task(struct work_struct *work)
2935 /* Links status message must follow this format */ 2931 /* Links status message must follow this format */
2936 printk(KERN_INFO "igb: %s NIC Link is Up %d Mbps %s, " 2932 printk(KERN_INFO "igb: %s NIC Link is Up %d Mbps %s, "
2937 "Flow Control: %s\n", 2933 "Flow Control: %s\n",
2938 netdev->name, 2934 netdev->name,
2939 adapter->link_speed, 2935 adapter->link_speed,
2940 adapter->link_duplex == FULL_DUPLEX ? 2936 adapter->link_duplex == FULL_DUPLEX ?
2941 "Full Duplex" : "Half Duplex", 2937 "Full Duplex" : "Half Duplex",
2942 ((ctrl & E1000_CTRL_TFCE) && (ctrl & 2938 ((ctrl & E1000_CTRL_TFCE) &&
2943 E1000_CTRL_RFCE)) ? "RX/TX" : ((ctrl & 2939 (ctrl & E1000_CTRL_RFCE)) ? "RX/TX" :
2944 E1000_CTRL_RFCE) ? "RX" : ((ctrl & 2940 ((ctrl & E1000_CTRL_RFCE) ? "RX" :
2945 E1000_CTRL_TFCE) ? "TX" : "None"))); 2941 ((ctrl & E1000_CTRL_TFCE) ? "TX" : "None")));
2946 2942
2947 /* tweak tx_queue_len according to speed/duplex and 2943 /* tweak tx_queue_len according to speed/duplex and
2948 * adjust the timeout factor */ 2944 * adjust the timeout factor */
@@ -3724,6 +3720,7 @@ static int igb_change_mtu(struct net_device *netdev, int new_mtu)
3724 3720
3725 /* igb_down has a dependency on max_frame_size */ 3721 /* igb_down has a dependency on max_frame_size */
3726 adapter->max_frame_size = max_frame; 3722 adapter->max_frame_size = max_frame;
3723
3727 /* NOTE: netdev_alloc_skb reserves 16 bytes, and typically NET_IP_ALIGN 3724 /* NOTE: netdev_alloc_skb reserves 16 bytes, and typically NET_IP_ALIGN
3728 * means we reserve 2 more, this pushes us to allocate from the next 3725 * means we reserve 2 more, this pushes us to allocate from the next
3729 * larger slab size. 3726 * larger slab size.