aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000/e1000.h3
-rw-r--r--drivers/net/e1000/e1000_main.c15
2 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 148930d4e9bd..da055520daa0 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -257,5 +257,8 @@ struct e1000_adapter {
257 257
258 258
259 int msg_enable; 259 int msg_enable;
260#ifdef CONFIG_PCI_MSI
261 boolean_t have_msi;
262#endif
260}; 263};
261#endif /* _E1000_H_ */ 264#endif /* _E1000_H_ */
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 82549a6fcfb3..03e3ec74f3fb 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -312,6 +312,16 @@ e1000_up(struct e1000_adapter *adapter)
312 e1000_configure_rx(adapter); 312 e1000_configure_rx(adapter);
313 e1000_alloc_rx_buffers(adapter); 313 e1000_alloc_rx_buffers(adapter);
314 314
315#ifdef CONFIG_PCI_MSI
316 if(adapter->hw.mac_type > e1000_82547_rev_2) {
317 adapter->have_msi = TRUE;
318 if((err = pci_enable_msi(adapter->pdev))) {
319 DPRINTK(PROBE, ERR,
320 "Unable to allocate MSI interrupt Error: %d\n", err);
321 adapter->have_msi = FALSE;
322 }
323 }
324#endif
315 if((err = request_irq(adapter->pdev->irq, &e1000_intr, 325 if((err = request_irq(adapter->pdev->irq, &e1000_intr,
316 SA_SHIRQ | SA_SAMPLE_RANDOM, 326 SA_SHIRQ | SA_SAMPLE_RANDOM,
317 netdev->name, netdev))) 327 netdev->name, netdev)))
@@ -333,6 +343,11 @@ e1000_down(struct e1000_adapter *adapter)
333 343
334 e1000_irq_disable(adapter); 344 e1000_irq_disable(adapter);
335 free_irq(adapter->pdev->irq, netdev); 345 free_irq(adapter->pdev->irq, netdev);
346#ifdef CONFIG_PCI_MSI
347 if(adapter->hw.mac_type > e1000_82547_rev_2 &&
348 adapter->have_msi == TRUE)
349 pci_disable_msi(adapter->pdev);
350#endif
336 del_timer_sync(&adapter->tx_fifo_stall_timer); 351 del_timer_sync(&adapter->tx_fifo_stall_timer);
337 del_timer_sync(&adapter->watchdog_timer); 352 del_timer_sync(&adapter->watchdog_timer);
338 del_timer_sync(&adapter->phy_info_timer); 353 del_timer_sync(&adapter->phy_info_timer);