Received: with ECARTIS (v1.0.0; list netdev); Tue, 15 Feb 2005 13:29:12 -0800 (PST) Received: from fmsfmr006.fm.intel.com (fmr16.intel.com [192.55.52.70]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j1FLT8Tq031360 for ; Tue, 15 Feb 2005 13:29:08 -0800 Received: from fmsfmr100.fm.intel.com (fmsfmr100.fm.intel.com [10.1.192.58]) by fmsfmr006.fm.intel.com (8.12.10/8.12.10/d: major-outer.mc,v 1.1 2004/09/17 17:50:56 root Exp $) with ESMTP id j1FLT3m5025618; Tue, 15 Feb 2005 21:29:03 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by fmsfmr100.fm.intel.com (8.12.10/8.12.10/d: major-inner.mc,v 1.2 2004/09/17 18:05:01 root Exp $) with SMTP id j1FLSnLv003212; Tue, 15 Feb 2005 21:29:02 GMT Received: from isotope.jf.intel.com ([10.23.35.8]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2005021513290207669 ; Tue, 15 Feb 2005 13:29:02 -0800 Date: Tue, 15 Feb 2005 13:29:02 -0800 (PST) From: Malli Chilakala To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH net-drivers-2.6 6/10] e1000: Patch from Peter Kjellstroem -- fix lockup with 82547 Message-ID: ReplyTo: "Malli Chilakala" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.44 X-Virus-Scanned: ClamAV version 0.81, clamav-milter version 0.81b on oss.sgi.com X-Virus-Status: Clean X-archive-position: 1664 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mallikarjuna.chilakala@intel.com Precedence: bulk X-list: netdev Content-Length: 1516 Lines: 39 6 Patch from Peter Kjellstroem -- fix lockup with 82547 Signed-off-by: Mallikarjuna R Chilakala Signed-off-by: Ganesh Venkatesan Signed-off-by: John Ronciak diff -up net-drivers-2.6/drivers/net/e1000/e1000_main.c net-drivers-2.6/drivers/net/e1000.new/e1000_main.c --- net-drivers-2.6/drivers/net/e1000/e1000_main.c 2005-02-01 23:10:24.989105880 -0800 +++ net-drivers-2.6/drivers/net/e1000.new/e1000_main.c 2005-02-01 23:10:26.709844288 -0800 @@ -2165,10 +2165,28 @@ e1000_intr(int irq, void *data, struct p __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;