[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0807011005430.2780-100000@iolanthe.rowland.org>
Date: Tue, 1 Jul 2008 10:11:03 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Stefan Becker <Stefan.Becker@...ia.com>
cc: ext David Brownell <david-b@...bell.net>,
<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] USB: fix interrupt disabling for HCDs with shared
interrupt handlers
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists