Openmoko Bug #2278: kernel: g_file_storage fails with usb 1-1: failed to restore interface 0 altsetting 0 (error=-110)

Openmoko Public Trac bugs at docs.openmoko.org
Thu Apr 30 13:44:46 CEST 2009


#2278: kernel: g_file_storage fails with usb 1-1: failed to restore interface 0
altsetting 0 (error=-110)
-----------------------------+----------------------------------------------
 Reporter:  lindi            |          Owner:  openmoko-kernel  
     Type:  defect           |         Status:  new              
 Priority:  normal           |      Milestone:                   
Component:  System Software  |        Version:                   
 Severity:  normal           |       Keywords:  kernel usb gadget
 Haspatch:  0                |      Blockedby:                   
Estimated:                   |    Patchreview:                   
 Blocking:                   |   Reproducible:  always           
-----------------------------+----------------------------------------------
 Steps to reproduce:
 1) boot freerunner without loading any usb gadgets (just to prove they
 don't cause this problem), connect it to a PC and then type the following
 on freerunner:
 2) dd if=/dev/urandom of=/tmp/disk bs=4M count=1
 3) sudo modprobe g_file_storage file=/tmp/disk

 Expected results:
 3) freerunner shows up as a USB mass storage device to the PC in /dev

 Actual results:
 3) No new files are created to /dev on PC side.

 More info:
 1) The PC starts to log the following repeatedly:

 {{{
 304.796079] usb 1-1: new full speed USB device using uhci_hcd and address
 5
 304.988733] usb 1-1: configuration #1 chosen from 1 choice
 310.001061] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a5
 310.001093] usb 1-1: New USB device strings: Mfr=1, Product=2,
 SerialNumber=3
 310.001108] usb 1-1: Product: File-backed Storage Gadget
 310.001120] usb 1-1: Manufacturer: Linux 2.6.29-GTA02_lindi-andy-tracking-
 mokodev with s3c2410_udc
 310.001134] usb 1-1: SerialNumber: 3230204E6F76
 310.342798] Initializing USB Mass Storage driver...
 310.343113] scsi0 : SCSI emulation for USB Mass Storage devices
 310.343516] usbcore: registered new interface driver usb-storage
 310.343535] USB Mass Storage support registered.
 310.343568] usb-storage: device found at 5
 310.343578] usb-storage: waiting for device to settle before scanning
 315.341912] usb-storage: device scan complete
 315.345889] scsi 0:0:0:0: Direct-Access     Linux    File-Stor Gadget 0312
 PQ: 0 ANSI: 2
 315.624107] Driver 'sd' needs updating - please use bus_type methods
 315.635764] sd 0:0:0:0: [sda] 8192 512-byte hardware sectors (4 MB)
 315.748080] usb 1-1: reset full speed USB device using uhci_hcd and
 address 5
 320.901788] usb 1-1: failed to restore interface 0 altsetting 0
 (error=-110)
 320.902084] sd 0:0:0:0: [sda] Write Protect is off
 320.902100] sd 0:0:0:0: [sda] Mode Sense: 00 00 00 00
 320.902113] sd 0:0:0:0: [sda] Assuming drive cache: write through
 320.903174] sd 0:0:0:0: [sda] READ CAPACITY failed
 320.903187] sd 0:0:0:0: [sda] Result: hostbyte=DID_ERROR
 driverbyte=DRIVER_OK,SUGGEST_OK
 320.903207] sd 0:0:0:0: [sda] Sense not available.
 320.903430] sd 0:0:0:0: [sda] Write Protect is off
 320.903445] sd 0:0:0:0: [sda] Mode Sense: 00 00 00 00
 320.903457] sd 0:0:0:0: [sda] Assuming drive cache: write through
 320.903719] sd 0:0:0:0: [sda] Attached SCSI disk
 320.905060] usb 1-1: USB disconnect, address 5
 }}}

 2) freerunner logs

 {{{
 [21474661.380000] g_file_storage gadget: File-backed Storage Gadget,
 version: 20 November 2008
 [21474661.400000] g_file_storage gadget: Number of LUNs=1
 [21474661.405000] g_file_storage gadget-lun0: ro=0, file: /tmp/disk
 [21474661.410000] gta02_udc_command S3C2410_UDC_P_ENABLE
 [21474661.865000] g_file_storage gadget: full speed config #1
 [21474672.695000] g_file_storage gadget: full speed config #1
 [21474677.925000] g_file_storage gadget: full speed config #1
 [21474688.140000] g_file_storage gadget: full speed config #1
 [21474693.400000] g_file_storage gadget: full speed config #1
 [21474703.610000] g_file_storage gadget: full speed config #1
 [21474708.840000] g_file_storage gadget: full speed config #1
 [21474719.065000] g_file_storage gadget: full speed config #1
 [21474724.305000] g_file_storage gadget: full speed config #1
 ...
 }}}

 3) freerunner runs andy-tracking 9ecc089861ab238e (2.6.29 from Apr 28)
 4) I tested this with two PCs and get the same results.
 4.1) 400 MHz fujitsu-siemens laptop with linux 2.6.27.6
 4.1) 200 MHz compaq deskpro desktop with linux 2.6.26-2-486
 5) I am not using extra USB hubs or "extension cables". The cable I use
 works perfectly with g_ether so I don't think this is a hardware issue.

 Please test this and let me know if you can reproduce it.

-- 
Ticket URL: <https://docs.openmoko.org/trac/ticket/2278>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac


More information about the buglog mailing list