Author: avg Date: Mon May 21 20:57:14 2018 New Revision: 333997 URL: https://svnweb.freebsd.org/changeset/base/333997
Log: uchcom: report detected product based on USB product ID Product IDs are specified in vendor documents. The previously used device ID is not. This is a cosmetic change. No functionality depends on those IDs. Reviewed by: hselasky MFC after: 2 weeks Modified: head/sys/dev/usb/serial/uchcom.c Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Mon May 21 20:54:54 2018 (r333996) +++ head/sys/dev/usb/serial/uchcom.c Mon May 21 20:57:14 2018 (r333997) @@ -322,12 +322,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; } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"