On Wed, 30 Jan 2008, Atsushi Nemoto wrote: > Hi. I'm trying at91_udc driver with g_file_storage on AT91SAM9260-EK > board. I'm using kernel 2.6.24 and 2.6.22(+at91-exp.patch). > > When I load the g_file_storage module, host can detect storage device > soon, but take few _minutes_ to detect its partition table. > > This storage image file works fine with another udc driver on another > platform. So I don't think it is a image problem or host side (or > cable) problem. > > Has anyone seen problem like this?
Not me. > Here is an UDC side log: > # modprobe g_file_storage file=/fatimage > udc: at91_udc version 3 May 2006 > g_file_storage gadget: File-backed Storage Gadget, version: 7 August 2007 > g_file_storage gadget: Number of LUNs=1 > g_file_storage gadget-lun0: ro=0, file: /fatimage > g_file_storage gadget: full speed config #1 > ... (same message continues 13 times) > > And UHC side log: > usb 3-2: new full speed USB device using uhci_hcd and address 15 > usb 3-2: configuration #1 chosen from 1 choice > scsi11 : SCSI emulation for USB Mass Storage devices > usb-storage: device found at 15 > usb-storage: waiting for device to settle before scanning > scsi 11:0:0:0: Direct-Access Linux File-Stor Gadget 0313 PQ: 0 ANSI: 2 > sd 11:0:0:0: [sda] 8192 512-byte hardware sectors (4 MB) > usb 3-2: reset full speed USB device using uhci_hcd and address 15 > usb 3-2: reset full speed USB device using uhci_hcd and address 15 > usb 3-2: reset full speed USB device using uhci_hcd and address 15 Clearly there is a problem. Some device controllers (I don't recall whether the at91 is among them) are not able to stall bulk endpoints correctly; on those devices you must use the "stall=n" module parameter for g_file_storage. If that doesn't work you'll have to gather more debugging information. Turn on CONFIG_USB_DEBUG and CONFIG_USB_STORAGE_DEBUG for the host. Alan Stern - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html