Distribution: Ubuntu 7.04
Hardware Environment: scnanner Epson Perfection 1670 + USB ICH7
Software Environment: sane, kernel
Scanner will freeze if it used on kernel compiled with USB_SUSPEND support.
It's looks like this:
This is OK:
This happen with USB_SUSPEND:
Steps to reproduce:
1. Use USB_SUSPEND enabled kernel, like default kernel in Ubuntu 7.04
or kompile vanila kernel.
2. Attach scanner and execute ~# scanimage -d snapscan > test.pnm
Created attachment 10829 [details]
[ 129.919768] hub 3-0:1.0: hub_suspend
[ 129.919774] usb usb3: suspend_rh
[ 129.919777] usb usb3: usb auto-suspend
[ 187.245691] usbdev5.3_ep81: ep_device_release called for usbdev5.3_ep81
<---- scanner freeze here!!!
[ 187.246291] usbdev5.3_ep02: ep_device_release called for usbdev5.3_ep02
[ 187.246876] usbdev5.3_ep83: ep_device_release called for usbdev5.3_ep83
[ 189.247786] usb 5-3: usb auto-suspend
It's issue uppears on ehci and uhci.
I seems like with start of scanimage usb device waked up, and after scanimage
exit device will be suspend. The problem is scanimage exit before divice is ready:
scanimage start -------scan--------> scanimage exit
now scanner should by it self go back to ready mode:
scanimage exit ----go back---------> ready to the next scan
but after scanimage exit in about 2 seconds , kernel think there is nothink
happening on this device and put it sleep (kill it).
scanimage exit ----2 sec.--X
on solution is to fix sane. but it's looks like sane can't check if scanner is
done or not. Some think like sleep(8) funktion is needed to sane before exit or
kernel before usb_suspend.
The best USB_SUSPEND for scanner is about 15min, bocous after suspen it need
warming up about 40 secons ( it is a lot of time, if you sacann some images with
interwal about 5 min ).
Created attachment 10836 [details]
fixed in main stream.