From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752187AbbEGOeW (ORCPT ); Thu, 7 May 2015 10:34:22 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:42275 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750851AbbEGOeV (ORCPT ); Thu, 7 May 2015 10:34:21 -0400 Date: Thu, 7 May 2015 10:34:20 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: "Lu, Baolu" cc: Greg Kroah-Hartman , Mathias Nyman , , Subject: Re: [PATCH v2 1/3] usb: notify hcd when USB device suspend or resume In-Reply-To: <554AB169.4060100@linux.intel.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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