Bug 8433 - usb_suspend and scanner canoscan n670u
Summary: usb_suspend and scanner canoscan n670u
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Alan Stern
URL:
Keywords:
Depends on:
Blocks: 7216
  Show dependency tree
 
Reported: 2007-05-06 02:47 UTC by Elmar Neugebuer
Modified: 2007-09-12 11:18 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.20, 2.6.21-git~
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
dmesg1 (11.32 KB, text/plain)
2007-05-06 02:48 UTC, Elmar Neugebuer
Details
lsusb (19.88 KB, text/plain)
2007-05-06 02:50 UTC, Elmar Neugebuer
Details

Description Elmar Neugebuer 2007-05-06 02:47:30 UTC
Most recent kernel where this bug did *NOT* occur:
Distribution: ubuntu 7.04
Hardware Environment: scanner canoscan n670u
Software Environment:
Problem Description:

Is a usual problem with scanner and usb_suspend. The differenc is after scanner
is attached it is not working if i disable autosuspend ( echo -1 >
/sys/module/usbcore/parameters/autosuspend ) it's not working too. But if i plug
out scanner, disable autosupend, plugin and enable autosupend agene ewerything
working.

May be there is nothing bother about and just blacklist my scanner for usb_suspend.
Comment 1 Elmar Neugebuer 2007-05-06 02:48:26 UTC
Created attachment 11403 [details]
dmesg1

here is dmesg after boot and with enabled autosuspend
Comment 2 Elmar Neugebuer 2007-05-06 02:50:09 UTC
Created attachment 11404 [details]
lsusb

here is verbose lsusb. but if you like shor way take just this:
Bus 001 Device 008: ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE 20
Comment 3 Alan Stern 2007-05-06 15:18:59 UTC
From the dmesg1 log, it looks like you set the autosuspend delay to 0.  That's
not a good idea; it generates lots of unnecessary suspends and resumes.  Try
leaving it at the default value of 2.

By the way, you should realize that

    echo -1 > /sys/module/usbcore/parameters/autosuspend

doesn't really disable autosuspend.  Rather, it causes autosuspend to be
disabled for new devices as they are plugged in -- but it doesn't affect the
setting for devices that are already attached.  To disable autosuspend for a
particular device you should do:

    echo -1 >/sys/bus/usb/devices/XXX/power/autosuspend

where XXX is the sysfs pathname of your device (in this case 1-2).

It would be interesting to see if the scanner really does need to be blacklisted
for suspend.  You can test that: write -1 to the usbcore parameter, then plug in
the scanner, then set the scanner's autosuspend delay to 2 and wait for it to be
suspended.  Then see if it still works.
Comment 4 Natalie Protasevich 2007-06-14 10:55:25 UTC
Elmar, did you have chance to try recommendations in #3?
Thanks!
Comment 5 Rafael J. Wysocki 2007-08-08 10:14:15 UTC
Well, I think we have not received sufficient information from the reporter.
Comment 6 Alan Stern 2007-08-08 12:31:56 UTC
We have found that many, many scanners don't like to be suspended.  The current development kernel has a blacklist entry for this scanner.  In the end we may blacklist the entire class.

Elmar, do you have anything new to report?  Otherwise this bug report will be closed in a few days.
Comment 7 Rafael J. Wysocki 2007-09-12 10:06:03 UTC
(In reply to comment #6)
> Elmar, do you have anything new to report?  Otherwise this bug report will be
> closed in a few days.

Can you close it, please?
 
Comment 8 Alan Stern 2007-09-12 11:18:57 UTC
The scanner in question has been added to the quirks list.  Closing the bug report.

Note You need to log in before you can comment on or make changes to this bug.