Return-path: Received: from mail-vx0-f174.google.com ([209.85.220.174]:44430 "EHLO mail-vx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755394Ab1KPKOm convert rfc822-to-8bit (ORCPT ); Wed, 16 Nov 2011 05:14:42 -0500 Received: by vcbfk1 with SMTP id fk1so164932vcb.19 for ; Wed, 16 Nov 2011 02:14:42 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20111116100915.GA2191@redhat.com> References: <20111116100915.GA2191@redhat.com> Date: Wed, 16 Nov 2011 11:14:41 +0100 Message-ID: (sfid-20111116_111446_135101_EEED2BB7) Subject: Re: [PATCH] rt2800pci: handle spurious interrupts From: Ivo Van Doorn To: Stanislaw Gruszka Cc: "John W. Linville" , linux-wireless@vger.kernel.org, Gertjan van Wingerde , Helmut Schaa , Amir Hedayaty Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: Hi, On Wed, Nov 16, 2011 at 11:09 AM, Stanislaw Gruszka wrote: > Some devices may generate spurious interrupts, we have to handle them > otherwise interrupt line will be disabled with below message and driver > will not work: > > [ 2052.114334] irq 17: nobody cared (try booting with the "irqpoll" option) > [ 2052.114339] Pid: 0, comm: swapper Tainted: P ? ? ? ? ? 2.6.35.6-48.fc14.x86_64 #1 > [ 2052.114341] Call Trace: > [ 2052.114342] ? ?[] __report_bad_irq.clone.1+0x3d/0x8b > [ 2052.114349] ?[] note_interrupt+0x11a/0x17f > [ 2052.114352] ?[] handle_fasteoi_irq+0xa8/0xce > [ 2052.114355] ?[] handle_irq+0x88/0x90 > [ 2052.114357] ?[] do_IRQ+0x5c/0xb4 > [ 2052.114360] ?[] ret_from_intr+0x0/0x11 > [ 2052.114361] ? ?[] ? native_safe_halt+0xb/0xd > [ 2052.114366] ?[] ? need_resched+0x23/0x2d > [ 2052.114367] ?[] default_idle+0x34/0x4f > [ 2052.114370] ?[] cpu_idle+0xaa/0xcc > [ 2052.114373] ?[] start_secondary+0x24d/0x28e > [ 2052.114374] handlers: > [ 2052.114375] [] (usb_hcd_irq+0x0/0x7c) > [ 2052.114378] [] (rt2800pci_interrupt+0x0/0x18d [rt2800pci]) > [ 2052.114384] Disabling IRQ #17 > > Resolve: > https://bugzilla.redhat.com/show_bug.cgi?id=658451 > > Reported-and-tested-by: Amir Hedayaty > Cc: stable@vger.kernel.org > Signed-off-by: Stanislaw Gruszka Acked-by: Ivo van Doorn > --- > I changed rt2800pci only because get bug report for that device, not > sure if similar changes are not needed for other rt2x00 PCI devices. The ticket mentiones that the end-result is a slow connection, this is also a bug in older chipsets. So could you prepare a patch for the other drivers as well? > ?drivers/net/wireless/rt2x00/rt2800pci.c | ? ?7 ++++++- > ?1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c > index da48c8a..4dc2d0f 100644 > --- a/drivers/net/wireless/rt2x00/rt2800pci.c > +++ b/drivers/net/wireless/rt2x00/rt2800pci.c > @@ -880,8 +880,13 @@ static irqreturn_t rt2800pci_interrupt(int irq, void *dev_instance) > ? ? ? ?rt2x00pci_register_read(rt2x00dev, INT_SOURCE_CSR, ®); > ? ? ? ?rt2x00pci_register_write(rt2x00dev, INT_SOURCE_CSR, reg); > > + ? ? ? /* > + ? ? ? ?* Some devices can generate interrupts with empty CSR register, we > + ? ? ? ?* "handle" such irq's to prevent interrupt controller treat them as > + ? ? ? ?* spurious interrupts and disable irq line. > + ? ? ? ?*/ > ? ? ? ?if (!reg) > - ? ? ? ? ? ? ? return IRQ_NONE; > + ? ? ? ? ? ? ? return IRQ_HANDLED; > > ? ? ? ?if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) > ? ? ? ? ? ? ? ?return IRQ_HANDLED; > -- > 1.7.1 > >