Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-09-13 Thread Greg KH
On Wed, Sep 12, 2007 at 10:33:48PM -0400, Mark Lord wrote:
> Greg KH wrote:
>>
>> There are many regressions right now, _ONLY_ if you enable
>> CONFIG_USB_SUSPEND.  If you disable that, your problems will go away,
>> right?
> ..
>> 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.
>
> Ubuntu has CONFIG_USB_SUSPEND=y

They also have a patch that disables suspend automatically for all
devices except USB hubs.  Same goes for Red Hat's rawhide kernel.

> There are probably lots of other distros that use it as well.

Not without the above mentioned patch they do not :)

> This new behaviour (failed operation of USB flash keys) is a *new* 
> regression
> in 2.6.23, and we still have time to fix it by either reverting the changed
> functionality, or by changing the code to default OFF.

I now agree.

> Here's my patch for 2.6.23-rc6+ :
>
> Fix USB Storage failures.
>
> Signed-Off-By:  Mark Lord <[EMAIL PROTECTED]>

That's way too simple, I want to revert the whole usb-storage suspend
logic as Oliver has found some core problems with it working properly,
even with devices that have no problems.

Is that ok for you?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-09-13 Thread Greg KH
On Wed, Sep 12, 2007 at 10:33:48PM -0400, Mark Lord wrote:
 Greg KH wrote:

 There are many regressions right now, _ONLY_ if you enable
 CONFIG_USB_SUSPEND.  If you disable that, your problems will go away,
 right?
 ..
 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.

 Ubuntu has CONFIG_USB_SUSPEND=y

They also have a patch that disables suspend automatically for all
devices except USB hubs.  Same goes for Red Hat's rawhide kernel.

 There are probably lots of other distros that use it as well.

Not without the above mentioned patch they do not :)

 This new behaviour (failed operation of USB flash keys) is a *new* 
 regression
 in 2.6.23, and we still have time to fix it by either reverting the changed
 functionality, or by changing the code to default OFF.

I now agree.

 Here's my patch for 2.6.23-rc6+ :

 Fix USB Storage failures.

 Signed-Off-By:  Mark Lord [EMAIL PROTECTED]

That's way too simple, I want to revert the whole usb-storage suspend
logic as Oliver has found some core problems with it working properly,
even with devices that have no problems.

Is that ok for you?

thanks,

greg k-h
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-09-12 Thread Mark Lord

Greg KH wrote:


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

..

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.


Ubuntu has CONFIG_USB_SUSPEND=y

There are probably lots of other distros that use it as well.

This new behaviour (failed operation of USB flash keys) is a *new* regression
in 2.6.23, and we still have time to fix it by either reverting the changed
functionality, or by changing the code to default OFF.

Here's my patch for 2.6.23-rc6+ :

Fix USB Storage failures.

Signed-Off-By:  Mark Lord <[EMAIL PROTECTED]>
---

--- linux/drivers/usb/storage/usb.c.orig2007-09-11 11:52:14.0 
-0400
+++ linux/drivers/usb/storage/usb.c 2007-09-12 18:18:35.0 -0400
@@ -1065,7 +1065,7 @@
.pre_reset =storage_pre_reset,
.post_reset =   storage_post_reset,
.id_table = storage_usb_ids,
-   .supports_autosuspend = 1,
+   .supports_autosuspend = 0,
};

static int __init usb_stor_init(void)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-09-12 Thread Mark Lord

Greg KH wrote:

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 <[EMAIL PROTECTED]> 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.0 +0200
+++ b/drivers/usb/core/quirks.c 2007-08-14 20:30:28.0 +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.


CONFIG_USB_SUSPEND is *not* a new config option.
It's been around for quite some time now, and I also had it
enabled in 2.6.22 without any troubles.  Definite regression here, folks!

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


Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-09-12 Thread Greg KH
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 <[EMAIL PROTECTED]> 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.0 +0200
>> +++ b/drivers/usb/core/quirks.c  2007-08-14 20:30:28.0 +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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-09-12 Thread Mark Lord

Oliver Neukum wrote:

Am Dienstag 14 August 2007 schrieb Paolo Ornati:

On Tue, 14 Aug 2007 17:46:16 +0200
Oliver Neukum <[EMAIL PROTECTED]> 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.0 +0200
+++ b/drivers/usb/core/quirks.c 2007-08-14 20:30:28.0 +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.

Andrew, Linus?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-09-12 Thread Mark Lord

Oliver Neukum wrote:

Am Dienstag 14 August 2007 schrieb Paolo Ornati:

On Tue, 14 Aug 2007 17:46:16 +0200
Oliver Neukum [EMAIL PROTECTED] 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.0 +0200
+++ b/drivers/usb/core/quirks.c 2007-08-14 20:30:28.0 +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.

Andrew, Linus?
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-09-12 Thread Greg KH
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 [EMAIL PROTECTED] 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.0 +0200
 +++ b/drivers/usb/core/quirks.c  2007-08-14 20:30:28.0 +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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-09-12 Thread Mark Lord

Greg KH wrote:

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 [EMAIL PROTECTED] 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.0 +0200
+++ b/drivers/usb/core/quirks.c 2007-08-14 20:30:28.0 +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.


CONFIG_USB_SUSPEND is *not* a new config option.
It's been around for quite some time now, and I also had it
enabled in 2.6.22 without any troubles.  Definite regression here, folks!

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


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-09-12 Thread Mark Lord

Greg KH wrote:


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

..

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.


Ubuntu has CONFIG_USB_SUSPEND=y

There are probably lots of other distros that use it as well.

This new behaviour (failed operation of USB flash keys) is a *new* regression
in 2.6.23, and we still have time to fix it by either reverting the changed
functionality, or by changing the code to default OFF.

Here's my patch for 2.6.23-rc6+ :

Fix USB Storage failures.

Signed-Off-By:  Mark Lord [EMAIL PROTECTED]
---

--- linux/drivers/usb/storage/usb.c.orig2007-09-11 11:52:14.0 
-0400
+++ linux/drivers/usb/storage/usb.c 2007-09-12 18:18:35.0 -0400
@@ -1065,7 +1065,7 @@
.pre_reset =storage_pre_reset,
.post_reset =   storage_post_reset,
.id_table = storage_usb_ids,
-   .supports_autosuspend = 1,
+   .supports_autosuspend = 0,
};

static int __init usb_stor_init(void)
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-08-14 Thread Paolo Ornati
On Tue, 14 Aug 2007 20:33:22 +0200
Oliver Neukum <[EMAIL PROTECTED]> wrote:

> Exactly. This is not reliable. It needs to be done in kernel. This patch
> should do it.

ok, this one works  :)

I suspect that there are many more broken devices out there ;)


thanks,

-- 
Paolo Ornati
Linux 2.6.23-rc3-gbfefa254 on x86_64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-08-14 Thread Oliver Neukum
Am Dienstag 14 August 2007 schrieb Paolo Ornati:
> On Tue, 14 Aug 2007 17:46:16 +0200
> Oliver Neukum <[EMAIL PROTECTED]> 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.0 +0200
+++ b/drivers/usb/core/quirks.c 2007-08-14 20:30:28.0 +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 */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-08-14 Thread Paolo Ornati
On Tue, 14 Aug 2007 17:46:16 +0200
Oliver Neukum <[EMAIL PROTECTED]> 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).

-- 
Paolo Ornati
Linux 2.6.23-rc3 on x86_64


dmesg.gz
Description: GNU Zip compressed data


Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-08-14 Thread Oliver Neukum
Am Dienstag 14 August 2007 schrieb Paolo Ornati:
> Hewlett-Packard PhotoSmart 720 / PhotoSmart 935 (storage)

Please try this patch.

Regards
Oliver

-

--- a/drivers/usb/core/quirks.c 2007-08-14 17:42:22.0 +0200
+++ b/drivers/usb/core/quirks.c 2007-08-14 17:43:51.0 +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_RESET_RESUME },
/* Acer Peripherals Inc. (now BenQ Corp.) Prisa 640BU */
{ USB_DEVICE(0x04a5, 0x207e), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
/* Benq S2W 3300U */

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


Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-08-14 Thread Paolo Ornati
On Tue, 14 Aug 2007 15:30:27 +0200
Oliver Neukum <[EMAIL PROTECTED]> wrote:

> > my USB photo-camera gets automagically disconnected before I can do
> > anything with it ;)
> >   
> 
> hi,
> 
> I need vendor:product. Please provide "lsusb".
> Generally a bug report for a specific usb device without vendor:product
> is a bad idea.

oopss  :)


HP PHOTOSMART E317

tux ~ # lsusb
Bus 007 Device 001: ID :
Bus 006 Device 002: ID 03f0:4002 Hewlett-Packard PhotoSmart 720 / PhotoSmart 
935 (storage)
...

-- 
Paolo Ornati
Linux 2.6.23-rc3 on x86_64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend"

2007-08-14 Thread Oliver Neukum
Am Dienstag 14 August 2007 schrieb Paolo Ornati:
> Hi,
> 
> 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 ;)
> 

hi,

I need vendor:product. Please provide "lsusb".
Generally a bug report for a specific usb device without vendor:product
is a bad idea.

Regards
Oliver

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


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-08-14 Thread Oliver Neukum
Am Dienstag 14 August 2007 schrieb Paolo Ornati:
 Hi,
 
 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 ;)
 

hi,

I need vendor:product. Please provide lsusb.
Generally a bug report for a specific usb device without vendor:product
is a bad idea.

Regards
Oliver

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


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-08-14 Thread Paolo Ornati
On Tue, 14 Aug 2007 15:30:27 +0200
Oliver Neukum [EMAIL PROTECTED] wrote:

  my USB photo-camera gets automagically disconnected before I can do
  anything with it ;)

 
 hi,
 
 I need vendor:product. Please provide lsusb.
 Generally a bug report for a specific usb device without vendor:product
 is a bad idea.

oopss  :)


HP PHOTOSMART E317

tux ~ # lsusb
Bus 007 Device 001: ID :
Bus 006 Device 002: ID 03f0:4002 Hewlett-Packard PhotoSmart 720 / PhotoSmart 
935 (storage)
...

-- 
Paolo Ornati
Linux 2.6.23-rc3 on x86_64
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-08-14 Thread Oliver Neukum
Am Dienstag 14 August 2007 schrieb Paolo Ornati:
 Hewlett-Packard PhotoSmart 720 / PhotoSmart 935 (storage)

Please try this patch.

Regards
Oliver

-

--- a/drivers/usb/core/quirks.c 2007-08-14 17:42:22.0 +0200
+++ b/drivers/usb/core/quirks.c 2007-08-14 17:43:51.0 +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_RESET_RESUME },
/* Acer Peripherals Inc. (now BenQ Corp.) Prisa 640BU */
{ USB_DEVICE(0x04a5, 0x207e), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
/* Benq S2W 3300U */

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


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-08-14 Thread Paolo Ornati
On Tue, 14 Aug 2007 17:46:16 +0200
Oliver Neukum [EMAIL PROTECTED] 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).

-- 
Paolo Ornati
Linux 2.6.23-rc3 on x86_64


dmesg.gz
Description: GNU Zip compressed data


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-08-14 Thread Oliver Neukum
Am Dienstag 14 August 2007 schrieb Paolo Ornati:
 On Tue, 14 Aug 2007 17:46:16 +0200
 Oliver Neukum [EMAIL PROTECTED] 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.0 +0200
+++ b/drivers/usb/core/quirks.c 2007-08-14 20:30:28.0 +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 */
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [linux-usb-devel] spontaneous disconnect with usb-storage: implement autosuspend

2007-08-14 Thread Paolo Ornati
On Tue, 14 Aug 2007 20:33:22 +0200
Oliver Neukum [EMAIL PROTECTED] wrote:

 Exactly. This is not reliable. It needs to be done in kernel. This patch
 should do it.

ok, this one works  :)

I suspect that there are many more broken devices out there ;)


thanks,

-- 
Paolo Ornati
Linux 2.6.23-rc3-gbfefa254 on x86_64
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/