On Mon, 10 Jan 2005, Boris Dinkevich wrote: > > > Is it me doing something wrong ? > > > >I don't know. Exactly what are you doing? > > Loading file_storage gadget on 2.4.26 kernel with removable set. > Formating in windows xp (sp2) > Connecting to 2.4.24 kernel and getting partition read errors..
Aha! You didn't say before that you are using a 2.4 kernel. Under 2.4 there's no way to change the emulated medium in g_file_storage. You can set the removable flag, but it won't make much difference since you can't remove or replace the medium. > (Also, if I use fdisk/mkfs on linux to create two partitions with vfat, > windows reads only the first) I'll try this myself and let you know what I get. > > > PS. FileStorage Gadget in linux, when operating as removable, does not > > give > > > sense MEDIA_CHANGED (0x28) > > > but rather just returns no sense to indicate that there is medium in > > > device. > > > >That's not true either. After you change the medium by writing to the > >attribute file, the gadget returns Sense Key = 0x06, ASC = 0x28, ASCQ = > >0x00 to the next command. The comment above doesn't apply to you, since you can't change the medium. Under 2.4 the medium can never change, so the gadget never returns ASC = 0x28. > By default, when a device with removable media is attached to a host, > does the host assume there is media inside if "Get Sense" returns no sense > data ? Not precisely -- REQUEST SENSE won't tell you directly if the medium is present. But if TEST UNIT READY succeeds then the medium definitely _is_ present. If it fails, then REQUEST SENSE will tell if whether it failed because there is no medium. > (or should it poll until 0x28 comes ?) It shouldn't poll. After all, the 0x28 may never come! 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