[systemd-devel] WebUSB

Greg KH greg at kroah.com
Tue Jan 10 09:57:59 UTC 2017


On Tue, Jan 10, 2017 at 08:39:28AM +0100, Lars Knudsen wrote:
> 
> 
> On Jan 10, 2017 07:51, "Greg KH" <greg at kroah.com> wrote:
> 
>     On Mon, Jan 09, 2017 at 01:32:40PM -0800, Reilly Grant wrote:
>     > On 2017-01-09 9:55 am, Greg KH wrote:
>     > > On Mon, Jan 09, 2017 at 06:13:04PM +0100, Bjørn Mork wrote:
>     > > > Greg KH <greg at kroah.com> writes:
>     > > > > On Mon, Jan 09, 2017 at 09:40:59AM +0000, Kenneth Rohde
>     Christiansen wrote:
>     > > > >> Web USB can only grab devices which has special Web USB headers.
>     It can not
>     > > > >> grab any USB device.
>     > > > >>
>     > > > >> https://wicg.github.io/webusb/#webusb-descriptors
>     > > > >
>     > > > > Ah, fun :(
>     > > > >
>     > > > > So, we can add a quirk into the kernel cdc-acm driver to never bind
>     to a
>     > > > > device that has the wusb platform capability descriptor,
>     > > >
>     > > > I fail to see why a quirk should be necessary. New device classes are
>     > > > expected to use new class/subclass codes distintly different from
>     > > > anything handled by existing class drivers.
>     > >
>     > > One would hope, but it seems like they want to piggy-back on the
>     cdc-acm
>     > > spec.  But I could be totally wrong here, does anyone have the actual
>     > > descriptor dump of a device anywhere?
>     >
>     > We don't want to piggy-back on the CDC-ACM spec. A WebUSB device should
>     > always have its interfaces marked vendor-specific. Below is an example of
>     a
>     > device which implements both a CDC-ACM interface and a WebUSB interface.
> 
>     Ick, why would you want both interfaces on a device?  Are you going to
>     allow firmware to talk to both endpoints at the same time?  Why?
> 
>     Why not just make it a "one interface" type of device?
> 
> I work for a medical company, where we are using long lived software and
> hardware. Having the option of supporting both WebUSB and USB serial will allow
> us to move to pure web and still support legacy platforms.
> 
> If we - in stead - were to only have WebUSB or standard CDC, we would force an
> impossible break.

Ok, yes, different interfaces will work, and as long as the kernel isn't
going to bind to the interface, you should be fine.  Hopefully your
firmware can handle userspace talking to both interfaces at the same
time :)

good luck!

greg k-h


More information about the ModemManager-devel mailing list