[RFC 0/9] OS Descriptors support

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

 



There is a custom (non-USB IF) extension to the USB standard:

http://msdn.microsoft.com/library/windows/hardware/gg463182
    
The said extension is maintained by Microsoft for Microsoft.

Yet it is fairly common for various devices to use it, and a
popular proprietary operating system expects devices to provide
"OS descriptors", so Linux-based USB gadgets whishing to be able
to talk to a variety of operating systems should be able to provide
the "OS descriptors".

This patch series adds (optional) support for gadgets whishing to expose
the so-called "OS Descriptors".

The sequence of operations when a gadget is enumerated by an OS which expects
the said descriptors is as following:

1) the host issues a standard "GET_DESCRIPTOR" request of type 0x03 (string)
for a string at index 0xEE in language 0, named "OS String"
2) if the device responds, the hosts interprets the response, and if it is
of expected form the host assumes the device supports "OS Descriptors"
3) the host issues requests to get "Feature Descriptors" it expects

There are two kinds of "Feature Descriptors": "Extended Compatibility"
descriptors and "Extended Properties" descriptors.
They are specified per USB interface or per USB interface group described
by an IAD.

Legacy gadgets (compiled as separate modules, like g_ether, g_serial etc)
can stay as they are and not use this extension; however PATCH 9/9
shows an example of converting g_ether to use "OS Descriptors" with RNDIS.
The intended use of the extension is with configfs interface, though.

This series contains an extension to the f_rndis function; if a function
whishes to support "OS Descriptors" it needs to be patched with a fairly
simple change: PATCH 4/9 contains code for supporting the extension proper,
while PATCH 7/9 contains code for using it with configfs.

Rebased onto Felipe's master as of 23rd April.

It is meant for 3.16.

I kindly ask for comments about this extension. In particular,
FunctionFS needs an extension of the way descriptors are written to ep0.

Regards,

AP

Andrzej Pietrasiewicz (9):
  usb: gadget: FunctionFS: share VLA macros with all usb gadget files
  usb: gadget: OS String support
  usb: gadget: OS Feature Descriptors support
  usb: gadget: f_rndis: OS descriptors support
  usb: gadget: configfs: OS String support
  usb: gadget: configfs: OS Extended Compatibility descriptors support
  usb: gadget: f_rndis: OS Descriptors configfs support
  usb: gadget: configfs: OS Extended Properties descriptors support
  usb: gadget: ether: example usage of "OS desriptors"

 Documentation/ABI/testing/configfs-usb-gadget |  45 +++
 drivers/usb/gadget/composite.c                | 331 +++++++++++++++-
 drivers/usb/gadget/configfs.c                 | 550 +++++++++++++++++++++++++-
 drivers/usb/gadget/configfs.h                 |  12 +
 drivers/usb/gadget/ether.c                    |  58 ++-
 drivers/usb/gadget/f_fs.c                     |  27 +-
 drivers/usb/gadget/f_rndis.c                  |  31 +-
 drivers/usb/gadget/u_f.h                      |  26 ++
 drivers/usb/gadget/u_os_desc.h                |  90 +++++
 drivers/usb/gadget/u_rndis.h                  |   3 +
 include/linux/usb/composite.h                 |  82 ++++
 11 files changed, 1219 insertions(+), 36 deletions(-)
 create mode 100644 drivers/usb/gadget/u_os_desc.h

-- 
1.8.3.2

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