Author: avg
Date: Mon Jun 25 08:47:07 2018
New Revision: 335616
URL: https://svnweb.freebsd.org/changeset/base/335616
Log:
MFC r333997: uchcom: report detected product based on USB product ID
Modified:
stable/11/sys/dev/usb/serial/uchcom.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/usb/serial/uchcom.c
==============================================================================
--- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:29:43 2018
(r335615)
+++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:07 2018
(r335616)
@@ -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;
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"