did you already try David Brownell's patch??

According to him, this could be an sleep time error!

Below, Dave's patch:

Tweak some early enumeration code paths:

 - After a set_address() error, reset the port.  Failures in that
particular
   protocol request leave the device's address indeterminate.

 - Let devices settle longer after successful SET_ADDRESS

EXPERIMENTAL ... 

Index: g26/drivers/usb/core/hub.c
===================================================================
--- g26.orig/drivers/usb/core/hub.c     2006-11-06 13:08:45.000000000
-0800
+++ g26/drivers/usb/core/hub.c  2006-11-06 14:13:55.000000000 -0800
@@ -2010,6 +2010,8 @@ static int hub_set_address(struct usb_de
        if (retval == 0) {
                usb_set_device_state(udev, USB_STATE_ADDRESS);
                ep0_reinit(udev);
+               /* allow HCD and peripheral time to settle */
+               msleep(40);
        }
        return retval;
 }
@@ -2195,24 +2197,27 @@ hub_port_init (struct usb_hub *hub, stru
 #undef GET_DESCRIPTOR_BUFSIZE
                }
 
+               /* after set_address faults it's not clear what the
device's
+                * address will be.  reset and be sure.
+                *
+                * REVISIT peripherals could trigger erroneous faults...
+                */
                for (j = 0; j < SET_ADDRESS_TRIES; ++j) {
                        retval = hub_set_address(udev);
                        if (retval >= 0)
                                break;
-                       msleep(200);
+                       (void) hub_port_reset(hub, port1, udev, delay);
                }
                if (retval < 0) {
                        dev_err(&udev->dev,
                                "device not accepting address %d, error
%d\n",
                                udev->devnum, retval);
-                       goto fail;
+                       continue;
                }
- 
+
                /* cope with hardware quirkiness:
-                *  - let SET_ADDRESS settle, some device hardware wants
it
                 *  - read ep0 maxpacket even for high and low speed,
-                */
-               msleep(10);
+                */
                if (USE_NEW_SCHEME(retry_counter))
                        break;

On Thu, 2006-11-30 at 11:05 -0600, ext Larry Fenske XX (BO/EUS) wrote:
> I turn on the options suggested by Felipe Balbi (CONFIG_PREEMPT and
> CONFIG_USB_DEBUG), along with applying David Brownell's patch and didn't
> get much more in /var/log/messages:
> 
> Nov 30 09:57:12 usboc0203 kernel: [61382.237911] usb 5-1: new full speed
> USB device using uhci_hcd and address 10
> Nov 30 09:57:13 usboc0203 kernel: [61382.357608] usb 5-1: device
> descriptor read/64, error -71
> Nov 30 09:57:13 usboc0203 kernel: [61382.581016] usb 5-1: device
> descriptor read/64, error -71
> Nov 30 09:57:13 usboc0203 kernel: [61382.796455] usb 5-1: new full speed
> USB device using uhci_hcd and address 11
> Nov 30 09:57:13 usboc0203 kernel: [61382.916151] usb 5-1: device
> descriptor read/64, error -71
> Nov 30 09:57:13 usboc0203 kernel: [61383.139558] usb 5-1: device
> descriptor read/64, error -71
> Nov 30 09:57:14 usboc0203 kernel: [61383.355007] usb 5-1: new full speed
> USB device using uhci_hcd and address 12
> Nov 30 09:57:14 usboc0203 kernel: [61383.578414] usb 5-1: device not
> accepting address 12, error -71
> Nov 30 09:57:14 usboc0203 kernel: [61383.905561] usb 5-1: device not
> accepting address 12, error -71
> Nov 30 09:57:14 usboc0203 kernel: [61384.121014] usb 5-1: new full speed
> USB device using uhci_hcd and address 13
> Nov 30 09:57:15 usboc0203 kernel: [61384.344425] usb 5-1: device not
> accepting address 13, error -71
> Nov 30 09:57:15 usboc0203 kernel: [61384.671563] usb 5-1: device not
> accepting address 13, error -71 
> 
> If I leave the device plugged in after these errors, I can never access
> it.  If I unplug and plug it in again, then sometimes it will connect.
> The successes and failures seem to come in runs, i.e. the chance of
> success or failure is influenced by a previous success or failure.
> 
> Is there any other debugging that I can turn on to get more information
> from the driver?
> 
> Thanks,
> - Larry Fenske
> 
> -----Original Message-----
> From: Felipe Balbi [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 29, 2006 11:59
> To: Larry Fenske XX (BO/EUS)
> Cc: Oliver Neukum; linux-usb-devel@lists.sourceforge.net
> Subject: Re: [linux-usb-devel] Error -71 connecting IDEN phone
> 
> * PGP Signed by an unknown key: 11/29/2006 at 07:58:59 PM
> 
> ext Larry Fenske XX (BO/EUS) wrote:
> > Yes, other devices work.  I tried a USB flash drive (a.k.a. thumb
> drive).  It works fine in both USB ports that I tried it in.  I can read
> the filesystem on it.
> > 
> > - Larry
> > 
> > -----Original Message-----
> > From: Oliver Neukum [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, November 29, 2006 2:49 AM
> > To: linux-usb-devel@lists.sourceforge.net
> > Cc: Larry Fenske XX (BO/EUS)
> > Subject: Re: [linux-usb-devel] Error -71 connecting IDEN phone
> > 
> > Am Dienstag, 28. November 2006 23:10 schrieb Larry Fenske XX (BO/EUS):
> >> I am attempting to connect a Motorola IDEN phone to a Linux box.
> Most
> >> of the time I get an error -71 in /var/log/messages. Here are six
> failed
> >> attempts:
> > 
> As define in include/linux/asm-generic/errno.h the error -71 is a
> Protocol Error...
> As we can see from kernel messages:
> 
> > usb 5-1: new full speed USB device using address 2
> > usb 5-1: device not accepting address 2, error -71
> 
> The USB Host is not being able to set a device address...
> 
> Could you please set CONFIG_PREEMPT and CONFIG_USB_DEBUG on the HOST
> side... and send more verbose messages??
> 
> Another thing: Can you access the device anytime later?? If after some
> error messages you're able to access the device it could be some
> device-specific config...
> 
> 
> 
> > Do any other USB devices work?
> > 
> >     Regards
> >             Oliver
> > 
> >
> ------------------------------------------------------------------------
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
> V
> > _______________________________________________
> > linux-usb-devel@lists.sourceforge.net
> > To unsubscribe, use the last form field at:
> > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
> 
> 
> --
> Best Regards,
> 
> Felipe Balbi
> [EMAIL PROTECTED]
> OSMRC - INdT
> 
> * Unknown Key
> * 0xABA10B64 (L)
> 
-- 
Best Regards, 

Felipe Balbi 
[EMAIL PROTECTED] 
OSMRC - INdT


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to