On Thu, 6 Jan 2005, Vladimir Trukhin wrote: > Hi all! > > And Happy New Year to everyone! > > 3 days ago I faced the problem which I could not solve using Google. > > Currently I work on board with PXA255, kernel 2.6.10, and I need the > ability to access the > board through USB from both Linux and Windows hosts. > I built the kernel with USB Gadget support for PXA2xx (in kernel) and > File-backed Storage Gadget (as a module). > > Then I created the storage file on the partition with YAFFS (mounted to > /app). > # dd if=/dev/zero of=/app/file_storage bs=1k count=10000 > > # insmod g_file_storage.ko file=/app/file_storage > > Next I connected my board to the Linux host and created the DOS > partition with 'fdisk /dev/uba' command. > Due to mkdosfs does not work with USB directly (it failed with " unable > to get drive geometry for '/dev/uba1' "),
It probably would have worked better if you had used usb-storage instead of ub. > I did following: > # cat /dev/uba1 > tmp_file > # mkdosfs tmp_file > # cat tmp_file > /dev/uba1 This sounds like a weakness in mkdosfs. I don't see any reason why it should work when running on a regular file but fail when running on a block device file like /dev/uba1. Perhaps it's some kind of misguided "safety" precaution. > # mount -t msdos /dev/uba1 /mnt/usb > > After that my board works fine as a mass storage device with Linux host. > > But I have problem with connecting to Windows hosts (I tryed to connect > my board to the host with > Windows XP Pro SP1). > After plugin the cable I can see many messages in the board console: > ........ > udc: USB reset > udc: USB reset > g_file_storage gadget: full speed config #1 > udc: USB reset > udc: USB reset > g_file_storage gadget: full speed config #1 > ... and so on. That looks normal. > Sometimes, after about 3...5 minutes of waiting, it connects and WinXP > opens a folder with the flash contens, sometimes not. > But all this time WinXP shows that Flash Mass Storage device driver > works correctly. > > I enabled debugging info in file_storage.c and here is the output of > dmesg during the Windows connection: > Unfortunately, this output makes just a little sence for me because I'm > a newcomer in USB :( Everything in your log looked normal. And it should only have taken a few seconds. What happened during the remainder of the 3-5 minutes of waiting? > Could somebody be so kind to point me what I did wrong? As far as I can see, you didn't do anything wrong! Alan Stern ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel