From owner-svn-src-head@freebsd.org Sat Feb 17 06:57:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96313F1433A; Sat, 17 Feb 2018 06:57:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B85BA6A88C; Sat, 17 Feb 2018 06:57:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9ADCA1943D; Sat, 17 Feb 2018 06:57:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1H6vHFB027546; Sat, 17 Feb 2018 06:57:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1H6vHV3027544; Sat, 17 Feb 2018 06:57:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201802170657.w1H6vHV3027544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Feb 2018 06:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329440 - head/sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/usb X-SVN-Commit-Revision: 329440 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Feb 2018 06:57:18 -0000 Author: imp Date: Sat Feb 17 06:57:17 2018 New Revision: 329440 URL: https://svnweb.freebsd.org/changeset/base/329440 Log: Correct the PNP information generated by the usb driver to match the artificial NOMATCH usb does in lieu of creating a device_t for devices with no drivers. Also, correct bus to be 'uhub' since where USB devices attach, even though 'usb' is more logical, we need the physical bus here. Submitted by: hps@ Modified: head/sys/dev/usb/usb_hub.c head/sys/dev/usb/usbdi.h Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Sat Feb 17 06:57:12 2018 (r329439) +++ head/sys/dev/usb/usb_hub.c Sat Feb 17 06:57:17 2018 (r329440) @@ -1733,7 +1733,12 @@ uhub_child_pnpinfo_string(device_t parent, device_t ch } iface = usbd_get_iface(res.udev, res.iface_index); if (iface && iface->idesc) { - snprintf(buf, buflen, "vendor=0x%04x product=0x%04x " + snprintf(buf, buflen, + "bus=usb " +#if USB_HAVE_UGEN + "device=%s " +#endif + "vendor=0x%04x product=0x%04x " "devclass=0x%02x devsubclass=0x%02x " "devproto=0x%02x " "sernum=\"%s\" " @@ -1741,6 +1746,9 @@ uhub_child_pnpinfo_string(device_t parent, device_t ch "mode=%s " "intclass=0x%02x intsubclass=0x%02x " "intprotocol=0x%02x" "%s%s", +#if USB_HAVE_UGEN + res.udev->ugen_name, +#endif UGETW(res.udev->ddesc.idVendor), UGETW(res.udev->ddesc.idProduct), res.udev->ddesc.bDeviceClass, Modified: head/sys/dev/usb/usbdi.h ============================================================================== --- head/sys/dev/usb/usbdi.h Sat Feb 17 06:57:12 2018 (r329439) +++ head/sys/dev/usb/usbdi.h Sat Feb 17 06:57:17 2018 (r329440) @@ -337,18 +337,18 @@ struct usb_device_id { } __aligned(32); #define USB_STD_PNP_INFO "M16:mask;U16:vendor;U16:product;L16:release;G16:release;" \ - "U8:devclass;U8:devsubclass;U8:devprotocol;" \ + "U8:devclass;U8:devsubclass;U8:devproto;" \ "U8:intclass;U8:intsubclass;U8:intprotocol;" #define USB_STD_PNP_HOST_INFO USB_STD_PNP_INFO "T:mode=host;" #define USB_STD_PNP_DEVICE_INFO USB_STD_PNP_INFO "T:mode=device;" #define USB_PNP_HOST_INFO(table) \ - MODULE_PNP_INFO(USB_STD_PNP_HOST_INFO, usb, table, table, sizeof(table[0]), \ + MODULE_PNP_INFO(USB_STD_PNP_HOST_INFO, uhub, table, table, sizeof(table[0]), \ sizeof(table) / sizeof(table[0])) #define USB_PNP_DEVICE_INFO(table) \ - MODULE_PNP_INFO(USB_STD_PNP_DEVICE_INFO, usb, table, table, sizeof(table[0]), \ + MODULE_PNP_INFO(USB_STD_PNP_DEVICE_INFO, uhub, table, table, sizeof(table[0]), \ sizeof(table) / sizeof(table[0])) #define USB_PNP_DUAL_INFO(table) \ - MODULE_PNP_INFO(USB_STD_PNP_INFO, usb, table, table, sizeof(table[0]), \ + MODULE_PNP_INFO(USB_STD_PNP_INFO, uhub, table, table, sizeof(table[0]), \ sizeof(table) / sizeof(table[0])) /* check that the size of the structure above is correct */