aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-02-06 18:22:11 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-07 05:43:15 -0500
commit450c87c8d28aeaf83889389ceeb01457c1a6f3e9 (patch)
treed46696894d319b6ee7900b5725c0422875c6256a /drivers/net/igb
parent8675737a9c1bf6c295461efc64898359398e1c82 (diff)
igb: remove redundant count set and err_hw_init
Remove the setting of ring->count variables from igb_probe as they are duplicating the same configuration that is done igb_alloc_queues. Remove the err_hw_init tag as it can be replaced by err_sw_init. 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')
-rw-r--r--drivers/net/igb/igb_main.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index d27e502097eb..3b79ad8be53a 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1016,7 +1016,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1016 struct pci_dev *us_dev; 1016 struct pci_dev *us_dev;
1017 const struct e1000_info *ei = igb_info_tbl[ent->driver_data]; 1017 const struct e1000_info *ei = igb_info_tbl[ent->driver_data];
1018 unsigned long mmio_start, mmio_len; 1018 unsigned long mmio_start, mmio_len;
1019 int i, err, pci_using_dac, pos; 1019 int err, pci_using_dac, pos;
1020 u16 eeprom_data = 0, state = 0; 1020 u16 eeprom_data = 0, state = 0;
1021 u16 eeprom_apme_mask = IGB_EEPROM_APME; 1021 u16 eeprom_apme_mask = IGB_EEPROM_APME;
1022 u32 part_num; 1022 u32 part_num;
@@ -1128,8 +1128,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1128 /* Initialize skew-specific constants */ 1128 /* Initialize skew-specific constants */
1129 err = ei->get_invariants(hw); 1129 err = ei->get_invariants(hw);
1130 if (err) 1130 if (err)
1131 goto err_hw_init; 1131 goto err_sw_init;
1132 1132
1133 /* setup the private structure */
1133 err = igb_sw_init(adapter); 1134 err = igb_sw_init(adapter);
1134 if (err) 1135 if (err)
1135 goto err_sw_init; 1136 goto err_sw_init;
@@ -1219,14 +1220,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1219 INIT_WORK(&adapter->reset_task, igb_reset_task); 1220 INIT_WORK(&adapter->reset_task, igb_reset_task);
1220 INIT_WORK(&adapter->watchdog_task, igb_watchdog_task); 1221 INIT_WORK(&adapter->watchdog_task, igb_watchdog_task);
1221 1222
1222 /* Initialize link & ring properties that are user-changeable */ 1223 /* Initialize link properties that are user-changeable */
1223 adapter->tx_ring->count = 256;
1224 for (i = 0; i < adapter->num_tx_queues; i++)
1225 adapter->tx_ring[i].count = adapter->tx_ring->count;
1226 adapter->rx_ring->count = 256;
1227 for (i = 0; i < adapter->num_rx_queues; i++)
1228 adapter->rx_ring[i].count = adapter->rx_ring->count;
1229
1230 adapter->fc_autoneg = true; 1224 adapter->fc_autoneg = true;
1231 hw->mac.autoneg = true; 1225 hw->mac.autoneg = true;
1232 hw->phy.autoneg_advertised = 0x2f; 1226 hw->phy.autoneg_advertised = 0x2f;
@@ -1334,7 +1328,6 @@ err_eeprom:
1334 1328
1335 igb_free_queues(adapter); 1329 igb_free_queues(adapter);
1336err_sw_init: 1330err_sw_init:
1337err_hw_init:
1338 iounmap(hw->hw_addr); 1331 iounmap(hw->hw_addr);
1339err_ioremap: 1332err_ioremap:
1340 free_netdev(netdev); 1333 free_netdev(netdev);