On Mon, 27 Nov 2006, Ajay Jain wrote: > Hello, > > We are implementing a USB peripheral controller driver for our > proprietary hardware, an ARM based SOC. I have read the Linux gadget > page on the linux usb website. A few things that I could conclude > were: > > 1. We should be using the Linux gadget framework for the same, like > the way its done for "lh7a40x_udc.c" (an example). > 2. We would like to expose ourselves as a mass storage device to the > host, therefore we would be using the suitable gadgets, eg. > file-storage.o. > > I have a few questions here: > > 1. Assuming that I am exposing it as a mass storage device. Lets say > that my file-system is lying on the SD card, and USB is only a means > to carry the transfer. Now how does the file-storage module know about > the SD card.
When you load the g_file_storage driver, you tell it what device to use for its backing storage. Or you can tell it after loading, through a sysfs attribute file. Read http://www.linux-usb.org/gadget/file_storage.html > How do these interact with each other? g_file_storage reads and writes data to/from the card, as you would expect. > Is there some > user-space daemon running? Only if you start one up. > 2. Assuming I were to expose this as a serial device to my PC. Now the > bandwidth available on COMM ports is about 115Kbps while the USB > bandwidth is about 12 Mbps. What would be the available bandwidth? My > question arises from the fact that to use a serial device on the host > side, I would be using the serial API's which could only be configured > for the max serial bandwidth. The available bandwidth is whatever your hardware and software will support. There may be limits built into the g_serial driver but I don't know what they are. USB is so much faster than normal serial communications that it is not likely to be a limiting factor. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel