Re: [PATCH] Add Marvell ML352 to drivers/usb/serial/option.c

Johan Hovold
2025-09-18T09:57:53Z

[ Please avoid top-posting when replying on the lists. ]

On Fri, Sep 12, 2025 at 08:54:51AM +0200, Michael Wyraz wrote:

> sorry, I totally missed this mail. "usb-devices" is not available on
> that device. Hope this does it too:

Sure, thanks.

> lsusb  -d 1286:4e3c  -v

> Bus 001 Device 002: ID 1286:4e3c ASR Mobile Composite Device Bus

>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           1
>       bInterfaceClass       224
>       bInterfaceSubClass      1
>       bInterfaceProtocol      3
>       iInterface              5 Mobile RNDIS Network Adapter

>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        1
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass        10
>       bInterfaceSubClass      0
>       bInterfaceProtocol      0
>       iInterface              5 Mobile RNDIS Network Adapter

>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        2
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass       255
>       bInterfaceSubClass      0
>       bInterfaceProtocol      0
>       iInterface              8 Mobile Diag Interface

>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        3
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass       255
>       bInterfaceSubClass      0
>       bInterfaceProtocol      0
>       iInterface             11 Mobile AT Interface

>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        4
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass       255
>       bInterfaceSubClass      0
>       bInterfaceProtocol      0
>       iInterface             11 Mobile AT Interface

The device has five interfaces and the serial driver should only bind to
the last three so you should use USB_DEVICE_INTERFACE_CLASS() and only
match on the vendor class (0xff).

Please also include a description of what each interface is used for in
the commit message. Including a compact usb-devices output (it's just a
script you can copy to the host) would be good. Otherwise you can add a
link to your last mail in the archives:

Link: https://lore.kernel.org/all/d12635f9-9706-4dbd-8adb-d673c6a77202@wyraz.de/

> Am 18.06.25 um 16:27 schrieb Johan Hovold:
> > On Wed, Jun 18, 2025 at 10:06:15AM +0200, Michael Wyraz wrote:
> >> Add the device id of the Marvell ML352 to option.c so that the
> >> device is recognized as usb-serial device.
> >>
> >> Signed-off-by: Michael Wyraz <michael@wyraz.de>
> > Thanks for the patch. Looks good, but we may not want to bind to every
> > interface of the device.
> >
> > Can you please post the output of 'usb-devices' for this device? I
> > assume it has more than one interface, do what each interface is used
> > for?

And remember to update Subject when sending your v2:

> > If you end up resending, please use the common prefix in Subject, for
> > example:
> >
> > USB: serial: option: add support for Marvell ML352
> >
> > (e.g. as can been seen by running 'git log --oneline' on the files
> > you're changing).

Johan