From nobody Wed Jan 18 11:18:30 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxjtZ6Xxmz2svbQ; Wed, 18 Jan 2023 11:18:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxjtZ5tklz49df; Wed, 18 Jan 2023 11:18:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674040710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JatkXbZJFpiWDNm7FqqGRX3SszPNcis2MzKdRCW8WJI=; b=uOyV9nEh411fJOY2nPLZ7x6CrDHrIoRkiSqteenOYjjE/BvvPRJH5FvvOmQKNkP48R980K 1CAJU2osM9ZSIcyvd8bGTdhdlsFj+TtrKudFjLAOlbJDEiH7bugGfvluViKrZJQX4/xf9C PVDabDLOiXuqSe55QPwbScVos7lUMNwkPitDqLdCAyd9FcUfTY/U+uBfTjYtUV062HQSWh RfLr6mXSwRs7rcyF+QgIDyXz9+xNih3u4dCRPv6A7ufk0zgFVlaO4jFTuRDr43oWs7cKjJ 489CLNPuwOfEmLB6bOuEVB3/bcvbcSufbjBsRYlOVxWe6S3Fnf1+fbBCP/r+2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674040710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JatkXbZJFpiWDNm7FqqGRX3SszPNcis2MzKdRCW8WJI=; b=cTzgs3Siga5cVkJ4BI7AEi/gIzyFZI5PcHHO8sRubEUe2Gd+rUwNa0gFyCnSNR3TIz/qhn g+ZCE0r6lTlgr7pazpMwpPhFLJpAzR/FN1itPos5EKZ0sTlZdHvL6knJQNXNXtk5kUhiLX Tos7/O6PWBgbZJdEG7jmIo/yJjNlefCEatQ7igD5ILA96Xi2qEQ3XXf3R9fowMBz8iXGbQ XR3TpYyIGAzZZlDYw6YDtapg/AHSu9JCYJe26pca8SNlZBRtFrlxaa9icqQJW3t2UUyA1J 5GwHibfX7gsWQM9jTZtejR7vxg0UUqPRCBVUuaxi13lmaQyG/IYzJKzOKC9vXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674040710; a=rsa-sha256; cv=none; b=xFFAvxaTCgEa0jq0HXnirtxXnvdR7xo71kmCjuAhmAmY5hNnHjOCMvCigTbTXIrBDtKyr1 s+VPHa1QrC87kQgF1DjeZVTsohmUCAH8FMgnmIoEvyPiA1R+L0z8FbevqKXqVoWwILKIRy IwYypLfOUlUrO7XLkfa9NRKoxqnyDZZmJGEr6yOH1lKWMqQqycSyMOrj6NOBERBCIQevt6 sFfL+pIvhkz8sIwpd0Lip6FVg/J+IkSuSGLrjHYGgtbSDyyvr9RXTe5sgsStMAh66/oMJH HY9fB2n+kyoySWAe66r+xMdkgyk1RzyuGlgP7EFvs7WmId/1BNdHafe/hihriQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NxjtZ4m5Rz17q0; Wed, 18 Jan 2023 11:18:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30IBIU4w096303; Wed, 18 Jan 2023 11:18:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30IBIUnO096302; Wed, 18 Jan 2023 11:18:30 GMT (envelope-from git) Date: Wed, 18 Jan 2023 11:18:30 GMT Message-Id: <202301181118.30IBIUnO096302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 8580e334b075 - main - umodem: ignore CDC_CM descriptor for baltech smartcard reader List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8580e334b0757c8d55e51b8dc7fc4051521beedf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=8580e334b0757c8d55e51b8dc7fc4051521beedf commit 8580e334b0757c8d55e51b8dc7fc4051521beedf Author: Steffen Dirkwinkel AuthorDate: 2022-11-04 14:46:07 +0000 Commit: Corvin Köhne CommitDate: 2023-01-18 11:17:17 +0000 umodem: ignore CDC_CM descriptor for baltech smartcard reader The CDC_CM descriptor points to the wrong interface for serial port use. Ignore it to use the CDC_UNION descriptor. usbconfig dump (spec at: https://usb.org/sites/default/files/CDC1.2_WMC1.1_012011.zip): ugen0.2: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (300mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x13ad idProduct = 0xf019 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 <45031910> bNumConfigurations = 0x0001 Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0064 bNumInterfaces = 0x0003 bConfigurationValue = 0x0001 iConfiguration = 0x0000 bmAttributes = 0x0080 bMaxPower = 0x0096 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0003 bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0000 Additional Descriptor bLength = 0x09 bDescriptorType = 0x21 bDescriptorSubType = 0x11 RAW dump: 0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0xd0, 0x08 | 0x00 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0003 wMaxPacketSize = 0x0040 bInterval = 0x0001 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x08 bDescriptorType = 0x0b bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x08, 0x0b, 0x01, 0x02, 0x02, 0x02, 0x00, 0x00 Interface 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0002 bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0000 iInterface = 0x0000 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x00 RAW dump: 0x00 | 0x05, 0x24, 0x00, 0x10, 0x01 Additional Descriptor bLength = 0x04 bDescriptorType = 0x24 bDescriptorSubType = 0x02 RAW dump: 0x00 | 0x04, 0x24, 0x02, 0x00 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x06 RAW dump: 0x00 | 0x05, 0x24, 0x06, 0x01, 0x02 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x05, 0x24, 0x01, 0x00, 0x01 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0085 bmAttributes = 0x0003 wMaxPacketSize = 0x0008 bInterval = 0x0010 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 2 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0002 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x000a bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0000 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0086 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0006 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Reviewed by: manu MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D37942 --- sys/dev/usb/quirk/usb_quirk.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index 3baa3acba187..d67007012251 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -188,6 +188,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(CURITEL, UM150, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(CURITEL, UM175, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(VERTEX, VW110L, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), + USB_QUIRK(BALTECH, SMARTCARDREADER, 0x0000, 0xffff, UQ_IGNORE_CDC_CM), /* USB Mass Storage Class Quirks */ USB_QUIRK_VP(USB_VENDOR_ASAHIOPTICAL, 0, UQ_MSC_NO_RS_CLEAR_UA, diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 77a7908d45c3..005a5d9c1037 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1337,6 +1337,7 @@ product AZUREWAVE RTL8192SU_5 0x3325 RTL8192SU /* Baltech products */ product BALTECH CARDREADER 0x9999 Card reader +product BALTECH SMARTCARDREADER 0xf019 SmartCard reader /* Bayer products */ product BAYER CONTOUR_CABLE 0x6001 FTDI compatible adapter