LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 6/6] USB: enable USB-PERSIST by default
Date: Mon, 10 Mar 2008 17:59:12 -0700	[thread overview]
Message-ID: <1205197152-18146-6-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20080311004239.GD17890@suse.de>

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1052) enables USB-PERSIST for all devices by default.
The user won't have to remember to enable it explicitly for devices
containing mounted filesystems.

Eventually userspace tools like hal may be able to set the persist
attribute automatically when a filesystem is mounted on a USB device.
When that time comes this patch can be reverted, if people think it
matters.

This approach has the advantage of giving the user the ability to turn
off USB-PERSIST for devices with mounted filesystems, rather than
making the kernel always assume it should be on.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/core/quirks.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 10d66d0..93e12f1 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -95,12 +95,14 @@ void usb_detect_quirks(struct usb_device *udev)
 		udev->autosuspend_disabled = 1;
 #endif
 
-#ifdef	CONFIG_PM
+	/* For the present, all devices default to USB-PERSIST enabled */
+#if 0		/* was: #ifdef CONFIG_PM */
 	/* Hubs are automatically enabled for USB-PERSIST */
 	if (udev->descriptor.bDeviceClass == USB_CLASS_HUB)
 		udev->persist_enabled = 1;
+
 #else
-	/* In the absense of PM, we can safely enable USB-PERSIST
+	/* In the absence of PM, we can safely enable USB-PERSIST
 	 * for all devices.  It will affect things like hub resets
 	 * and EMF-related port disables.
 	 */
-- 
1.5.4.3


  parent reply	other threads:[~2008-03-11  1:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11  0:42 [GIT PATCH] USB suspend persistance for 2.6.25-rc5 git Greg KH
2008-03-11  0:59 ` [PATCH 1/6] USB: EHCI: carry out port handover during each root-hub resume Greg Kroah-Hartman
2008-03-11  0:59 ` [PATCH 2/6] USB: reorganize code in hub.c Greg Kroah-Hartman
2008-03-11  0:59 ` [PATCH 3/6] USB: make USB-PERSIST work after every system sleep Greg Kroah-Hartman
2008-03-11  0:59 ` [PATCH 4/6] USB: remove CONFIG_USB_PERSIST setting Greg Kroah-Hartman
2008-03-11  0:59 ` [PATCH 5/6] USB: check serial-number string after device reset Greg Kroah-Hartman
2008-03-11  0:59 ` Greg Kroah-Hartman [this message]
2008-03-19 17:05   ` [PATCH 6/6] USB: enable USB-PERSIST by default Mark Lord
2008-03-19 21:35     ` Alan Stern
2008-03-20 14:17       ` Mark Lord
2008-03-11 10:27 ` [GIT PATCH] USB suspend persistance for 2.6.25-rc5 git Pavel Machek
2008-03-11 15:28   ` Greg KH
2008-03-11 16:18   ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1205197152-18146-6-git-send-email-gregkh@suse.de \
    --to=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --subject='Re: [PATCH 6/6] USB: enable USB-PERSIST by default' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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