LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 02-06-2019, 02:16 AM   #1
pranay.joshi
LQ Newbie
 
Registered: Feb 2019
Posts: 2

Rep: Reputation: Disabled
Question System hang and got error 110 when usb device use for gadgetfs


Using "http://www.linux-usb.org/gadget/usb.c" program try to set up gadgetfs on Jetson TX2.

Update VID PID for Nvidia:
#define DRIVER_VENDOR_NUM 0x0955
#define DRIVER_PRODUCT_NUM 0x7020
Also update autoconfig function for Nvidia :

*/* Nvidia processors, high/full speed */
else if (stat (DEVNAME = "tegra-xudc", &statb) == 0) {
HIGHSPEED = 1;
device_desc.bcdDevice = __constant_cpu_to_le16 (0x0001);
fs_source_desc.bEndpointAddress
= hs_source_desc.bEndpointAddress
= USB_DIR_IN | 1;
EP_IN_NAME = "ep1in-bulk";
fs_sink_desc.bEndpointAddress
= hs_sink_desc.bEndpointAddress
= USB_DIR_OUT | 2;
EP_OUT_NAME = "ep2out-bulk";
source_sink_intf.bNumEndpoints = 3;
fs_status_desc.bEndpointAddress
= hs_status_desc.bEndpointAddress
= USB_DIR_IN | 3;
EP_STATUS_NAME = "ep3in-int";
}*
After run program get output at Jetson TX2 terminal:
/dev/gadget/musb_hdrc ep0 configured
serial="1.3"
** Thu Jan 1 05:19:27
CONNECT high speed
DISCONNECT
CONNECT high speed
SETUP 80.06 v0300 i0000 255
Output log At Linux host PC is:
usb 3-2: new high-speed USB device number 48 using xhci_hcd
usb 3-2: string descriptor 0 read error: -110
usb 3-2: New USB device found, idVendor=0955, idProduct=7020
usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-2: can't set config #2, error -110
After debugging usb.c step by step find that program is stuck into function "handle_control". Get event of USB_REQ_GET_DESCRIPTOR then USB_DT_STRING is called but after "status = write (fd, buf, tmp);" Jetson TX2 is stuck and reboot.

What is the reason of Jetson TX2 stuck & getting error -110 response on host PC?

After searching related to error -110, we got two different errno.h.

One indicate 110 as :
#define ESHUTDOWN 110 /* Can't send after socket shutdown */

Second file indicate 110 as :
#define ETIMEDOUT 110 /* Connection timed out */

In both case there is common outcome which is communication between host and device is break because of some reason. So what can be issue for this connection is break?
 
Old 02-12-2019, 08:32 AM   #2
pranay.joshi
LQ Newbie
 
Registered: Feb 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
There is bug in kernel source file related to gadgetfs. After patch that bug using below update usb communication for gadgetfs between device and host with bulk transfer type is working.


https://www.systutorials.com/linux-k...-linux-4-4-92/

https://www.systutorials.com/linux-k...-linux-4-4-92/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
usb.c user mode driver gadgetfs dmesg error code clsimmons@emtek.us Linux - Embedded & Single-board computer 2 02-11-2011 09:47 AM
USB gadgetfs: how to use interrupt endpoints BernardOfCA Linux - Software 0 12-01-2010 09:45 PM
MSC (UMS) instead MTP on linux embedded device. Linux-USB Gadget / GadgetFS rclemente Linux - Embedded & Single-board computer 2 08-28-2009 03:34 AM
usb.c: USB device not accepting new address=4 (error=-110) arsham Linux - Hardware 1 02-26-2006 07:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 12:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration