Received: with ECARTIS (v1.0.0; list netdev); Mon, 02 Feb 2004 13:25:59 -0800 (PST) Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i12LPs7J007205 for ; Mon, 2 Feb 2004 13:25:55 -0800 Received: from petasus.fm.intel.com (petasus.fm.intel.com [10.1.192.37]) by hermes.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.14 2004/01/09 00:51:16 root Exp $) with ESMTP id i12LNKC6025261; Mon, 2 Feb 2004 21:23:20 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by petasus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.7 2003/12/18 18:58:10 root Exp $) with SMTP id i12LRXJw009703; Mon, 2 Feb 2004 21:27:33 GMT Received: from [134.134.3.50] ([134.134.3.50]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004020213254707513 ; Mon, 02 Feb 2004 13:25:47 -0800 Date: Mon, 2 Feb 2004 14:01:49 -0800 (PST) From: "Feldman, Scott" X-X-Sender: scott.feldman@localhost.localdomain Reply-To: "Feldman, Scott" To: Jeff Garzik cc: netdev@oss.sgi.com, "Feldman, Scott" Subject: [e1000 netdev-2.6 4/6] 82547 interrupt assert/de-assert re-ordering Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 2956 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scott.feldman@intel.com Precedence: bulk X-list: netdev Content-Length: 1684 Lines: 44 * 82547 needs interrupt disable/enable to keep interrupt assertion state synced between 82547 and APIC. 82547 will re-order assert and de-assert messages if hub link bus is busy (heavy traffic). Disabling interrupt on device works around re- order issue. Note: this is a re-patch. We backed out the patch because of a report on a system with a 8086:1019 device would lock up with this patch. Turns out that system was a pre-production sample. ----------- diff -Naurp netdev-2.6/drivers/net/e1000/e1000_main.c netdev-2.6/drivers/net/e1000.mod/e1000_main.c --- netdev-2.6/drivers/net/e1000/e1000_main.c 2004-02-02 12:09:08.000000000 -0800 +++ netdev-2.6/drivers/net/e1000.mod/e1000_main.c 2004-02-02 12:10:43.000000000 -0800 @@ -2119,10 +2119,26 @@ 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) + e1000_irq_disable(adapter); + for(i = 0; i < E1000_MAX_INTR; i++) if(!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;