On Mon, 24 Jan 2005, Alan Stern wrote:
>On Mon, 24 Jan 2005, Adam J. Richter wrote:

>> I wrote:
>> >    Is anyone successfully using an ALI USB 2.0 host controller
>> >as USB 2.0 rather than just USB 1.1?  It appears that anything
>> >plugged into a ALI USB 2.0 host controller under linux-2.6.11-rc2-bk1
>> >connects only as USB 1.1.
>> [...]
>> >    I should add that the USB 2.0 scanner has other problems
>> >when connecting directly to the USB 2.0 ports on my system's
>> >motherboard (Intel ICH5/ICH5R chipset), but it works when I put
>> >a USB 1.1 hub in the middle.  I get the same behavior having the
>> >USB 1.1 hub in the middle when I connect through the ALI card.
>> >However, the author of the avision driver ([EMAIL PROTECTED])
>> >reports that he is able to use his av220 when connected through
>> >a VIA USB 2.0 controller, which I do not have at the moment.  So,
>> >I suspect that my scanner problem is another ehci problem.
>> 
>>      I just bought a VIA PCI USB 2.0 controller, and, much
>> to my surprise, it also only connects at USB 1.1 to my USB 2.0
>> devices.  Its behavior is idential to that of the ALi PCI USB 2.0
>> controller card.

>Try the advice given in

>http://marc.theaimsgroup.com/?l=linux-usb-users&m=110624648813563&w=2

        With that patch applied, USB 2.0 devices still attach
as USB 1.x devices on both the ALI and VIA PCI USB controller cards
when used with my 2.8 GHz Pentium 4 motherboard.  Loading usbcore
with old_scheme_first=y, as you had suggested to some other people,
also did not change this for either controller.  However, I have
some other information that may be more interesting.

        I have a 600mhz Via Samuel 2 computer, which has a VIA
USB 2.0 controller built into the motherboard.  On that system,
my Avision av220 scanner seems to work correctly as usb 2.0
devices.  sysfs and the console messages say the scanner is
connecting as a usb 2.0 device, and the time it takes to
scan a 300dpi page goes from 55-65 seconds (with a USB 1.1 hub
in the middle to force it USB 1.x) to 21-25 seconds.

        (By the way, this is particularly good news for my
specific problem with my Avision av220 scanner, as it means
that my problems are probably not the result of firmware
differences between my av220 and Rene's or most differences
in our software configurations.)

        Even more interesting, my VIA USB 2.0 PCI card in this
computer works, with my USB 2.0 devices connecting at 480 Mbps
(and the scanner working faster as with the built-in USB 2.0 ports),
but the ALi PCI USB controller still only connects to devices
at 12 Mbps.

        Also, I've observed the failure mode of the ALi card (in
either computer) is slightly different than that of the VIA
card (in the 2.8GHz Pentium 4 computer).  When the VIA usb 2.0
controller card fails, the debugging messages that it generates
always include "port 2 full speed --> companion, port status 0x1011."
(I added the status to the printk.)  The port number will depend on
which plug I'm using, of course.  The port status numbers vary: I've
seen 0x1011, 0x1811 and 1813.  Note that 0x10 is PORT_OC (overcurrent),
and that PORT_RESET (0x100) is not set in any of these values, meaning
that the ehci chip thinks the port is drawing too much power and
that the reset has not succcessfully completed.  With the ALi card,
these messages are not printed.  In fact, there are no messages
from the ehci driver printed, as far as I can tell.  So, the ehci
driver with the ALi card must punt to the USB 1.x controllers at
some other point.  By the way, I have checked sysfs to make sure
that it thinks that the ehci driver is bound to the ALi USB 2.0
controller.

        Finally, I tried the following patch usb_hub_port_debounce()
to make it try to wait until an overcurrent condition disappears,
but this apparently does not happen.  Instead, it eventually times
out and disables the port when I apply the following patch.

        Thanks for your suggested patch anyhow.  I suspect that
the problem is some kind of missing delay after powering the
port, so I basically agree with your thinking.

                    __     ______________
Adam J. Richter        \ /
[EMAIL PROTECTED]      | g g d r a s i l



--- drivers/usb/core/hub.c.orig 2005-01-25 00:32:31.000000000 +0800
+++ drivers/usb/core/hub.c      2005-01-25 00:32:39.000000000 +0800
@@ -1997,26 +1997,27 @@
 static int hub_port_debounce(struct usb_hub *hub, int port1)
 {
        int ret;
        int total_time, stable_time = 0;
        u16 portchange, portstatus;
        unsigned connection = 0xffff;
 
        for (total_time = 0; ; total_time += HUB_DEBOUNCE_STEP) {
                ret = hub_port_status(hub, port1, &portstatus, &portchange);
                if (ret < 0)
                        return ret;
 
                if (!(portchange & USB_PORT_STAT_C_CONNECTION) &&
+                   !(portstatus & USB_PORT_STAT_OVERCURRENT) &&
                     (portstatus & USB_PORT_STAT_CONNECTION) == connection) {
                        stable_time += HUB_DEBOUNCE_STEP;
                        if (stable_time >= HUB_DEBOUNCE_STABLE)
                                break;
                } else {
                        stable_time = 0;
                        connection = portstatus & USB_PORT_STAT_CONNECTION;
                }
 
                if (portchange & USB_PORT_STAT_C_CONNECTION) {
                        clear_port_feature(hub->hdev, port1,
                                        USB_PORT_FEAT_C_CONNECTION);
                }


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to