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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18 June 2013 15:24, Manjunath Goudar <manjunath.goudar@xxxxxxxxxx> wrote:
>
>
> On 14 June 2013 01:22, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
>>
>> 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 and Tomaszas you are correct.
>
> Initially I also thought same, but later I analyzed this code is not
> necessary for all bus glue; so I did not write in ohci_suspend() routine.
>
> After Alan explanation I am writing below code end of ohci_suspend()
> routine.is it correct Alan.
>
>        if (do_wakeup && HCD_WAKEUP_PENDING(hcd)) {
>                 ohci_resume(hcd, false);
>                 rc = -EBUSY;

You probably need to return this error code.

-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux