kernel: update linux 3.2 to 3.2.12
[openwrt.git] / package / ep80579-drivers / patches / 102-iegbe_nuke_polling_netdev.patch
1 --- a/Embedded/src/GbE/iegbe.h
2 +++ b/Embedded/src/GbE/iegbe.h
3 @@ -316,7 +316,6 @@ struct iegbe_adapter {
4 int cleaned_count);
5 struct iegbe_rx_ring *rx_ring; /* One per active queue */
6 struct napi_struct napi;
7 - struct net_device *polling_netdev; /* One per active queue */
8
9 int num_tx_queues;
10 int num_rx_queues;
11 --- a/Embedded/src/GbE/iegbe_main.c
12 +++ b/Embedded/src/GbE/iegbe_main.c
13 @@ -763,7 +763,7 @@ static int __devinit iegbe_probe(struct
14 struct iegbe_hw *hw;
15
16 static int cards_found = 0;
17 - int i, err, pci_using_dac;
18 + int err, pci_using_dac;
19 u16 eeprom_data = 0;
20 u16 eeprom_apme_mask = E1000_EEPROM_APME;
21 int bars;
22 @@ -984,11 +984,8 @@ err_eeprom:
23 iegbe_phy_hw_reset(hw);
24 if (hw->flash_address)
25 iounmap(hw->flash_address);
26 - for (i = 0; i < adapter->num_rx_queues; i++)
27 - dev_put(&adapter->polling_netdev[i]);
28 kfree(adapter->tx_ring);
29 kfree(adapter->rx_ring);
30 - kfree(adapter->polling_netdev);
31 err_sw_init:
32 iounmap(hw->hw_addr);
33 err_ioremap:
34 @@ -1017,7 +1014,6 @@ iegbe_remove(struct pci_dev *pdev)
35 struct net_device *netdev = pci_get_drvdata(pdev);
36 struct iegbe_adapter *adapter = netdev_priv(netdev);
37 uint32_t manc;
38 - int i;
39
40 if(adapter->hw.mac_type >= iegbe_82540
41 && adapter->hw.mac_type != iegbe_icp_xxxx
42 @@ -1030,15 +1026,11 @@ iegbe_remove(struct pci_dev *pdev)
43 }
44
45 unregister_netdev(netdev);
46 - for (i = 0x0; i < adapter->num_rx_queues; i++)
47 - dev_put(&adapter->polling_netdev[i]);
48 -
49 if(!iegbe_check_phy_reset_block(&adapter->hw)) {
50 iegbe_phy_hw_reset(&adapter->hw);
51 }
52 kfree(adapter->tx_ring);
53 kfree(adapter->rx_ring);
54 - kfree(adapter->polling_netdev);
55
56 iounmap(adapter->hw.hw_addr);
57 pci_release_regions(pdev);
58 @@ -1061,7 +1053,6 @@ iegbe_sw_init(struct iegbe_adapter *adap
59 struct iegbe_hw *hw = &adapter->hw;
60 struct net_device *netdev = adapter->netdev;
61 struct pci_dev *pdev = adapter->pdev;
62 - int i;
63
64 /* PCI config space info */
65
66 @@ -1111,11 +1102,6 @@ iegbe_sw_init(struct iegbe_adapter *adap
67 return -ENOMEM;
68 }
69
70 - for (i = 0; i < adapter->num_rx_queues; i++) {
71 - adapter->polling_netdev[i].priv = adapter;
72 - dev_hold(&adapter->polling_netdev[i]);
73 - set_bit(__LINK_STATE_START, &adapter->polling_netdev[i].state);
74 - }
75 spin_lock_init(&adapter->tx_queue_lock);
76
77 /*
78 @@ -1137,8 +1123,7 @@ iegbe_sw_init(struct iegbe_adapter *adap
79 * @adapter: board private structure to initialize
80 *
81 * We allocate one ring per queue at run-time since we don't know the
82 - * number of queues at compile-time. The polling_netdev array is
83 - * intended for Multiqueue, but should work fine with a single queue.
84 + * number of queues at compile-time.
85 **/
86
87 static int __devinit
88 @@ -1158,15 +1143,6 @@ iegbe_alloc_queues(struct iegbe_adapter
89 return -ENOMEM;
90 }
91
92 - adapter->polling_netdev = kcalloc(adapter->num_rx_queues,
93 - sizeof(struct net_device),
94 - GFP_KERNEL);
95 - if (!adapter->polling_netdev) {
96 - kfree(adapter->tx_ring);
97 - kfree(adapter->rx_ring);
98 - return -ENOMEM;
99 - }
100 -
101 return E1000_SUCCESS;
102 }
103
This page took 0.049156 seconds and 5 git commands to generate.