Hello everyone. The following patcheset introduces a Mass Storage Function (MSF) which is a composite function based on File-backed Storage Gadget (FSG). This is the second approach I made after receiving comments from Alan about the previous patchset (the File-backed Storage Function or FSF). I've changed name to avoid confusion with FSG. The patchset is not yet final -- the resulting code is a working but not fully cleaned MSF and Mass Storage Gadget (MSG). I hope to get some comments before I start working on the final version. The whole patchset consists of 11 patches but don't get frightened, some of them are small and/or trivial. I wanted to make it as simple as possible to review them and find any problems and it's simpler to do that with small patches then one huge which includes everything. I'm aware that it'll be best to squash some of the patches when including into repository. Now, a few words about each patch: 1. Modifies file_storage.c file moving portions of it to newly created storage_common.c file. I tried to change logic of FSG as little as possible, however some identifiers are changed. 2. Copies file_storage.c under a new name -- f_mass_storage.c. This new file will be modified in next patches and because first a verbatim copy is made it'll be easier to notice differences. 3. Adds a MSG. It will be reverted by patch 10 and I added it so that MSG can be tested while it hasn't reach it's final stage (I assume one will skip this patch and patch 10 when applying the patchset). 4. Removes testing code from MSF -- the parts which are enabled in FSG when CONFIG_FILE_STORAGE_TEST is defined. 5. Changes some names and prefixes. The MSF will use msf prefix and storage_common wil use stor prefix. Adding prefixes will help avoid name collision when MSF is used with other functions. 6. Moves parts of a msf structure to a msf_common structure. A rather straightforward change with no modification in logic. 7. Changes MSF to use stor_buffhd structure with buffers of static length. Since MSF uses a constant length buffers (contrary to FSG which accepts bufflen parameter) code for allocation and deallocation has no value and bloats the files. 8. Incorporates msf_check_params() into msf_bind() function. Parts of the code will be changed further on. 9. Added storage_common2.c file which defines _complete() functions for endpoints. Those were identical in MSF and FSG and had little dependence on the msf/fsg_dev structure. 10. Reverts patch 3, see comments in point 3. 11. Converts the f_mass_storage.c into a real composite function. Adds mass_storage.c -- a MSG which uses the MSF. As said earlier, the code is not yet final and cleaned, stay tuned for next patchset. :) -- Best regards, _ _ .o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michał "mina86" Nazarewicz (o o) ooo +-<m.nazarewicz@xxxxxxxxxxx>-<mina86@xxxxxxxxxx>-ooO--(_)--Ooo-- -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html