linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: sysfs-bus-usb: update power/persist description
@ 2014-06-24  9:33 Paul Bolle
  2014-06-24 14:15 ` Alan Stern
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Bolle @ 2014-06-24  9:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Stern; +Cc: linux-api, linux-usb, linux-kernel

There's no power/persist file for hubs. And CONFIG_USB_PERSIST was
removed in v2.6.26. Update the description of power/persist accordingly.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
I don't know anything about USB-Persist. Could Greg and Alan please
check whether the new description does actually match reality?

 Documentation/ABI/stable/sysfs-bus-usb | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Documentation/ABI/stable/sysfs-bus-usb b/Documentation/ABI/stable/sysfs-bus-usb
index a6b685724740..a61d04b8fc78 100644
--- a/Documentation/ABI/stable/sysfs-bus-usb
+++ b/Documentation/ABI/stable/sysfs-bus-usb
@@ -3,13 +3,13 @@ Date:		May 2007
 KernelVersion:	2.6.23
 Contact:	Alan Stern <stern@rowland.harvard.edu>
 Description:
-		If CONFIG_USB_PERSIST is set, then each USB device directory
-		will contain a file named power/persist.  The file holds a
-		boolean value (0 or 1) indicating whether or not the
-		"USB-Persist" facility is enabled for the device.  Since the
-		facility is inherently dangerous, it is disabled by default
-		for all devices except hubs.  For more information, see
-		Documentation/usb/persist.txt.
+		USB device directories for all devices except hubs will contain
+		a file named power/persist.  The file holds a boolean value (0
+		or 1) indicating whether or not the "USB-Persist" facility is
+		enabled for the device.  Since the facility is inherently
+		dangerous, it is disabled by default.  For hubs this facility is
+		always enabled making the file pointless.  For more information,
+		see Documentation/usb/persist.txt.
 
 What:		/sys/bus/usb/devices/.../power/autosuspend
 Date:		March 2007
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Documentation: sysfs-bus-usb: update power/persist description
  2014-06-24  9:33 [PATCH] Documentation: sysfs-bus-usb: update power/persist description Paul Bolle
@ 2014-06-24 14:15 ` Alan Stern
  2014-06-24 16:54   ` Paul Bolle
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Stern @ 2014-06-24 14:15 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Greg Kroah-Hartman, linux-api, linux-usb, linux-kernel

On Tue, 24 Jun 2014, Paul Bolle wrote:

> There's no power/persist file for hubs. And CONFIG_USB_PERSIST was
> removed in v2.6.26. Update the description of power/persist accordingly.
> 
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> I don't know anything about USB-Persist. Could Greg and Alan please
> check whether the new description does actually match reality?

Not exactly.  More details below.

>  Documentation/ABI/stable/sysfs-bus-usb | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/ABI/stable/sysfs-bus-usb b/Documentation/ABI/stable/sysfs-bus-usb
> index a6b685724740..a61d04b8fc78 100644
> --- a/Documentation/ABI/stable/sysfs-bus-usb
> +++ b/Documentation/ABI/stable/sysfs-bus-usb
> @@ -3,13 +3,13 @@ Date:		May 2007
>  KernelVersion:	2.6.23
>  Contact:	Alan Stern <stern@rowland.harvard.edu>
>  Description:
> -		If CONFIG_USB_PERSIST is set, then each USB device directory
> -		will contain a file named power/persist.  The file holds a
> -		boolean value (0 or 1) indicating whether or not the
> -		"USB-Persist" facility is enabled for the device.  Since the
> -		facility is inherently dangerous, it is disabled by default
> -		for all devices except hubs.  For more information, see
> -		Documentation/usb/persist.txt.
> +		USB device directories for all devices except hubs will contain
> +		a file named power/persist.  The file holds a boolean value (0
> +		or 1) indicating whether or not the "USB-Persist" facility is
> +		enabled for the device.  Since the facility is inherently
> +		dangerous, it is disabled by default.  For hubs this facility is
> +		always enabled making the file pointless.  For more information,
> +		see Documentation/usb/persist.txt.

Instead of depending on CONFIG_USB_PERSIST, the power/persist attribute
depends on CONFIG_PM.  But pointing that out would be redundant, since
the power/ device directory itself doesn't exist unless CONFIG_PM is
enabled.

The default value for the persist facility depends on the setting of 
CONFIG_USB_DEFAULT_PERSIST.  If that symbol is set then persist is 
enabled by default for all devices, except those which have the 
USB_QUIRK_RESET flag set (meaning that they will morph or change modes 
when reset).  If the symbol is not set then persist is enabled by 
default only for hubs.

Thanks for the documentation update.

Alan Stern


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Documentation: sysfs-bus-usb: update power/persist description
  2014-06-24 14:15 ` Alan Stern
@ 2014-06-24 16:54   ` Paul Bolle
  2014-06-24 17:17     ` Alan Stern
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Bolle @ 2014-06-24 16:54 UTC (permalink / raw)
  To: Alan Stern; +Cc: Greg Kroah-Hartman, linux-api, linux-usb, linux-kernel

On Tue, 2014-06-24 at 10:15 -0400, Alan Stern wrote:
> The default value for the persist facility depends on the setting of 
> CONFIG_USB_DEFAULT_PERSIST.  If that symbol is set then persist is 
> enabled by default for all devices, except those which have the 
> USB_QUIRK_RESET flag set (meaning that they will morph or change modes 
> when reset).  If the symbol is not set then persist is enabled by 
> default only for hubs.
> 
> Thanks for the documentation update.

You do expect a v2 updated to reflect your comments, don't you?


Paul Bolle 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Documentation: sysfs-bus-usb: update power/persist description
  2014-06-24 16:54   ` Paul Bolle
@ 2014-06-24 17:17     ` Alan Stern
  2014-07-02 10:10       ` [PATCH v2] " Paul Bolle
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Stern @ 2014-06-24 17:17 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Greg Kroah-Hartman, linux-api, linux-usb, linux-kernel

On Tue, 24 Jun 2014, Paul Bolle wrote:

> On Tue, 2014-06-24 at 10:15 -0400, Alan Stern wrote:
> > The default value for the persist facility depends on the setting of 
> > CONFIG_USB_DEFAULT_PERSIST.  If that symbol is set then persist is 
> > enabled by default for all devices, except those which have the 
> > USB_QUIRK_RESET flag set (meaning that they will morph or change modes 
> > when reset).  If the symbol is not set then persist is enabled by 
> > default only for hubs.
> > 
> > Thanks for the documentation update.
> 
> You do expect a v2 updated to reflect your comments, don't you?

It would be nice.

Alan Stern


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] Documentation: sysfs-bus-usb: update power/persist description
  2014-06-24 17:17     ` Alan Stern
@ 2014-07-02 10:10       ` Paul Bolle
  2014-07-02 14:36         ` Alan Stern
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Bolle @ 2014-07-02 10:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Stern; +Cc: linux-api, linux-usb, linux-kernel

There's no power/persist file for hubs. And CONFIG_USB_PERSIST was
removed in v2.6.26. Update the description of power/persist accordingly.
Also remove the line on its default value. It is not entirely correct, as
CONFIG_USB_DEFAULT_PERSIST and the USB_QUIRK_RESET flag influence the
default. It is not needed to understand this file anyhow.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
v2: incorporate Alan's feedback. The clearest way to do that was to not
mention the default value at all. Trying to do handle the default
correctly made the text way too complicated. I hope Alan agrees.

Perhaps the line on hubs should not be added, as the text now states
that device directories "can" contain this file.

 Documentation/ABI/stable/sysfs-bus-usb | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Documentation/ABI/stable/sysfs-bus-usb b/Documentation/ABI/stable/sysfs-bus-usb
index a6b685724740..e2bc700a6f9c 100644
--- a/Documentation/ABI/stable/sysfs-bus-usb
+++ b/Documentation/ABI/stable/sysfs-bus-usb
@@ -3,13 +3,13 @@ Date:		May 2007
 KernelVersion:	2.6.23
 Contact:	Alan Stern <stern@rowland.harvard.edu>
 Description:
-		If CONFIG_USB_PERSIST is set, then each USB device directory
-		will contain a file named power/persist.  The file holds a
-		boolean value (0 or 1) indicating whether or not the
-		"USB-Persist" facility is enabled for the device.  Since the
-		facility is inherently dangerous, it is disabled by default
-		for all devices except hubs.  For more information, see
-		Documentation/usb/persist.txt.
+		USB device directories can contain a file named power/persist.
+		The file holds a boolean value (0 or 1) indicating whether or
+		not the "USB-Persist" facility is enabled for the device.  For
+		hubs this facility is always enabled and their device
+		directories will not contain this file.
+
+		For more information, see Documentation/usb/persist.txt.
 
 What:		/sys/bus/usb/devices/.../power/autosuspend
 Date:		March 2007
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] Documentation: sysfs-bus-usb: update power/persist description
  2014-07-02 10:10       ` [PATCH v2] " Paul Bolle
@ 2014-07-02 14:36         ` Alan Stern
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Stern @ 2014-07-02 14:36 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Greg Kroah-Hartman, linux-api, linux-usb, linux-kernel

On Wed, 2 Jul 2014, Paul Bolle wrote:

> There's no power/persist file for hubs. And CONFIG_USB_PERSIST was
> removed in v2.6.26. Update the description of power/persist accordingly.
> Also remove the line on its default value. It is not entirely correct, as
> CONFIG_USB_DEFAULT_PERSIST and the USB_QUIRK_RESET flag influence the
> default. It is not needed to understand this file anyhow.
> 
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> v2: incorporate Alan's feedback. The clearest way to do that was to not
> mention the default value at all. Trying to do handle the default
> correctly made the text way too complicated. I hope Alan agrees.
> 
> Perhaps the line on hubs should not be added, as the text now states
> that device directories "can" contain this file.
> 
>  Documentation/ABI/stable/sysfs-bus-usb | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/ABI/stable/sysfs-bus-usb b/Documentation/ABI/stable/sysfs-bus-usb
> index a6b685724740..e2bc700a6f9c 100644
> --- a/Documentation/ABI/stable/sysfs-bus-usb
> +++ b/Documentation/ABI/stable/sysfs-bus-usb
> @@ -3,13 +3,13 @@ Date:		May 2007
>  KernelVersion:	2.6.23
>  Contact:	Alan Stern <stern@rowland.harvard.edu>
>  Description:
> -		If CONFIG_USB_PERSIST is set, then each USB device directory
> -		will contain a file named power/persist.  The file holds a
> -		boolean value (0 or 1) indicating whether or not the
> -		"USB-Persist" facility is enabled for the device.  Since the
> -		facility is inherently dangerous, it is disabled by default
> -		for all devices except hubs.  For more information, see
> -		Documentation/usb/persist.txt.
> +		USB device directories can contain a file named power/persist.
> +		The file holds a boolean value (0 or 1) indicating whether or
> +		not the "USB-Persist" facility is enabled for the device.  For
> +		hubs this facility is always enabled and their device
> +		directories will not contain this file.
> +
> +		For more information, see Documentation/usb/persist.txt.
>  
>  What:		/sys/bus/usb/devices/.../power/autosuspend
>  Date:		March 2007
> 

Acked-by: Alan Stern <stern@rowland.harvard.edu>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-02 14:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-24  9:33 [PATCH] Documentation: sysfs-bus-usb: update power/persist description Paul Bolle
2014-06-24 14:15 ` Alan Stern
2014-06-24 16:54   ` Paul Bolle
2014-06-24 17:17     ` Alan Stern
2014-07-02 10:10       ` [PATCH v2] " Paul Bolle
2014-07-02 14:36         ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).