LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Usb device wont enumerate after booting kernel on a custom board : usb 1-1: device descriptor read/64, error -71 (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/usb-device-wont-enumerate-after-booting-kernel-on-a-custom-board-usb-1-1-device-descriptor-read-64-error-71-a-4175728432/)

smsujan19 08-28-2023 01:23 AM

Usb device wont enumerate after booting kernel on a custom board : usb 1-1: device descriptor read/64, error -71
 
I used petalinux 2018.1 for my build

When i plug in my usb device I get the following errors:

usb 1-1: new high-speed USB device number 2 using xhci-hcd
usb 1-1: device descriptor read/64, error -71
usb 1-1: device descriptor read/64, error -71
usb 1-1: new high-speed USB device number 3 using xhci-hcd
usb 1-1: device descriptor read/64, error -71
usb 1-1: device descriptor read/64, error -71
usb 1-1: new high-speed USB device number 4 using xhci-hcd
usb 1-1: Device not responding to setup address.
usb 1-1: Device not responding to setup address.
usb 1-1: device not accepting address 4, error -71
usb 1-1: new high-speed USB device number 5 using xhci-hcd
usb 1-1: Device not responding to setup address.
usb 1-1: Device not responding to setup address.
usb 1-1: device not accepting address 5, error -71
usb usb1-port1: unable to enumerate USB device


NOTE:

But when I fatload image.ub from U-boot command line using the following commands :

Code:

usb start
    fatload usb 0 0x20000000 image.ub
    bootm 0x20000000

and don't remove my usb after loading image.ub. It works properly upon boot & i am able to read/write to the device.

But after i disconnect and reconnect the usb device i get the same errors -71 as mentioned above.

From the following behavior, i noticed :

1) That the usb drivers have been loaded, otherwise the fatloading image.ub from u-boot wouldn't have been possible

2) The process of flashing image.ub is an interaction between the board and usb, which might have initialized something before kernel boots up. Hence the usb works after that.


I have configured the system-user.dtsi file with :
Code:

    /include/ "system-conf.dtsi"
    / {
    };
    &dwc3_0 {
            dr_mode = "host";
            phy-names = "usb3-phy";
    };

Also enabled

Code:

xHCI HCD(3.0)
    USB Mass storage support
    Designware USB3
          DWC mode -> Dual Role mode

using petalinux-config -c kernel .

business_kid 08-29-2023 11:04 AM

Greets, V & welcome to LQ.

First of all, the system can address the same device in two ways.
  1. The original IBM PC addressed drive A: on sector 0 and started reading in order to boot. If you don't have uefi, it doesn't check or care, your system just reads and boots. That approach seems to read your usb.
  2. At any other time, it will mount it, have a dialogue with it, etc. Your drive will identify itself with it's usb id, and usb ids gives a one line description.
Here's one of my usb drives.
Code:

Bus 004 Device 002: ID 090c:2000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Disk
(0x)090c:2000 is the usb id. Error 71 is a protocol error. The 'unable to enumerate usb device' indicates the box can't get your usb device's usb id. That's bad, as these things go.

xhci_hcd is the module for usb-3.x, but it should step down to 2.x or 1.x.

Your most likely cause is a dud drive or port. Try another one of both. Run fsck on the partitions, and Try mounting it in a PC. Give us all relevant information. It could be voltage/current or a wide range of issues. What's the sbc? The drive? Which linux distro? The power supply? etc.

business_kid 08-31-2023 04:53 AM

Forgot to mention: If you made a partition on the usb and ran
Code:

dd if=<image> of=/dev/sdX1
your boot will fail. The system will puke on the partition table. Use
Code:

dd if=<image> of=/dev/sdX
with no partition number.


All times are GMT -5. The time now is 08:00 PM.