svn commit: r335617 - stable/10/sys/dev/usb/serial
Andriy Gapon
avg at FreeBSD.org
Mon Jun 25 08:47:55 UTC 2018
Author: avg
Date: Mon Jun 25 08:47:54 2018
New Revision: 335617
URL: https://svnweb.freebsd.org/changeset/base/335617
Log:
MFC r333997: uchcom: report detected product based on USB product ID
Modified:
stable/10/sys/dev/usb/serial/uchcom.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/usb/serial/uchcom.c
==============================================================================
--- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:07 2018 (r335616)
+++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:54 2018 (r335617)
@@ -320,12 +320,16 @@ uchcom_attach(device_t dev)
sc->sc_udev = uaa->device;
- switch (uaa->info.bcdDevice) {
- case UCHCOM_REV_CH340:
+ switch (uaa->info.idProduct) {
+ case USB_PRODUCT_WCH2_CH341SER:
device_printf(dev, "CH340 detected\n");
break;
- default:
+ case USB_PRODUCT_WCH2_CH341SER_2:
device_printf(dev, "CH341 detected\n");
+ break;
+ default:
+ device_printf(dev, "New CH340/CH341 product 0x%04x detected\n",
+ uaa->info.idProduct);
break;
}
More information about the svn-src-all
mailing list