Re: [PATCH 1/2] smsc75xx: refactor entering suspend modes

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

 



On Tue, 27 Nov 2012, Bjørn Mork wrote:

> Steve Glendinning <steve@xxxxxxxxxxx> writes:
> 
> > Hi Bjorn,
> >
> > On 27 November 2012 17:21, Steve Glendinning <steve@xxxxxxxxxxx> wrote:
> >> Hi Bjorn,
> >>
> >>>> +     smsc75xx_set_feature(dev, USB_DEVICE_REMOTE_WAKEUP);
> >>>
> >>> As mentioned in another comment to the smsc95xx driver: This is weird.
> >>> Do you really need to do that?
> >>>
> >>> This is an USB interface driver.  The USB device is handled by the
> >>> generic "usb" driver, which will do the right thing.  See
> >>> drivers/usb/generic.c and drivers/usb/core/hub.c
> >>
> >> Thanks, I've tested removing all these calls from the driver and
> >> wakeup functionality seems to still work.
> >>
> >> I'll resubmit my smsc75xx enhancement patchset with this change once
> >> I've done some more testing.
> >
> > Further testing shows that removing these calls stop wakeup from
> > system suspend working (although don't appear to impact runtime
> > autosuspend).  Have I missed a flag or somewhere that causes
> > udev->do_remote_wakeup to be set in the code you posted?
> 
> udev->do_remote_wakeup is set in choose_wakeup() in
> drivers/usb/core/driver.c.  AFAICS it is always set as long as
> device_may_wakeup(&udev->dev) is true.

That's right.  But is device_may_wakeup(&udev->dev) true?

By default it wouldn't be.  The normal way to set it is for the user or 
a program to do:

	echo enabled >/sys/bus/usb/devices/.../power/wakeup

Of course, a driver could disregard the user's choice and set the flag 
by itself.

Alan Stern

--
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