Re: file_storage gadget requires a sync...

Guennadi Liakhovetski <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Tue, 5 Jun 2007, Alan Stern wrote:

> On Tue, 5 Jun 2007, Guennadi Liakhovetski wrote:
> 
> > I see a ~100% reproducible problem under 2.6.20 with g_file_storage: the 
> > script
> > 
> > cp fs.image /tmp/
> > modprobe g_file_storage file=/tmp/fs.image
> > 
> > comes with no error back, but the enumeration fails. Whereas inserting a 
> > sync between the "cp" and "modprobe" fixes it... It worked without sync 
> > under 2.4.30. Filesystem is ext3 mounted with default parameters 
> > (rw,data=ordered), gadget driver net2280, i386 platform. Is this intended 
> > behaviour?
> 
> Yes, of course we always write device drivers so that they will fail in 
> unexpected ways unless the user does something unintuitive and 
> undocumented.  :-)

Sure, I always program that way too:-)

> When you say the enumeration fails, what exactly goes wrong?  I've 
> never tried using g_file_storage with a newly-created backing file.

Ok, the host says:

usb usb1: wakeup_rh (auto-start)
hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0004
uhci_hcd 0000:00:1f.2: port 2 portsc 0093,00
hub 1-0:1.0: port 2, status 0101, change 0001, 12 Mb/s
hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x101
usb 1-2: new full speed USB device using uhci_hcd and address 69
usb 1-2: default language 0x0409
usb 1-2: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: File-backed Storage Gadget
usb 1-2: Manufacturer: Linux 2.6.20.1-rt8-dsa-mftd2x-2 with net2280
usb 1-2: SerialNumber: 3238204E6F76
usb 1-2: uevent
usb 1-2: configuration #1 chosen from 1 choice
usb 1-2: khubd timed out on ep0out len=0/0
usb 1-2: can't set config #1, error -110
drivers/usb/core/inode.c: creating file '069'
hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0004

and on USB-analyser I see an invalid out-transaction with an "invalid 
toggle" and a setup transactio with only NAKs.

Thanks
Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
Germany

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.