Received: with ECARTIS (v1.0.0; list netdev); Tue, 04 Jan 2005 10:00:37 -0800 (PST) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j04I03t6016065 for ; Tue, 4 Jan 2005 10:00:23 -0800 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id j055xe614686; Tue, 4 Jan 2005 21:59:40 -0800 Message-Id: <200501050559.j055xe614686@mail.osdl.org> Subject: [patch 05/10] r8169: missing netif_poll_enable and irq ack To: jgarzik@pobox.com Cc: davem@davemloft.net, netdev@oss.sgi.com, akpm@osdl.org, romieu@fr.zoreil.com From: akpm@osdl.org Date: Tue, 04 Jan 2005 21:59:31 -0800 X-Virus-Scanned: ClamAV 0.80/650/Sun Jan 2 19:00:02 2005 clamav-milter version 0.80j on 127.0.0.1 X-Virus-Status: Clean X-archive-position: 13401 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: akpm@osdl.org Precedence: bulk X-list: netdev From: Francois Romieu - (noticed by Jon D. Mason) rtl8169_wait_for_quiescence() needs to disable the NAPI processing but it has no reason to lock any part of the driver which would try to do the same at a later time. Let's reenable NAPI processing as soon as possible. - properly ack any aborted interruption: a reset of the device is not always enough. Signed-off-by: Francois Romieu Signed-off-by: Andrew Morton --- 25-akpm/drivers/net/r8169.c | 9 +++++++++ 1 files changed, 9 insertions(+) diff -puN drivers/net/r8169.c~r8169-missing-netif_poll_enable-and-irq-ack drivers/net/r8169.c --- 25/drivers/net/r8169.c~r8169-missing-netif_poll_enable-and-irq-ack 2005-01-04 21:57:35.938670776 -0800 +++ 25-akpm/drivers/net/r8169.c 2005-01-04 21:57:45.096278608 -0800 @@ -1743,10 +1743,19 @@ static void rtl8169_schedule_work(struct static void rtl8169_wait_for_quiescence(struct net_device *dev) { + struct rtl8169_private *tp = netdev_priv(dev); + void __iomem *ioaddr = tp->mmio_addr; + synchronize_irq(dev->irq); /* Wait for any pending NAPI task to complete */ netif_poll_disable(dev); + + RTL_W16(IntrMask, 0x0000); + + RTL_W16(IntrStatus, 0xffff); + + netif_poll_enable(dev); } static void rtl8169_reinit_task(void *_data) _