Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2018 08:47:55 +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-10@freebsd.org
Subject:   svn commit: r335617 - stable/10/sys/dev/usb/serial
Message-ID:  <201806250847.w5P8lt85041000@repo.freebsd.org>

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



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