diff options
| -rw-r--r-- | drivers/net/e1000/e1000.h | 3 | ||||
| -rw-r--r-- | drivers/net/e1000/e1000_main.c | 25 |
2 files changed, 27 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 99288b95aead..a881dd0093bd 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h | |||
| @@ -310,6 +310,9 @@ struct e1000_adapter { | |||
| 310 | int need_ioport; | 310 | int need_ioport; |
| 311 | 311 | ||
| 312 | bool discarding; | 312 | bool discarding; |
| 313 | |||
| 314 | struct work_struct fifo_stall_task; | ||
| 315 | struct work_struct phy_info_task; | ||
| 313 | }; | 316 | }; |
| 314 | 317 | ||
| 315 | enum e1000_state_t { | 318 | enum e1000_state_t { |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index a1daceadca84..5b4c6c061414 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
| @@ -123,8 +123,10 @@ static void e1000_clean_rx_ring(struct e1000_adapter *adapter, | |||
| 123 | struct e1000_rx_ring *rx_ring); | 123 | struct e1000_rx_ring *rx_ring); |
| 124 | static void e1000_set_rx_mode(struct net_device *netdev); | 124 | static void e1000_set_rx_mode(struct net_device *netdev); |
| 125 | static void e1000_update_phy_info(unsigned long data); | 125 | static void e1000_update_phy_info(unsigned long data); |
| 126 | static void e1000_update_phy_info_task(struct work_struct *work); | ||
| 126 | static void e1000_watchdog(unsigned long data); | 127 | static void e1000_watchdog(unsigned long data); |
| 127 | static void e1000_82547_tx_fifo_stall(unsigned long data); | 128 | static void e1000_82547_tx_fifo_stall(unsigned long data); |
| 129 | static void e1000_82547_tx_fifo_stall_task(struct work_struct *work); | ||
| 128 | static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, | 130 | static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, |
| 129 | struct net_device *netdev); | 131 | struct net_device *netdev); |
| 130 | static struct net_device_stats * e1000_get_stats(struct net_device *netdev); | 132 | static struct net_device_stats * e1000_get_stats(struct net_device *netdev); |
| @@ -1047,7 +1049,9 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
| 1047 | adapter->phy_info_timer.function = e1000_update_phy_info; | 1049 | adapter->phy_info_timer.function = e1000_update_phy_info; |
| 1048 | adapter->phy_info_timer.data = (unsigned long)adapter; | 1050 | adapter->phy_info_timer.data = (unsigned long)adapter; |
| 1049 | 1051 | ||
| 1052 | INIT_WORK(&adapter->fifo_stall_task, e1000_82547_tx_fifo_stall_task); | ||
| 1050 | INIT_WORK(&adapter->reset_task, e1000_reset_task); | 1053 | INIT_WORK(&adapter->reset_task, e1000_reset_task); |
| 1054 | INIT_WORK(&adapter->phy_info_task, e1000_update_phy_info_task); | ||
| 1051 | 1055 | ||
| 1052 | e1000_check_options(adapter); | 1056 | e1000_check_options(adapter); |
| 1053 | 1057 | ||
| @@ -2234,6 +2238,14 @@ static void e1000_set_rx_mode(struct net_device *netdev) | |||
| 2234 | static void e1000_update_phy_info(unsigned long data) | 2238 | static void e1000_update_phy_info(unsigned long data) |
| 2235 | { | 2239 | { |
| 2236 | struct e1000_adapter *adapter = (struct e1000_adapter *)data; | 2240 | struct e1000_adapter *adapter = (struct e1000_adapter *)data; |
| 2241 | schedule_work(&adapter->phy_info_task); | ||
| 2242 | } | ||
| 2243 | |||
| 2244 | static void e1000_update_phy_info_task(struct work_struct *work) | ||
| 2245 | { | ||
| 2246 | struct e1000_adapter *adapter = container_of(work, | ||
| 2247 | struct e1000_adapter, | ||
| 2248 | phy_info_task); | ||
| 2237 | struct e1000_hw *hw = &adapter->hw; | 2249 | struct e1000_hw *hw = &adapter->hw; |
| 2238 | e1000_phy_get_info(hw, &adapter->phy_info); | 2250 | e1000_phy_get_info(hw, &adapter->phy_info); |
| 2239 | } | 2251 | } |
| @@ -2242,10 +2254,21 @@ static void e1000_update_phy_info(unsigned long data) | |||
| 2242 | * e1000_82547_tx_fifo_stall - Timer Call-back | 2254 | * e1000_82547_tx_fifo_stall - Timer Call-back |
| 2243 | * @data: pointer to adapter cast into an unsigned long | 2255 | * @data: pointer to adapter cast into an unsigned long |
| 2244 | **/ | 2256 | **/ |
| 2245 | |||
| 2246 | static void e1000_82547_tx_fifo_stall(unsigned long data) | 2257 | static void e1000_82547_tx_fifo_stall(unsigned long data) |
| 2247 | { | 2258 | { |
| 2248 | struct e1000_adapter *adapter = (struct e1000_adapter *)data; | 2259 | struct e1000_adapter *adapter = (struct e1000_adapter *)data; |
| 2260 | schedule_work(&adapter->fifo_stall_task); | ||
| 2261 | } | ||
| 2262 | |||
| 2263 | /** | ||
| 2264 | * e1000_82547_tx_fifo_stall_task - task to complete work | ||
| 2265 | * @work: work struct contained inside adapter struct | ||
| 2266 | **/ | ||
| 2267 | static void e1000_82547_tx_fifo_stall_task(struct work_struct *work) | ||
| 2268 | { | ||
| 2269 | struct e1000_adapter *adapter = container_of(work, | ||
| 2270 | struct e1000_adapter, | ||
| 2271 | fifo_stall_task); | ||
| 2249 | struct e1000_hw *hw = &adapter->hw; | 2272 | struct e1000_hw *hw = &adapter->hw; |
| 2250 | struct net_device *netdev = adapter->netdev; | 2273 | struct net_device *netdev = adapter->netdev; |
| 2251 | u32 tctl; | 2274 | u32 tctl; |
