Re: [PATCH] usb: serial: mos7840: Add USB ID to support Moxa UPort 2210

From: Johan Hovold
Date: Thu Nov 07 2019 - 08:18:41 EST


On Fri, Nov 01, 2019 at 08:01:50AM +0100, Pavel Löbl wrote:
> Adds usb ID for MOXA UPort 2210. This device contains mos7820 but
> it passes GPIO0 check implemented by driver and it's detected as
> mos7840. Hence product id check is added to force mos7820 mode.
>
> Signed-off-by: Pavel Löbl <pavel@xxxxxxxx>

Thanks for the patch.

I've applied this for 5.6 now after adding a vendor id check and
renaming the id defines.

https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git/commit/?h=usb-next&id=e696d00e65e81d46e911f24b12e441037bf11b38

The device-type detection is indeed fragile, so I've also prepared a
follow-up patch to clean up the device-type handling in order to avoid
adding further id-conditionals throughout the driver.

Johan