public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Mark Lord <lkml@rtr.ca>
Cc: Oliver Neukum <oliver@neukum.org>,
	Paolo Ornati <ornati@fastwebnet.it>,
	linux-usb-devel@lists.sourceforge.net,
	Alan Stern <stern@rowland.harvard.edu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"
Date: Wed, 12 Sep 2007 16:40:16 -0700	[thread overview]
Message-ID: <20070912234016.GA455@kroah.com> (raw)
In-Reply-To: <46E864AC.1020000@rtr.ca>

On Wed, Sep 12, 2007 at 06:14:04PM -0400, Mark Lord wrote:
> Oliver Neukum wrote:
>> Am Dienstag 14 August 2007 schrieb Paolo Ornati:
>>> On Tue, 14 Aug 2007 17:46:16 +0200
>>> Oliver Neukum <oliver@neukum.org> wrote:
>>>
>>>> Am Dienstag 14 August 2007 schrieb Paolo Ornati:
>>>>> Hewlett-Packard PhotoSmart 720 / PhotoSmart 935 (storage)  
>>>> Please try this patch.
>>> Tried on -rc3 but it doesn't work, dmesg attached.
>>>
>>> However I've found that if "hald" is running the problems doesn't
>>> happen (I think it's just hidden by the fact that hald do some polling
>>> on it preventing autosuspend to trigger).
>> Exactly. This is not reliable. It needs to be done in kernel. This patch
>> should do it.
>> 	Regards
>> 		Oliver
>> ---
>> --- a/drivers/usb/core/quirks.c	2007-08-14 17:42:22.000000000 +0200
>> +++ b/drivers/usb/core/quirks.c	2007-08-14 20:30:28.000000000 +0200
>> @@ -30,6 +30,8 @@
>>  static const struct usb_device_id usb_quirk_list[] = {
>>  	/* HP 5300/5370C scanner */
>>  	{ USB_DEVICE(0x03f0, 0x0701), .driver_info = USB_QUIRK_STRING_FETCH_255 
>> },
>> +	/* Hewlett-Packard PhotoSmart 720 / PhotoSmart 935 (storage) */
>> +	{ USB_DEVICE(0x03f0, 0x4002), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
>>  	/* Acer Peripherals Inc. (now BenQ Corp.) Prisa 640BU */
>>  	{ USB_DEVICE(0x04a5, 0x207e), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
>>  	/* Benq S2W 3300U */
>> -
>
> I believe the offending commit needs to be reverted.
> It just breaks too much stuff, including my Sandisk USB sticks.
>
>> with "CONFIG_USB_SUSPEND=y", since commit:
>> 8dfe4b14869fd185ca25ee88b02ada58a3005eaf
>>     usb-storage: implement autosuspend
>>         This patch (as930) implements autosuspend for usb-storage.  It is
>>     adapted from a patch by Oliver Neukum.  Autosuspend is allowed except
>>     during LUN scanning, resets, and command execution.
>> my USB photo-camera gets automagically disconnected before I can do
>> anything with it  ;) 
>
> Ditto for several other devices that are being slowly special-cased,
> and many that have yet to be tested.  This commit is (unfortunately)
> a disaster with many regressions.

There are many regressions right now, _ONLY_ if you enable
CONFIG_USB_SUSPEND.  If you disable that, your problems will go away,
right?

This option is a new option, and we have found out the hard way that
a very large class of hardware really does not like working with usb
suspend at all.

Because of this, we have a patch queued up for 2.6.24 that will disable
suspend for devices, and have to be enabled from a white-list that we
will put in userspace based on the history of what other operating
systems have determined are devices that can sleep properly.

I can send this patch in now to Linus, but as it changes functionality
from previous -rc patches, I've been hesitant to do so.  Especially when
a mere config option change will solve your problem.

Oh, and currently no distro will enable this option due to the hardware
problems, so the only people that could get hit by this are those who
build their own kernels, and they can easily disable the option.

Does this help explain things?

thanks,

greg k-h

  reply	other threads:[~2007-09-12 23:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-14 11:15 spontaneous disconnect with "usb-storage: implement autosuspend" Paolo Ornati
2007-08-14 13:30 ` [linux-usb-devel] " Oliver Neukum
2007-08-14 13:47   ` Paolo Ornati
2007-08-14 15:46     ` Oliver Neukum
2007-08-14 16:38       ` Paolo Ornati
2007-08-14 18:33         ` Oliver Neukum
2007-08-14 19:02           ` Paolo Ornati
2007-09-12 22:14           ` Mark Lord
2007-09-12 23:40             ` Greg KH [this message]
2007-09-13  2:29               ` Mark Lord
2007-09-13  2:33               ` Mark Lord
2007-09-13  9:40                 ` Greg KH

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=20070912234016.GA455@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=lkml@rtr.ca \
    --cc=oliver@neukum.org \
    --cc=ornati@fastwebnet.it \
    --cc=stern@rowland.harvard.edu \
    --cc=torvalds@osdl.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox