[PATCH 00/24] Mass Storage USB composite Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello again!

The following patchset is yet another version of the Mass Storage
Function (MSF) which is a composite function based on File-backed
Storage Gadget (FSG).  This patchset takes into consideration all
comments received after sending two previous patchsets.

I tried to split the whole patchset into small diffs which will be
easy to review so don't get scared by those 24 patches -- 7 of them
are less then 100 and another 11 are less then 500 lines so it should
not take so much time looking through them.


Patches from 1 to 8 change the file_storage.c file and create
storage_common.c and storage_common2.c files (the former depends on
nothing from the main file whereas the later requires fsg_dev
structure to be defined).  I tried to keep functionality changes to
the minimum as to minimise probability of introducing any bugs to
already working FSG.

Patch 9 simply copies the file_storage.c to f_mass_storage.c.  From
this point further, only patch 19 changes file_storage.c modifying
a single line there (a constness issue).

Patch 10 adds a Kconfig and Makefile options to compile the newly
created file as a gadget.  This is a temporary patch introduced for
testing purpose -- it is reverted by patch 18.

Patches from 11 to 17 modifies the f_mass_storage.c preparing it to be
a composite function which will be able to be used in many USB
configurations.  This includes removing some unused parts as well as
extracting parts common for a single MSF in different configurations.

Patch 19 finally converts f_mass_storage.c into a USB composite
function.

Next two patches change the way configuration and module parameters
are handled to a more flexible.  Last three patches add minor features
and fix comments.


Michal Nazarewicz (24):
  [Storage] Moved parts not depending on fsg_dev to separate files
  [Storage] Prefixed some identifiers with fsg
  [Storage] Prefixed USB descriptor structures
  [Storage] Added fsg_lun::removable and fsg_lun::cdrom
  [Storage] Moved {show,store}_{ro,file} to common file
  [Storage] RO flag handling changed
  [Storage] More defines moved to storage_common.c
  [Storage] More functionality moved to common file
  [Storage] Template for f_mass_storage.c
  [Storage] Added g_mass_storage gadget
  [Storage] Removed testing code from f_mass_storage.c
  [Storage] Removed suspend/resume no-ops
  [Storage] Parts of the fsg_dev moved to fsg_common structure
  [Storage] Using constant length buffers
  [Storage] check_parameters() removed
  [Storage] Parts of storage_common.c may be skipped by def. macros
  [Storage] fsg_common_init() created
  Revert "[Storage] Added g_mass_storage gadget"
  [Storage] Created Mass Storage Function
  [Storage] Removed mod_data references from outside of
    fsg_common_init()
  [Storage] fsg_config structure added & module parameters handlig
    changed
  [Storage] fsg_common_init() may initialise object in place
  [Storage] lun_name_format and thread_name added
  [Storage] Comments updated

 drivers/usb/gadget/Kconfig           |   18 +
 drivers/usb/gadget/Makefile          |    2 +
 drivers/usb/gadget/f_mass_storage.c  | 2959 ++++++++++++++++++++++++++++++++++
 drivers/usb/gadget/file_storage.c    |  956 ++----------
 drivers/usb/gadget/mass_storage.c    |  238 +++
 drivers/usb/gadget/storage_common.c  |  765 +++++++++
 drivers/usb/gadget/storage_common2.c |  102 ++
 7 files changed, 4206 insertions(+), 834 deletions(-)
 create mode 100644 drivers/usb/gadget/f_mass_storage.c
 create mode 100644 drivers/usb/gadget/mass_storage.c
 create mode 100644 drivers/usb/gadget/storage_common.c
 create mode 100644 drivers/usb/gadget/storage_common2.c


--
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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux