Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122448
b: refs/heads/master
c: 3e1d7cd
h: refs/heads/master
v: v3
  • Loading branch information
Wang Chen authored and David S. Miller committed Dec 4, 2008
1 parent 6d5475b commit b1b2104
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4d2f34b7c3ff8a53df755961faf8186c6e7b464
refs/heads/master: 3e1d7cd2dc708f2054b2180e05ae283b9f91d543
1 change: 0 additions & 1 deletion trunk/drivers/net/e1000/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ struct e1000_adapter {
int cleaned_count);
struct e1000_rx_ring *rx_ring; /* One per active queue */
struct napi_struct napi;
struct net_device *polling_netdev; /* One per active queue */

int num_tx_queues;
int num_rx_queues;
Expand Down
27 changes: 1 addition & 26 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,12 +1242,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
if (hw->flash_address)
iounmap(hw->flash_address);
err_flashmap:
for (i = 0; i < adapter->num_rx_queues; i++)
dev_put(&adapter->polling_netdev[i]);

kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
kfree(adapter->polling_netdev);
err_sw_init:
iounmap(hw->hw_addr);
err_ioremap:
Expand Down Expand Up @@ -1275,7 +1271,6 @@ static void __devexit e1000_remove(struct pci_dev *pdev)
struct net_device *netdev = pci_get_drvdata(pdev);
struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
int i;

cancel_work_sync(&adapter->reset_task);

Expand All @@ -1285,17 +1280,13 @@ static void __devexit e1000_remove(struct pci_dev *pdev)
* would have already happened in close and is redundant. */
e1000_release_hw_control(adapter);

for (i = 0; i < adapter->num_rx_queues; i++)
dev_put(&adapter->polling_netdev[i]);

unregister_netdev(netdev);

if (!e1000_check_phy_reset_block(hw))
e1000_phy_hw_reset(hw);

kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
kfree(adapter->polling_netdev);

iounmap(hw->hw_addr);
if (hw->flash_address)
Expand All @@ -1321,7 +1312,6 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter)
struct e1000_hw *hw = &adapter->hw;
struct net_device *netdev = adapter->netdev;
struct pci_dev *pdev = adapter->pdev;
int i;

/* PCI config space info */

Expand Down Expand Up @@ -1378,11 +1368,6 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter)
return -ENOMEM;
}

for (i = 0; i < adapter->num_rx_queues; i++) {
adapter->polling_netdev[i].priv = adapter;
dev_hold(&adapter->polling_netdev[i]);
set_bit(__LINK_STATE_START, &adapter->polling_netdev[i].state);
}
spin_lock_init(&adapter->tx_queue_lock);

/* Explicitly disable IRQ since the NIC can be in any state. */
Expand All @@ -1400,8 +1385,7 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter)
* @adapter: board private structure to initialize
*
* We allocate one ring per queue at run-time since we don't know the
* number of queues at compile-time. The polling_netdev array is
* intended for Multiqueue, but should work fine with a single queue.
* number of queues at compile-time.
**/

static int __devinit e1000_alloc_queues(struct e1000_adapter *adapter)
Expand All @@ -1418,15 +1402,6 @@ static int __devinit e1000_alloc_queues(struct e1000_adapter *adapter)
return -ENOMEM;
}

adapter->polling_netdev = kcalloc(adapter->num_rx_queues,
sizeof(struct net_device),
GFP_KERNEL);
if (!adapter->polling_netdev) {
kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
return -ENOMEM;
}

return E1000_SUCCESS;
}

Expand Down

0 comments on commit b1b2104

Please sign in to comment.