From nobody Sun Feb 8 05:08:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1532378814299656.3769486179734; Mon, 23 Jul 2018 13:46:54 -0700 (PDT) Received: from localhost ([::1]:36497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhjJ-0000Sy-2x for importer@patchew.org; Mon, 23 Jul 2018 16:46:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhJF-0002QQ-Fm for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:20:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhhJE-00042V-E8 for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:19:57 -0400 Received: from mail-oi0-x230.google.com ([2607:f8b0:4003:c06::230]:43119) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhhJE-00041G-8t; Mon, 23 Jul 2018 16:19:56 -0400 Received: by mail-oi0-x230.google.com with SMTP id b15-v6so3462720oib.10; Mon, 23 Jul 2018 13:19:56 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id i204-v6sm19818584oia.41.2018.07.23.13.19.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xi9VM4wWC1DZONVNw6Nji25v60X7DbGDnigAib39ayk=; b=LanEk0u18qOEZc9/1oRzGFkM6hmND6uRYxtU2gMUJL4m1NBLOHJwUAdq6EnpkdPo+/ i8UTXjaFuJO3mXO8mOBX7PvVUAmxuPQdXa/L7JlcY3L/cAXnK/R8oWK6PEmusq3QZA/t U+n+ptZjJzKhWjumHsY4HvA8rYR+0ldS4nHkO92ps31EivPaX5x1RnUnIpHg2qJ1Cl1V W2tQzjbSFuwnHzxTgJfAlQl2hm/SKdqYwHFdXQAQWd+9VVf4Uhk8RRuWh9L1z/+2YJU6 cqJ9mOX8UPXfLuNEd+VGHY+rGH4yK65jOIv3aIDQPZMcl/IoOAsmVemtV5KJ8LOZYN5U bN+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=Xi9VM4wWC1DZONVNw6Nji25v60X7DbGDnigAib39ayk=; b=j//QFZ2CHQpofKFsSAf+8gprnpMxyCY3u53kxlK8I13pCZculj0dJOPpobEtcTMJNZ xlaE4eqfrRDcvICCl4lZ2JzKLvbcaWG2Am/q99xqx/xK/W/XQwe5dcatcLW6GrHl7EGD 2nQWXQelJZzJ0UaoZNmLYwkW3HptyyMBn2zGX9taLPVlcBAPKmHFS4yFdGrRHraJfhdo QOhIJYWfphRG0Jm0K2w+LYOBhZKzP9vV+8Ggif4pjRRE0lxn9OWb7whEeyJH2ieOwgp9 phvS6Nk+gJHxynMTmBonFwUWOMo+Adi4UYAnEyr9e0/XMPn97BDKiBkgQDwFgOOd2g4W Ap0g== X-Gm-Message-State: AOUpUlHsBmnB8WkxaEdl5HBVQh8m2iXA9gDU+aLI2yiNcyqrZ8loDH89 MEUOsSzbvNHSOT5ot5w11uSNdbDzuJ4= X-Google-Smtp-Source: AAOMgpcyNL0uU1NjLdmh9gnsl/hK/NM4yKjfUU3VsWwM+oUYyiYFOavWFtoofs5uofGmkeD6NjALjg== X-Received: by 2002:aca:e504:: with SMTP id c4-v6mr329724oih.246.1532377195105; Mon, 23 Jul 2018 13:19:55 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:16:12 -0500 Message-Id: <20180723201748.25573-4-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::230 Subject: [Qemu-devel] [PATCH 03/99] ccid: Fix dwProtocols advertisement of T=0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , qemu-stable@nongnu.org, Jason Andryuk Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Jason Andryuk Commit d7d218ef02d87c637d20d64da8f575d434ff6f78 attempted to change dwProtocols to only advertise support for T=3D0 and not T=3D1. The change was incorrect as it changed 0x00000003 to 0x00010000. lsusb -v in a linux guest shows: "dwProtocols 65536 (Invalid values detected)", though the smart card could still be accessed. Windows 7 does not detect inserted smart cards and logs the the following Error in the Event Logs: Source: Smart Card Service Event ID: 610 Smart Card Reader 'QEMU QEMU USB CCID 0' rejected IOCTL SET_PROTOCOL: Incorrect function. If this error persists, your smart card or reader may not be functioning correctly Command Header: 03 00 00 00 Setting to 0x00000001 fixes the Windows issue. Signed-off-by: Jason Andryuk Message-id: 20180420183219.20722-1-jandryuk@gmail.com Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann (cherry picked from commit 0ee86bb6c5beb6498488850104f7557c376d0bef) Signed-off-by: Michael Roth --- hw/usb/dev-smartcard-reader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index e6468057a0..cabb564788 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -329,8 +329,8 @@ static const uint8_t qemu_ccid_descriptor[] =3D { */ 0x07, /* u8 bVoltageSupport; 01h - 5.0v, 02h - 3.0, 03 - 1.= 8 */ =20 - 0x00, 0x00, /* u32 dwProtocols; RRRR PPPP. RRRR =3D 0000h.*/ - 0x01, 0x00, /* PPPP: 0001h =3D Protocol T=3D0, 0002h =3D Protocol = T=3D1 */ + 0x01, 0x00, /* u32 dwProtocols; RRRR PPPP. RRRR =3D 0000h.*/ + 0x00, 0x00, /* PPPP: 0001h =3D Protocol T=3D0, 0002h =3D Protocol = T=3D1 */ /* u32 dwDefaultClock; in kHZ (0x0fa0 is 4 MHz) */ 0xa0, 0x0f, 0x00, 0x00, /* u32 dwMaximumClock; */ --=20 2.17.1