Linux host running Ubuntu 20.04 is not able to detect the storage device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux host running Ubuntu 20.04 is not able to detect the storage device

1,277 Views
Sandra_23
Contributor I

Setup:

 

LS1043ARDB board, booted from SD card using LSDK 21.08, RT kernel

USB-2 was made device port by changing dtsi file:

arch/arm/boot/dts/freescale/fsl-ls1043a.dtsi

 

After booting the kernel, the following is done:

 

 

root@localhost:~# pwd

/root

root@localhost:~# mkdir gadget_test

root@localhost:~# cd gadget_test/

root@localhost:~/gadget_test# dd if=/dev/zero of=./test bs=1M count=500

500+0 records in

500+0 records out

524288000 bytes (524 MB, 500 MiB) copied, 9.99138 s, 52.5 MB/s

root@localhost:~/gadget_test# ls -l

total 512004

-rw-r--r-- 1 root root 524288000 Jan 5 14:04 test

 

root@localhost:/boot/modules/5.10.35-rt39-dirty/kernel/drivers/usb/gadget# ls

function legacy libcomposite.ko udc

root@localhost:/boot/modules/5.10.35-rt39-dirty/kernel/drivers/usb/gadget# insmod libcomposite.ko

 

root@localhost:/boot/modules/5.10.35-rt39-dirty/kernel/drivers/usb/gadget/function# ls

u_audio.ko u_serial.ko usb_f_ecm.ko usb_f_eem.ko usb_f_hid.ko usb_f_midi.ko usb_f_obex.ko usb_f_serial.ko usb_f_uac1.ko usb_f_uac2.ko

u_ether.ko usb_f_acm.ko usb_f_ecm_subset.ko usb_f_fs.ko usb_f_mass_storage.ko usb_f_ncm.ko usb_f_rndis.ko usb_f_ss_lb.ko usb_f_uac1_legacy.ko usb_f_uvc.ko

 

root@localhost:/boot/modules/5.10.35-rt39-dirty/kernel/drivers/usb/gadget/function# insmod usb_f_mass_storage.ko

 

root@localhost:/boot/modules/5.10.35-rt39-dirty/kernel/drivers/usb/gadget/legacy# insmod g_mass_storage.ko file=/root/gadget_test/test

 

root@localhost:/boot/modules/5.10.35-rt39-dirty/kernel/drivers/usb/gadget/legacy# dmesg |tail

[ 899.228352] Mass Storage Function, version: 2009/09/11

[ 899.228370] LUN: removable file: (no medium)

[ 899.228548] LUN: file: /root/gadget_test/test

[ 899.228559] Number of LUNs=1

[ 899.228781] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11

[ 899.228794] g_mass_storage gadget: userspace failed to provide iSerialNumber

[ 899.228803] g_mass_storage gadget: g_mass_storage ready

 

 

Issue: Linux host running Ubuntu 20.04 is not able o detect the storage device when connected to the USB-2 port on LS1043ARDB board using a USB Type-A male to USB-Type A male data cable (no power connection).. Logs are as follows:

 

Logs on Host Ubuntu PC:

 

Jan 5 20:20:54 user-IdeaPad-5-15ITL05-Ua kernel: [562428.134870] usb 3-1: new high-speed USB device number 43 using xhci_hcd

Jan 5 20:20:54 user-IdeaPad-5-15ITL05-Ua kernel: [562428.266793] usb 3-1: device descriptor read/64, error -71

Jan 5 20:20:54 user-IdeaPad-5-15ITL05-Ua kernel: [562428.510836] usb 3-1: device descriptor read/64, error -71

Jan 5 20:20:55 user-IdeaPad-5-15ITL05-Ua kernel: [562428.754850] usb 3-1: new high-speed USB device number 44 using xhci_hcd

Jan 5 20:20:55 user-IdeaPad-5-15ITL05-Ua kernel: [562428.882909] usb 3-1: device descriptor read/64, error -71

Jan 5 20:20:55 user-IdeaPad-5-15ITL05-Ua kernel: [562429.122828] usb 3-1: device descriptor read/64, error -71

Jan 5 20:20:55 user-IdeaPad-5-15ITL05-Ua kernel: [562429.230944] usb usb3-port1: attempt power cycle

Jan 5 20:20:56 user-IdeaPad-5-15ITL05-Ua kernel: [562429.642778] usb 3-1: new high-speed USB device number 45 using xhci_hcd

Jan 5 20:20:56 user-IdeaPad-5-15ITL05-Ua kernel: [562429.642995] usb 3-1: Device not responding to setup address.

Jan 5 20:20:56 user-IdeaPad-5-15ITL05-Ua kernel: [562429.854950] usb 3-1: Device not responding to setup address.

Jan 5 20:20:56 user-IdeaPad-5-15ITL05-Ua kernel: [562430.062750] usb 3-1: device not accepting address 45, error -71

Jan 5 20:20:56 user-IdeaPad-5-15ITL05-Ua kernel: [562430.194839] usb 3-1: new high-speed USB device number 46 using xhci_hcd

Jan 5 20:20:56 user-IdeaPad-5-15ITL05-Ua kernel: [562430.195023] usb 3-1: Device not responding to setup address.

Jan 5 20:20:56 user-IdeaPad-5-15ITL05-Ua kernel: [562430.402851] usb 3-1: Device not responding to setup address.

Jan 5 20:20:56 user-IdeaPad-5-15ITL05-Ua kernel: [562430.610836] usb 3-1: device not accepting address 46, error -71

Jan 5 20:20:56 user-IdeaPad-5-15ITL05-Ua kernel: [562430.610994] usb usb3-port1: unable to enumerate USB device

 

Looking for help on fixing this issue... Thanks

 

0 Kudos
1 Reply

1,273 Views
yipingwang
NXP TechSupport
NXP TechSupport

Have you updated dts as the following?

Device Tree update, change property dr_mode’s data from “host” to “peripheral”, add property maximum-speed = “super-speed”;
as below:
usb0: usb3@2f00000 {
compatible = "snps,dwc3";
reg = <0x0 0x2f00000 0x0 0x10000>;
interrupts = <0 60 0x4>;
dr_mode = "peripheral";
snps,quirk-frame-length-adjustment = <0x20>;
snps,dis_rxdet_inp3_quirk;
maximum-speed = “super-speed”;
};

0 Kudos