Hi,
On Wed, Oct 24, 2012 at 12:28:07PM -0400, Alan Stern wrote:
> On Wed, 24 Oct 2012, Felipe Balbi wrote:
>
> > > We see that after making the below change in "ohci_irq", the device
> > > gets detected.
> > > ---------------------------------------------------------------------------------------------------
> > > --- a/drivers/usb/host/ohci-hcd.c
> > > +++ b/drivers/usb/host/ohci-hcd.c
> > > @@ -819,7 +819,7 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
> > > * to turn on RHSC along with RD. But for remote wakeup events
> > > * this might not happen.
> > > */
> > > - else if (ints & OHCI_INTR_RD) {
> > > + if (ints & OHCI_INTR_RD) {
> > > ---------------------------------------------------------------------------------------------------
> > > Even in the OHCI specification (Sec 5.3 page 80), it is recommended to
> > > check individual bits
> > > (RHSC and RD).
> > >
> > > Can you please let us know if this change is valid and will not cause
> > > any regression?
> >
> > This change makes sense to me. Unless we are dead sure those IRQ bits
> > are mutually exclusive.
>
> They are not mutually exclusive. That's the problem. Basically it
> comes down to this:
>
> if (OHCI_INTR_RHSC is set) {
> do A;
> do B;
> } else if (OHCI_INTR_RD is set)
> do B;
>
> Since the bits aren't mutually exclusive, you can see that without the
> "else" we would end up doing B twice.aha, I see... should've read the code to see that detail. -- balbi
signature.asc
Description: Digital signature
