[PATCH] e1000: Patch from Peter Kjellstroem --
Linux Kernel Mailing List <[email protected]> Thu, 24 Feb 2005 05:40:56 +0000
| Newsgroups | gmane.linux.kernel.commits.2-4 |
|---|---|
| Message-ID | <[email protected]> |
ChangeSet 1.1548.1.6, 2005/02/24 00:40:56-05:00, [email protected] [PATCH] e1000: Patch from Peter Kjellstroem -- 6 Patch from Peter Kjellstroem -- fix lockup with 82547 Signed-off-by: Mallikarjuna R Chilakala <[email protected]> Signed-off-by: Ganesh Venkatesan <[email protected]> Signed-off-by: John Ronciak <[email protected]> Signed-off-by: Jeff Garzik <[email protected]> e1000_main.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+) diff -Nru a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c --- a/drivers/net/e1000/e1000_main.c 2005-03-04 12:02:57 -08:00 +++ b/drivers/net/e1000/e1000_main.c 2005-03-04 12:02:57 -08:00 @@ -2146,10 +2146,28 @@ __netif_rx_schedule(netdev); } #else + /* Writing IMC and IMS is needed for 82547. + Due to Hub Link bus being occupied, an interrupt + de-assertion message is not able to be sent. + When an interrupt assertion message is generated later, + two messages are re-ordered and sent out. + That causes APIC to think 82547 is in de-assertion + state, while 82547 is in assertion state, resulting + in dead lock. Writing IMC forces 82547 into + de-assertion state. + */ + if(hw->mac_type == e1000_82547 || hw->mac_type == e1000_82547_rev_2){ + atomic_inc(&adapter->irq_sem); + E1000_WRITE_REG(&adapter->hw, IMC, ~0); + } + for(i = 0; i < E1000_MAX_INTR; i++) if(unlikely(!e1000_clean_rx_irq(adapter) & !e1000_clean_tx_irq(adapter))) break; + + if(hw->mac_type == e1000_82547 || hw->mac_type == e1000_82547_rev_2) + e1000_irq_enable(adapter); #endif return IRQ_HANDLED;