Most recent kernel where this bug did not occur:2.6.12 possibly later Distribution:Mandriva 2007.0 Hardware Environment:PIII, coppermine Software Environment:Mandriva 2007.0 clean install all updates applied Problem Description:Stand alone USB devices (HP5300C and 5370C) no longer working with most recent kernels. Steps to reproduce:Sane backends installed, Xsane frontend, Avision stand alone USB device, HP5300C scanner. scanimage -l 5mm -t 5mm -x 15mm -y 15mm 2> yourscanner.log the log will contain [avision] attach: [avision] attach: opening libusb:001:003 [avision] attach: open failed (Invalid argument) In the syslog or dmesg you will likely see usb 1-1.3: can't set config #1, error -71 or sane-find-scanner: resmgr: communication failure: No such file or directory (Although sane-find-scanner reports libusb:001:003) If you run scanimage -d yourbackendname -T you will likely get Invalid Argument. Avision developer Rene Rebe has reported this bug several months ago under "new USB 1 on USB 2 controller bug in the linux kernel". Stock 2.6.18.1, Mandriva 2.6.17-5, stock 2.6.16.1 kernels failed. Stock 2.6.12.6 worked in Mandriva 2007.0 clean install all updates applied. Mandriva 2006.0 2.6.12 kernels also work. Bug report #26728 filed with Mandriva.
Created attachment 9381 [details] contains strace on xsane using hp5300c
Created attachment 9382 [details] lsusb -v output at end of text as well as other data
The regression has been traced down to this patch: http://marc.theaimsgroup.com/?l=linux-usb-devel&m=113657845223250&w=2 However the patch fixes a problem with at least one different device (a USB bar-code scanner), as reported here: http://marc.theaimsgroup.com/?l=linux-usb-devel&m=113805163501137&w=2 I don't know how to get both devices to work. (It would be interesting to see what Windows does.) Since the scanner seems to be kind of flakey in other respects, we should leave uhci-hcd unchanged.
This is probably another manifestation of the same problem, but please feel free to tell me that I am wrong. Using a HP PSC1315 both printing and scanning worked on old kernels. With new kernels the printing still works, but scanning does not. We might be looking at a general HP scanner problem.
Indeed. Further investigation has shown that the HP-5300C scanner has some nasty bugs in its USB firmware, the most noticeable of which is its failure to terminate a 32-byte string descriptor with a 0-length packet. Apparently Windows avoid triggering this bug by not retrieving the string descriptors! The full solution may involve adding a blacklist to usbcore and not reading the string descriptors for devices on the list.
http://bugzilla.kernel.org/show_bug.cgi?id=7436 ------- Additional Comments From peter_s_d@fastmail.com.au 2006-11-30 18:37 ------- This is probably another manifestation of the same problem, but please feel free to tell me that I am wrong. Using a HP PSC1315 both printing and scanning worked on old kernels. With new kernels the printing still works, but scanning does not. We might be looking at a general HP scanner problem. May depend on your OS, kernel version, updates, and being a multi-function HP device. For Mandriva 2007, see thier errata page. Scanning does not work with HP's multi-function devices See also Bug #26567. When printerdrake sets up an HP multi-function device (all models) automatically it does not recognize that the device has a built-in scanner and therefore does not install the packages needed for scanning. We will publish an official update fixing this problem in printerdrake soon. For an immediate fix download the fixed main.pm file and replace the original /usr/lib/libDrakX/printer/main.pm by it. Then remove your print queue with printerdrake and create a new one. This should initiate the installation of the scanning packages. Update: An updated version of the drakxtools package has been released. This version fixes several problems including this one. ________________________________________________________________________ Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection. <HTML><BODY><br> <div id="AOLMsgPart_0_16bc8190-31d2-464d-92b7-87cce7d3904e" class="AOLPlainTextBody"> <pre><tt><a href="http://bugzilla.kernel.org/show_bug.cgi?id=7436" target="_blank">http://bugzilla.kernel.org/show_bug.cgi?id=7436</a><br> <br> <br> ------- Additional Comments From <a href="mailto:peter_s_d%40fastmail.com.au">peter_s_d@fastmail.com.au</a> 2006-11-30 18:37 <br> -------<br> This is probably another manifestation of the same problem, but please feel <br> free to tell me that I am wrong. <br> <br> Using a HP PSC1315 both printing and scanning worked on old kernels. With new <br> kernels the printing still works, but scanning does not. <br> <br> We might be looking at a general HP scanner problem. <br> <br> <br> <br> </tt></pre> <div align="left"><tt>May depend on your OS, kernel version, updates, and being a multi-function HP device. For Mandriva 2007, see thier errata page.</tt><br> <br> </div> <h2 align="left"><a name="Scanning_does_not_work_with_HP_s"> Scanning does not work with HP's multi-function devices </a></h2> <div align="left"> </div> <div align="left"> See also <img DEFANGED_src="http://qa.mandriva.com/twiki/pub/TWiki/BugzillaLinkPlugin/bug_small.png" alt="bug_small.png"> <a href="http://qa.mandriva.com/show_bug.cgi?id=26567" target="_top">Bug #26567</a>. When printerdrake sets up an HP multi-function device (all models) automatically it does not recognize that the device has a built-in scanner and therefore does not install the packages needed for scanning. We will publish an official update fixing this problem in printerdrake soon. For an immediate fix download <a href="http://svn.mandriva.com/cgi-bin/viewvc.cgi/*checkout*/soft/drakx/trunk/perl-install/printer/main.pm?revision=65927" target="_top">the fixed main.pm file</a> and replace the original /usr/lib/libDrakX/printer/main.pm by it. Then remove your print queue with printerdrake and create a new one. This should initiate the installation of the scanning packages. </div> <div align="left"> <strong>Update:</strong> An <a href="http://www.mandriva.com/security/advisories?name=MDKA-2006:056" target="_top">updated version of the drakxtools</a> package has been released. This version fixes several problems including this one. </div> <pre><br> </pre> </div> <!-- end of AOLMsgPart_0_16bc8190-31d2-464d-92b7-87cce7d3904e --> <div class="AOLPromoFooter"> <hr DEFANGED_style="margin-top:10px;" /> <a href="http://pr.atwola.com/promoclk/100122638x1081283466x1074645346/aol?redir=http%3A%2F%2Fwww%2Eaim%2Ecom%2Ffun%2Fmail%2F" target="_blank"><b>Check Out the new free AIM(R) Mail</b></a> -- 2 GB of storage and industry-leading spam and email virus protection.<br /> </div> </BODY></HTML>
Munster8, You were right the PSC problem is a (fixed) Mandriva 2007 thing.
Bug report #235287 filed with SuSE: https://bugzilla.novell.com/show_bug.cgi?id=235287
Created attachment 10291 [details] Patch to fix bad behavior of HP 5300 scanner The approach being used by Mandriva, based on some earlier work of mine, isn't very good. The attached patch ought to fix the problem in a better manner. It's meant to apply to 2.6.20, although it should work with earlier 2.6.20-rc kernels as well. (Notice, by the way, that it doesn't change any of the code in the uhci-hcd driver!) Please try it out, after reverting the changes added by Mandriva, and let me know if it works okay.
A slightly revised version of the patch in comment #9 does indeed fix the problem. I will submit it for inclusion in 2.6.21.