* [Qemu-devel] [PATCH] ccid: Fix dwProtocols advertisement of T=0
@ 2018-04-20 18:32 Jason Andryuk
2018-04-27 7:46 ` Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Jason Andryuk @ 2018-04-20 18:32 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: alevy, Jason Andryuk, qemu-stable, qemu-devel
Commit d7d218ef02d87c637d20d64da8f575d434ff6f78 attempted to change
dwProtocols to only advertise support for T=0 and not T=1. 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 <jandryuk@gmail.com>
Cc: qemu-stable@nongnu.org
---
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[] = {
*/
0x07, /* u8 bVoltageSupport; 01h - 5.0v, 02h - 3.0, 03 - 1.8 */
- 0x00, 0x00, /* u32 dwProtocols; RRRR PPPP. RRRR = 0000h.*/
- 0x01, 0x00, /* PPPP: 0001h = Protocol T=0, 0002h = Protocol T=1 */
+ 0x01, 0x00, /* u32 dwProtocols; RRRR PPPP. RRRR = 0000h.*/
+ 0x00, 0x00, /* PPPP: 0001h = Protocol T=0, 0002h = Protocol T=1 */
/* u32 dwDefaultClock; in kHZ (0x0fa0 is 4 MHz) */
0xa0, 0x0f, 0x00, 0x00,
/* u32 dwMaximumClock; */
--
2.14.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] ccid: Fix dwProtocols advertisement of T=0
2018-04-20 18:32 [Qemu-devel] [PATCH] ccid: Fix dwProtocols advertisement of T=0 Jason Andryuk
@ 2018-04-27 7:46 ` Gerd Hoffmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2018-04-27 7:46 UTC (permalink / raw)
To: Jason Andryuk; +Cc: alevy, qemu-stable, qemu-devel
On Fri, Apr 20, 2018 at 02:32:19PM -0400, Jason Andryuk wrote:
> Commit d7d218ef02d87c637d20d64da8f575d434ff6f78 attempted to change
> dwProtocols to only advertise support for T=0 and not T=1. 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.
Added to usb queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-27 7:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-20 18:32 [Qemu-devel] [PATCH] ccid: Fix dwProtocols advertisement of T=0 Jason Andryuk
2018-04-27 7:46 ` Gerd Hoffmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.