[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 5/8] usb-ccid: Fix USB descriptor
From: |
Stefan Fritsch |
Subject: |
Re: [Qemu-devel] [PATCH v2 5/8] usb-ccid: Fix USB descriptor |
Date: |
Thu, 20 Jul 2017 14:16:41 +0200 (CEST) |
User-agent: |
Alpine 2.11 (DEB 23 2013-08-11) |
On Thu, 20 Jul 2017, Marc-André Lureau wrote:
> On Thu, Jul 20, 2017 at 11:09 AM Stefan Fritsch <address@hidden> wrote:
>
> > From: Stefan Fritsch <address@hidden>
> >
> > - We want to support both T=0 and T=1. Additionally, note that all
> > fields in USB descriptors are little endian and the supported
> > protocols are in the lowest byte the of the 32-Bit dwProtocols field.
> > - We want APDU level exchanges. This saves us from PPS exchanges and from
> > APDU reassembly from T=1 packets.
> >
> >
> Did you test this with various versions of Windows?
Yes, we have tested that with windows 7, windows 10 and ubuntu 16.04 as
guests.
>
>
> > Signed-off-by: Stefan Fritsch <address@hidden>
> > Signed-off-by: Christian Ehrhardt <address@hidden>
> > ---
> > hw/usb/dev-smartcard-reader.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
> > index 769949144b..bc4dc35d3f 100644
> > --- a/hw/usb/dev-smartcard-reader.c
> > +++ b/hw/usb/dev-smartcard-reader.c
> > @@ -353,8 +353,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 */
> > + 0x03, 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; */
> > @@ -397,7 +397,7 @@ static const uint8_t qemu_ccid_descriptor[] = {
> > * insertion and removal. Must set bit 5 in
> > bmAttributes
> > * in Configuration descriptor if 100000 is set.
> > */
> > - 0xfe, 0x04, 0x01, 0x00,
> > + 0xfe, 0x04, 0x04, 0x00,
> > /*
> > * u32 dwMaxCCIDMessageLength; For extended APDU in
> > * [261 + 10 , 65544 + 10]. Otherwise the minimum is
> > --
> > 2.11.0
> >
> >
> > --
> Marc-André Lureau
>
- [Qemu-devel] [PATCH v2 0/8] usb-ccid: Misc fixes and T=1 support, Stefan Fritsch, 2017/07/20
- [Qemu-devel] [PATCH v2 2/8] usb-ccid: Fix USB packet generation for 64-Bytes sized packets., Stefan Fritsch, 2017/07/20
- [Qemu-devel] [PATCH v2 7/8] usb-ccid: Increase ccid max APDU size, Stefan Fritsch, 2017/07/20
- [Qemu-devel] [PATCH v2 5/8] usb-ccid: Fix USB descriptor, Stefan Fritsch, 2017/07/20
- [Qemu-devel] [PATCH v2 3/8] usb-ccid: Set protocol parameters based on card ATR, Stefan Fritsch, 2017/07/20
- [Qemu-devel] [PATCH v2 8/8] usb-ccid: Reduce logging at level WARN, Stefan Fritsch, 2017/07/20
- [Qemu-devel] [PATCH v2 1/8] usb-ccid: Add support to dump all USB packets, Stefan Fritsch, 2017/07/20
- [Qemu-devel] [PATCH v2 6/8] usb-ccid: Fix chaining fields in CCID USB messages, Stefan Fritsch, 2017/07/20