Date: Mon, 21 May 2018 20:57:15 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333997 - head/sys/dev/usb/serial Message-ID: <201805212057.w4LKvFMH002121@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805212057.w4LKvFMH002121>