Re: [PATCH 3/3] IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

David Brownell
2006-10-02T23:00:30Z

On Monday 02 October 2006 2:34 pm, Alan Stern wrote:
> On Mon, 2 Oct 2006, David Brownell wrote:
>
> > > > (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
> > > > something different depending on whether it's been supplied with a regs
> > > > pointer or not.
> >
> > gaak! where did that come from? I'll be surprised if removing
> > that causes any problem at all.
>
> Here's the statement in question:
>
> if (likely (regs && HC_IS_RUNNING(ohci_to_hcd(ohci)->state))) {

Where as I said, removing the "regs &&" should be just fine.
(Is the plan that David Howells re-issue that patch? If so, I'l
expect e will just fix it that way...)

> ...
>
> Notice another questionable use of hcd->state.

Questionable in what way? When that code is called to clean up
after driver death, that loop must be ignored ... every pending I/O
can safely be scrubbed. That's the main point of that particular
HC_IS_RUNNING() test. In other cases, it's essential not to touch
DMA queue entries that the host controller is still using.

- Dave