This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x "USB Device Not Recognised" when connected to Windows XP.

Hi,

I've got a brand new fresh AM335x EVM with the stock free SD card (labelled "AM335x EVM Linux SDK v5.04.01", which is running Linux 3.2.0.

root@am335x-evm:~# uname -a
Linux am335x-evm 3.2.0 #1 Mon Apr 9 10:19:16 CDT 2012 armv7l unknown

When I boot up the AM335x EVM, and then after boot up is complete, connect the USB cable from the AM335x EVM to my PC, the "BeagleBone (D:)" window appears on Windows XP as expected.

When I connect the USB cable first, and then turn on the AM335x EVM, I get a "USB Device Not Recognised" bubble notification in Windows XP, and the "BeagleBone (D:)" window and drive does not appear unless I disconnect and reconnect the USB cable.

I would like the gadget MSD work in both bootup / cable scenarios for my AM335x based product.

  • The issue sounds that same as the one mentioned near the end of this thread:

    http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/791/t/186665.aspx

  • I've tested this on the same PC, booting into Linux (KUbuntu 12.04.1) instead of Windows XP.

    If I turn on the AM335x EVM first, and then connect the cable, the BeagleBone drive appears ok.

    If I connect the cable first, and then turn on the AM335x EVM, it does not work unless I disconnect and reconnect the USB cable.

    The dmesg log on the PC shows the following for the failure case:

    [ 71.052037] usb 1-1: new high-speed USB device number 4 using ehci_hcd
    [ 86.164042] usb 1-1: device descriptor read/64, error -110
    [ 101.380051] usb 1-1: device descriptor read/64, error -110
    [ 101.596037] usb 1-1: new high-speed USB device number 5 using ehci_hcd
    [ 112.984028] usb 2-1: new full-speed USB device number 3 using uhci_hcd
    [ 113.123647] usb 2-1: not running at top speed; connect to a high speed hub
    [ 113.157831] usb-storage 2-1:1.0: Quirks match for vid 0525 pid a4a5: 10000
    [ 113.157874] scsi5 : usb-storage 2-1:1.0
    [ 114.160702] scsi 5:0:0:0: Direct-Access Linux File-CD Gadget 0316 PQ: 0 ANSI: 2
    [ 114.164699] scsi 5:0:0:1: Direct-Access Linux File-CD Gadget 0316 PQ: 0 ANSI: 2
    [ 114.165845] sd 5:0:0:0: Attached scsi generic sg6 type 0
    [ 114.171176] sd 5:0:0:1: Attached scsi generic sg7 type 0
    [ 114.184678] sd 5:0:0:0: [sdf] 144522 512-byte logical blocks: (73.9 MB/70.5 MiB)
    [ 114.187669] sd 5:0:0:1: [sdg] 5590620 512-byte logical blocks: (2.86 GB/2.66 GiB)
    [ 114.298670] sd 5:0:0:0: [sdf] Write Protect is off
    [ 114.298679] sd 5:0:0:0: [sdf] Mode Sense: 0f 00 00 00
    [ 114.409669] sd 5:0:0:1: [sdg] Write Protect is off
    [ 114.409677] sd 5:0:0:1: [sdg] Mode Sense: 0f 00 00 00
    [ 114.518692] sd 5:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [ 114.628691] sd 5:0:0:1: [sdg] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [ 115.452158] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 115.936050] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 116.416038] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 116.896048] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 117.151662] sd 5:0:0:0: [sdf] Media Changed
    [ 117.151666] sd 5:0:0:0: [sdf] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
    [ 117.151671] sd 5:0:0:0: [sdf] Sense Key : Unit Attention [current]
    [ 117.151678] sd 5:0:0:0: [sdf] Add. Sense: Power on, reset, or bus device reset occurred
    [ 117.151687] sd 5:0:0:0: [sdf] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
    [ 117.151701] end_request: I/O error, dev sdf, sector 0
    [ 117.151707] quiet_error: 9 callbacks suppressed
    [ 117.151711] Buffer I/O error on device sdf, logical block 0
    [ 117.261659] sd 5:0:0:1: [sdg] Media Changed
    [ 117.261664] sd 5:0:0:1: [sdg] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
    [ 117.261668] sd 5:0:0:1: [sdg] Sense Key : Unit Attention [current]
    [ 117.261675] sd 5:0:0:1: [sdg] Add. Sense: Power on, reset, or bus device reset occurred
    [ 117.261682] sd 5:0:0:1: [sdg] CDB: Read(10): 28 20 00 00 00 00 00 00 04 00
    [ 117.261696] end_request: I/O error, dev sdg, sector 0
    [ 117.261701] Buffer I/O error on device sdg, logical block 0
    [ 117.376040] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 117.856096] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 118.336042] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 118.816057] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 119.071665] sd 5:0:0:0: [sdf] Media Changed
    [ 119.071670] sd 5:0:0:0: [sdf] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
    [ 119.071675] sd 5:0:0:0: [sdf] Sense Key : Unit Attention [current]
    [ 119.071682] sd 5:0:0:0: [sdf] Add. Sense: Power on, reset, or bus device reset occurred
    [ 119.071691] sd 5:0:0:0: [sdf] CDB: Read(10): 28 00 00 00 00 02 00 00 06 00
    [ 119.071706] end_request: I/O error, dev sdf, sector 2
    [ 119.071712] Buffer I/O error on device sdf, logical block 1
    [ 119.071717] Buffer I/O error on device sdf, logical block 2
    [ 119.071721] Buffer I/O error on device sdf, logical block 3
    [ 119.071950] ldm_validate_partition_table(): Disk read failed.
    [ 119.072244] Dev sdf: unable to read RDB block 0
    [ 119.072667] sdf: unable to read partition table
    [ 119.181773] sd 5:0:0:1: [sdg] Media Changed
    [ 119.181786] sd 5:0:0:1: [sdg] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
    [ 119.181797] sd 5:0:0:1: [sdg] Sense Key : Unit Attention [current]
    [ 119.181812] sd 5:0:0:1: [sdg] Add. Sense: Power on, reset, or bus device reset occurred
    [ 119.181831] sd 5:0:0:1: [sdg] CDB: Read(10): 28 20 00 00 00 04 00 00 04 00
    [ 119.181868] end_request: I/O error, dev sdg, sector 4
    [ 119.181885] Buffer I/O error on device sdg, logical block 1
    [ 119.182372] ldm_validate_partition_table(): Disk read failed.
    [ 119.182715] Dev sdg: unable to read RDB block 0
    [ 119.183243] sdg: unable to read partition table
    [ 120.438676] sd 5:0:0:0: [sdf] Attached SCSI removable disk
    [ 120.549678] sd 5:0:0:1: [sdg] Attached SCSI removable disk
    [ 120.664110] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 121.144068] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 121.624070] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 122.104040] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 122.362664] sd 5:0:0:0: [sdf] Media Changed
    [ 122.362669] sd 5:0:0:0: [sdf] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
    [ 122.362674] sd 5:0:0:0: [sdf] Sense Key : Unit Attention [current]
    [ 122.362681] sd 5:0:0:0: [sdf] Add. Sense: Power on, reset, or bus device reset occurred
    [ 122.362690] sd 5:0:0:0: [sdf] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
    [ 122.362705] end_request: I/O error, dev sdf, sector 0
    [ 122.362712] Buffer I/O error on device sdf, logical block 0
    [ 122.362717] Buffer I/O error on device sdf, logical block 1
    [ 122.362721] Buffer I/O error on device sdf, logical block 2
    [ 122.362725] Buffer I/O error on device sdf, logical block 3
    [ 122.362962] ldm_validate_partition_table(): Disk read failed.
    [ 122.363160] Dev sdf: unable to read RDB block 0
    [ 122.363440] sdf: unable to read partition table
    [ 122.472667] sd 5:0:0:1: [sdg] Media Changed
    [ 122.472672] sd 5:0:0:1: [sdg] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
    [ 122.472677] sd 5:0:0:1: [sdg] Sense Key : Unit Attention [current]
    [ 122.472683] sd 5:0:0:1: [sdg] Add. Sense: Power on, reset, or bus device reset occurred
    [ 122.472691] sd 5:0:0:1: [sdg] CDB: Read(10): 28 20 00 00 00 00 00 00 08 00
    [ 122.472706] end_request: I/O error, dev sdg, sector 0
    [ 122.472711] Buffer I/O error on device sdg, logical block 0
    [ 122.472715] Buffer I/O error on device sdg, logical block 1
    [ 122.472920] ldm_validate_partition_table(): Disk read failed.
    [ 122.473110] Dev sdg: unable to read RDB block 0
    [ 122.473375] sdg: unable to read partition table
    [ 123.264103] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 123.522684] sd 5:0:0:1: [sdg] Test WP failed, assume Write Enabled
    [ 123.852162] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
    [ 124.372256] usb 2-1: device not accepting address 3, error -71
    [ 124.428187] usb 2-1: USB disconnect, device number 3
    [ 124.430332] sd 5:0:0:0: [sdf] Synchronizing SCSI cache
    [ 124.433020] sd 5:0:0:0: [sdf] Unhandled error code
    [ 124.433028] sd 5:0:0:0: [sdf] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
    [ 124.433037] sd 5:0:0:0: [sdf] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
    [ 124.433060] end_request: I/O error, dev sdf, sector 0
    [ 124.433070] Buffer I/O error on device sdf, logical block 0
    [ 124.433096] sd 5:0:0:0: [sdf] Unhandled error code
    [ 124.433102] sd 5:0:0:0: [sdf] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
    [ 124.433109] sd 5:0:0:0: [sdf] CDB: Read(10): 28 00 00 00 00 02 00 00 06 00
    [ 124.433128] end_request: I/O error, dev sdf, sector 2
    [ 124.433133] Buffer I/O error on device sdf, logical block 1
    [ 124.433139] Buffer I/O error on device sdf, logical block 2
    [ 124.433144] Buffer I/O error on device sdf, logical block 3
    [ 124.433214] sd 5:0:0:0: [sdf] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
    [ 124.433909] sd 5:0:0:1: [sdg] Synchronizing SCSI cache
    [ 124.433955] sd 5:0:0:1: [sdg] Unhandled error code
    [ 124.433961] sd 5:0:0:1: [sdg] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
    [ 124.433969] sd 5:0:0:1: [sdg] CDB: Read(10): 28 20 00 00 00 00 00 00 04 00
    [ 124.433991] end_request: I/O error, dev sdg, sector 0
    [ 124.434015] sd 5:0:0:1: [sdg] Unhandled error code
    [ 124.434020] sd 5:0:0:1: [sdg] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
    [ 124.434027] sd 5:0:0:1: [sdg] CDB: Read(10): 28 20 00 00 00 04 00 00 04 00
    [ 124.434050] end_request: I/O error, dev sdg, sector 4
    [ 124.434117] sd 5:0:0:1: [sdg] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
    [ 124.434620] ldm_validate_partition_table(): Disk read failed.
    [ 124.434742] Dev sdf: unable to read RDB block 0
    [ 124.434931] sdf: unable to read partition table
    [ 124.434942] sdf: partition table beyond EOD, enabling native capacity
    [ 124.435077] ldm_validate_partition_table(): Disk read failed.
    [ 124.435123] Dev sdg: unable to read RDB block 0
    [ 124.435249] sdg: unable to read partition table
    [ 124.435257] sdg: partition table beyond EOD, enabling native capacity
    [ 124.435756] sdf: detected capacity change from 73995264 to 0
    [ 124.436617] sdg: detected capacity change from 2862397440 to 0
    johnmu@johnmu-System-Product-Name:~$

  • This seems to be fixed in Arago v3.2-staging, if configured with CONFIG_USB_GADGET=m.

    git clone http://arago-project.org/git/projects/linux-am33x.git

    git checkout -b v3.2-staging origin/v3.2-staging

    Build kernel (nb: configured CONFIG_USB_GADGET=m in menuconfig):

    export PATH=/home/johnmu/ti-sdk-am335x-evm-05.05.00.00/linux-devkit/bin/:$PATH

    make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm am335x_evm_defconfig
    make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm menuconfig
    make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm uImage
    make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm modules

    Then modify  /etc/init.d/storage-gadget-init to load ti81xx module before MSD gadget:

    modprobe ti81xx; modprobe g_mass_storage file=/dev/mmcblk0p1,/dev/mmcblk0p3