From nobody Mon Feb 9 23:01:00 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 1529377110800756.3778375884175; Mon, 18 Jun 2018 19:58:30 -0700 (PDT) Received: from localhost ([::1]:38811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV6qk-0008OM-3F for importer@patchew.org; Mon, 18 Jun 2018 22:58:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5is-0002Tm-Jv for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:46:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5ir-0000JS-Ma for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:46:18 -0400 Received: from mail-ot0-x22e.google.com ([2607:f8b0:4003:c0f::22e]:32870) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fV5ir-0000JE-Gs; Mon, 18 Jun 2018 21:46:17 -0400 Received: by mail-ot0-x22e.google.com with SMTP id h6-v6so20792175otj.0; Mon, 18 Jun 2018 18:46:17 -0700 (PDT) Received: from localhost ([2600:1700:70:e488:b0ee:9bda:ee6f:91be]) by smtp.gmail.com with ESMTPSA id t7-v6sm7582154oth.12.2018.06.18.18.46.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 18:46:15 -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=0T9QhLYwUdFfWjsaVo/KXFxtgS5rAt2072PnezkWJkw=; b=Lgv2oJpNzYeZ9403BsFQVq8uvV2g+SulM1vxtuagE5cOXIgQbwkSU+QqsVeUPexHNk S5RA7oPiJ7Zb6oFviev1br7Knf6L6i5GBQBHNp00EH3Upt9Ewuy8ePTPZXX81BM18iOO vnq0FrlTJWY/nh2oNc8pcgY+qk58IY92swXwW7RclMJaNeyVul8QgvFI0lvW5GDsklsk OoXe/+AjcaudLUZpUDDXx48ZmYVNo9ST6e5kPw9nDpFij6oyl8vjWspgs1HIyN9ymV0R qIYFlKv9NOk9KaIp30s+rkrePy5HSGlCYxC91flnApotmI9NJgEp8lVaczw3gFoa4ntz kGtA== 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=0T9QhLYwUdFfWjsaVo/KXFxtgS5rAt2072PnezkWJkw=; b=gRZu1e07STR6xCorG0QtvFdSNcr5ZCFRqreKy/f6291E0jTn+EiYq9yp5euFJoII4/ 2UyJ95EQOWHcfDcur6aqYJ86Ng+LEiG3WT9XAsb2ziXAzq4Ug7An2jlGPjuvJ+CvT+4p HXh0G25nb4bsjJNX93SvGy7+YmHAeksY/WLVho7c71gvm0cc6QtdbLVeavtsdYB9XG01 WOuEiDyKIhov2U7lx0lCtNSUHvkBoLSRPb2wkNVF9seemGLbbNNZI4I91BqiXS3Hsq6G i5KeUo0kCam6eJsSzEh13Ddp1sGmJ3OBUw9p55kYa01SSG7np54kv3y9l3jO62pUkYvK NbGA== X-Gm-Message-State: APt69E1FNBsmYyeIInViUcne1Vb/YhkK3VBYw67T4JjtXX4R+ukWk89K mYhVMGDUqjedCw3mr03aU0rwaMcpN0k= X-Google-Smtp-Source: ADUXVKJkZBFOnXOxS4fcR2IpJ/CF5gONr+19aR3V2zDdzZiH4im9Bdix+Kj1bTCFNPjPF/jgcg4V2A== X-Received: by 2002:a9d:126:: with SMTP id 35-v6mr8520652otu.167.1529372776120; Mon, 18 Jun 2018 18:46:16 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 20:42:26 -0500 Message-Id: <20180619014319.28272-61-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-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:c0f::22e Subject: [Qemu-devel] [PATCH 060/113] 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 e334d3be11..4be60a8310 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.11.0