Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758238AbYGAOLU (ORCPT ); Tue, 1 Jul 2008 10:11:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755193AbYGAOLI (ORCPT ); Tue, 1 Jul 2008 10:11:08 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:51650 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754566AbYGAOLH (ORCPT ); Tue, 1 Jul 2008 10:11:07 -0400 Date: Tue, 1 Jul 2008 10:11:03 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Stefan Becker cc: ext David Brownell , , , Linus Torvalds Subject: Re: [PATCH] USB: fix interrupt disabling for HCDs with shared interrupt handlers In-Reply-To: <48694F9A.4010008@nokia.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1740 Lines: 56 On Tue, 1 Jul 2008, Stefan Becker wrote: > It is, put the rain pouring down on my house is keeping me awake :-) > > Looks like you posted the same changes though... A few minor problems... You should post a revised patch with CC: to Greg KH. It makes things a little easier if you can put the patch in the body of the email message instead of attaching it. > --- a/drivers/usb/core/hcd.c > +++ b/drivers/usb/core/hcd.c > @@ -1683,20 +1683,27 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum); > */ > irqreturn_t usb_hcd_irq (int irq, void *__hcd) > { > - struct usb_hcd *hcd = __hcd; > - int start = hcd->state; > + struct usb_hcd *hcd = __hcd; > + unsigned int flags = 0; flags must be unsigned long. You don't have to initialize it to 0. > + irqreturn_t rc; > > - if (unlikely(start == HC_STATE_HALT || > - !test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) > - return IRQ_NONE; > - if (hcd->driver->irq (hcd) == IRQ_NONE) > - return IRQ_NONE; > + local_irq_save(flags); > > - set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); > + if (unlikely(hcd->state == HC_STATE_HALT || > + !test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) { > + rc = IRQ_NONE; > + } else if (hcd->driver->irq (hcd) == IRQ_NONE) { The space after "irq" should be removed. > + rc = IRQ_NONE; > + } else { > + set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); > + > + if (unlikely(hcd->state == HC_STATE_HALT)) > + usb_hc_died (hcd); The space after "died" should be removed. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/