[PATCH V2 05/10] USB: OHCI: Properly handle ohci-exynos suspend

Alan Stern stern at rowland.harvard.edu
Thu Jun 13 15:52:16 EDT 2013


On Thu, 13 Jun 2013, Tomasz Figa wrote:

> > +	rc = ohci_suspend(hcd, do_wakeup);
> > +	if (rc == 0 && do_wakeup && HCD_WAKEUP_PENDING(hcd)) {
> > +		ohci_resume(hcd, false);
> > +		rc = -EBUSY;
> > +	}
> 
> I'm not into USB host subsystem, so I might just ask a stupid question.
> 
> Can't we make ohci_suspend check this for us, so the drivers would just 
> check for error code? It seems like in all your patches this part of code 
> is duplicated, looking as a good candidate to be generic.

Argh!  You're right, of course.

I didn't see it, because the only existing place where this check is 
made is in the PCI glue layer.  Pushing it into the HCDs themselves is 
obviously the right thing to do.

Manjanuth, let's do this.  You can write a preliminary patch that puts 
this check at the end of the ohci_suspend() routine, and then resubmit 
your series.

Alan Stern




More information about the linux-arm-kernel mailing list