Re: [PATCH v2 1/3] usb: notify hcd when USB device suspend or resume

From: Alan Stern
Date: Thu May 07 2015 - 10:34:25 EST


On Thu, 7 May 2015, Lu, Baolu wrote:

> >> + void (*device_suspend)(struct usb_hcd *, struct usb_device *udev,
> >> + pm_message_t msg);
> >> + void (*device_resume)(struct usb_hcd *, struct usb_device *udev,
> >> + pm_message_t msg);
> >> };
> > Your callbacks don't use the msg argument. What makes you think it is
> > needed?
>
> This msg argument is valuable. XHCI spec defines a capability named FSC
> (Force Save context Capability). When this capability is implemented, the
> Save State operation (do during host suspend) shall save any cached Slot,
> Endpoint, Stream or other Context information to memory. xHCI hcd could
> use this "msg" to determine whether it needs to issue stop endpoint with
> SP (suspend) bit set.

I don't understand. What is the advantage of using FSC?

How would xhci-hcd use "msg" to determine this? And why doesn't your
2/3 patch already do it?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/