diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-12-04 01:07:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 01:07:10 -0500 |
commit | 3e1d7cd2dc708f2054b2180e05ae283b9f91d543 (patch) | |
tree | dfaded0839a1811819d660d0ffcc5a36c0a50e27 /drivers/net/e1000 | |
parent | a4d2f34b7c3ff8a53df755961faf8186c6e7b464 (diff) |
e1000: e1000_adapter->polling_netdev is useless
Commit bea3348eef27e6044b6161fd04c3152215f96411
"[NET]: Make NAPI polling independent of struct net_device objects."
made NAPI polling to be independent of net_device.
So e1000_adapter->polling_netdev is no longer used.
Kill it.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000.h | 1 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 27 |
2 files changed, 1 insertions, 27 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 62f62970f978..f5581de04757 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h | |||
@@ -284,7 +284,6 @@ struct e1000_adapter { | |||
284 | int cleaned_count); | 284 | int cleaned_count); |
285 | struct e1000_rx_ring *rx_ring; /* One per active queue */ | 285 | struct e1000_rx_ring *rx_ring; /* One per active queue */ |
286 | struct napi_struct napi; | 286 | struct napi_struct napi; |
287 | struct net_device *polling_netdev; /* One per active queue */ | ||
288 | 287 | ||
289 | int num_tx_queues; | 288 | int num_tx_queues; |
290 | int num_rx_queues; | 289 | int num_rx_queues; |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 6494d245d156..116c96e0b119 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -1242,12 +1242,8 @@ err_eeprom: | |||
1242 | if (hw->flash_address) | 1242 | if (hw->flash_address) |
1243 | iounmap(hw->flash_address); | 1243 | iounmap(hw->flash_address); |
1244 | err_flashmap: | 1244 | err_flashmap: |
1245 | for (i = 0; i < adapter->num_rx_queues; i++) | ||
1246 | dev_put(&adapter->polling_netdev[i]); | ||
1247 | |||
1248 | kfree(adapter->tx_ring); | 1245 | kfree(adapter->tx_ring); |
1249 | kfree(adapter->rx_ring); | 1246 | kfree(adapter->rx_ring); |
1250 | kfree(adapter->polling_netdev); | ||
1251 | err_sw_init: | 1247 | err_sw_init: |
1252 | iounmap(hw->hw_addr); | 1248 | iounmap(hw->hw_addr); |
1253 | err_ioremap: | 1249 | err_ioremap: |
@@ -1275,7 +1271,6 @@ static void __devexit e1000_remove(struct pci_dev *pdev) | |||
1275 | struct net_device *netdev = pci_get_drvdata(pdev); | 1271 | struct net_device *netdev = pci_get_drvdata(pdev); |
1276 | struct e1000_adapter *adapter = netdev_priv(netdev); | 1272 | struct e1000_adapter *adapter = netdev_priv(netdev); |
1277 | struct e1000_hw *hw = &adapter->hw; | 1273 | struct e1000_hw *hw = &adapter->hw; |
1278 | int i; | ||
1279 | 1274 | ||
1280 | cancel_work_sync(&adapter->reset_task); | 1275 | cancel_work_sync(&adapter->reset_task); |
1281 | 1276 | ||
@@ -1285,9 +1280,6 @@ static void __devexit e1000_remove(struct pci_dev *pdev) | |||
1285 | * would have already happened in close and is redundant. */ | 1280 | * would have already happened in close and is redundant. */ |
1286 | e1000_release_hw_control(adapter); | 1281 | e1000_release_hw_control(adapter); |
1287 | 1282 | ||
1288 | for (i = 0; i < adapter->num_rx_queues; i++) | ||
1289 | dev_put(&adapter->polling_netdev[i]); | ||
1290 | |||
1291 | unregister_netdev(netdev); | 1283 | unregister_netdev(netdev); |
1292 | 1284 | ||
1293 | if (!e1000_check_phy_reset_block(hw)) | 1285 | if (!e1000_check_phy_reset_block(hw)) |
@@ -1295,7 +1287,6 @@ static void __devexit e1000_remove(struct pci_dev *pdev) | |||
1295 | 1287 | ||
1296 | kfree(adapter->tx_ring); | 1288 | kfree(adapter->tx_ring); |
1297 | kfree(adapter->rx_ring); | 1289 | kfree(adapter->rx_ring); |
1298 | kfree(adapter->polling_netdev); | ||
1299 | 1290 | ||
1300 | iounmap(hw->hw_addr); | 1291 | iounmap(hw->hw_addr); |
1301 | if (hw->flash_address) | 1292 | if (hw->flash_address) |
@@ -1321,7 +1312,6 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter) | |||
1321 | struct e1000_hw *hw = &adapter->hw; | 1312 | struct e1000_hw *hw = &adapter->hw; |
1322 | struct net_device *netdev = adapter->netdev; | 1313 | struct net_device *netdev = adapter->netdev; |
1323 | struct pci_dev *pdev = adapter->pdev; | 1314 | struct pci_dev *pdev = adapter->pdev; |
1324 | int i; | ||
1325 | 1315 | ||
1326 | /* PCI config space info */ | 1316 | /* PCI config space info */ |
1327 | 1317 | ||
@@ -1378,11 +1368,6 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter) | |||
1378 | return -ENOMEM; | 1368 | return -ENOMEM; |
1379 | } | 1369 | } |
1380 | 1370 | ||
1381 | for (i = 0; i < adapter->num_rx_queues; i++) { | ||
1382 | adapter->polling_netdev[i].priv = adapter; | ||
1383 | dev_hold(&adapter->polling_netdev[i]); | ||
1384 | set_bit(__LINK_STATE_START, &adapter->polling_netdev[i].state); | ||
1385 | } | ||
1386 | spin_lock_init(&adapter->tx_queue_lock); | 1371 | spin_lock_init(&adapter->tx_queue_lock); |
1387 | 1372 | ||
1388 | /* Explicitly disable IRQ since the NIC can be in any state. */ | 1373 | /* Explicitly disable IRQ since the NIC can be in any state. */ |
@@ -1400,8 +1385,7 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter) | |||
1400 | * @adapter: board private structure to initialize | 1385 | * @adapter: board private structure to initialize |
1401 | * | 1386 | * |
1402 | * We allocate one ring per queue at run-time since we don't know the | 1387 | * We allocate one ring per queue at run-time since we don't know the |
1403 | * number of queues at compile-time. The polling_netdev array is | 1388 | * number of queues at compile-time. |
1404 | * intended for Multiqueue, but should work fine with a single queue. | ||
1405 | **/ | 1389 | **/ |
1406 | 1390 | ||
1407 | static int __devinit e1000_alloc_queues(struct e1000_adapter *adapter) | 1391 | static int __devinit e1000_alloc_queues(struct e1000_adapter *adapter) |
@@ -1418,15 +1402,6 @@ static int __devinit e1000_alloc_queues(struct e1000_adapter *adapter) | |||
1418 | return -ENOMEM; | 1402 | return -ENOMEM; |
1419 | } | 1403 | } |
1420 | 1404 | ||
1421 | adapter->polling_netdev = kcalloc(adapter->num_rx_queues, | ||
1422 | sizeof(struct net_device), | ||
1423 | GFP_KERNEL); | ||
1424 | if (!adapter->polling_netdev) { | ||
1425 | kfree(adapter->tx_ring); | ||
1426 | kfree(adapter->rx_ring); | ||
1427 | return -ENOMEM; | ||
1428 | } | ||
1429 | |||
1430 | return E1000_SUCCESS; | 1405 | return E1000_SUCCESS; |
1431 | } | 1406 | } |
1432 | 1407 | ||