Bug 7436 - USB 1 on USB 2 Controller Bug
Summary: USB 1 on USB 2 Controller Bug
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:
 
Reported: 2006-10-30 08:16 UTC by jimbob
Modified: 2007-02-09 07:19 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.17, 2.6.18, possibly 2.6.16
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
contains strace on xsane using hp5300c (315.46 KB, text/plain)
2006-10-30 17:03 UTC, jimbob
Details
lsusb -v output at end of text as well as other data (8.23 KB, text/plain)
2006-10-30 17:05 UTC, jimbob
Details
Patch to fix bad behavior of HP 5300 scanner (6.81 KB, patch)
2007-02-05 07:38 UTC, Alan Stern
Details | Diff

Description jimbob 2006-10-30 08:16:58 UTC
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.
Comment 1 jimbob 2006-10-30 17:03:42 UTC
Created attachment 9381 [details]
contains strace on xsane using hp5300c
Comment 2 jimbob 2006-10-30 17:05:29 UTC
Created attachment 9382 [details]
lsusb -v output at end of text as well as other data
Comment 3 Alan Stern 2006-11-16 11:54:15 UTC
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.
Comment 4 Peter D. 2006-11-30 18:37:27 UTC
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.  
Comment 5 Alan Stern 2006-12-01 06:58:10 UTC
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.
Comment 6 jimbob 2006-12-01 11:40:41 UTC
  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>
Comment 7 Peter D. 2006-12-03 05:31:05 UTC
Munster8, 

You were right the PSC problem is a (fixed) Mandriva 2007 thing.  
Comment 8 Tristan Miller 2007-01-15 19:10:46 UTC
Bug report #235287 filed with SuSE:
https://bugzilla.novell.com/show_bug.cgi?id=235287
Comment 9 Alan Stern 2007-02-05 07:38:56 UTC
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.
Comment 10 Alan Stern 2007-02-09 07:19:39 UTC
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.

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