Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2018 08:47:07 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r335616 - stable/11/sys/dev/usb/serial
Message-ID:  <201806250847.w5P8l7oW040902@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806250847.w5P8l7oW040902>