From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33706 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4Gk5-0008Kt-1X for qemu-devel@nongnu.org; Mon, 28 Mar 2011 14:00:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4Gk0-0002UT-So for qemu-devel@nongnu.org; Mon, 28 Mar 2011 14:00:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4Gk0-0002UO-Hp for qemu-devel@nongnu.org; Mon, 28 Mar 2011 14:00:36 -0400 Date: Mon, 28 Mar 2011 20:00:30 +0200 From: Alon Levy Subject: Re: [Qemu-devel] [PATCH v23 03/11] usb-ccid: add CCID bus Message-ID: <20110328180030.GK2741@playa.redhat.com> References: <1300886393-2799-1-git-send-email-alevy@redhat.com> <1300886393-2799-4-git-send-email-alevy@redhat.com> <4D90787D.3090700@redhat.com> <20110328142845.GC2741@playa.redhat.com> <4D909BB1.7080108@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Jes Sorensen , qemu-devel@nongnu.org On Mon, Mar 28, 2011 at 08:44:59PM +0300, Blue Swirl wrote: > On Mon, Mar 28, 2011 at 5:31 PM, Jes Sorensen = wrote: > > On 03/28/11 16:28, Alon Levy wrote: > >> On Mon, Mar 28, 2011 at 02:01:01PM +0200, Jes Sorensen wrote: > >>> > On 03/23/11 14:19, Alon Levy wrote: > >>>> > > A CCID device is a smart card reader. It is a USB device, defi= ned at [1]. > >>>> > > This patch introduces the usb-ccid device that is a ccid bus. = Next patches will > >>>> > > introduce two card types to use it, a passthru card and an emu= lated card. > >>>> > > > >>>> > > =A0[1] http://www.usb.org/developers/devclass_docs/DWG_Smart-C= ard_CCID_Rev110. > >>>> > > > >>>> > > Signed-off-by: Alon Levy > >>> > > >>> > This looks ok to me now - I noticed that the comments in the head= er file > >>> > refers to u8/u16/u32 for types, even though the code uses > >>> > uint{8,16,32}_t, but I don't think that warrants a fix. > >> You mean the comments in hw/usb-ccid.c in the descriptor? that's jus= t shorter. > > > > I wasn't sure if it was a leftover from some of the headers being use= d > > in the kernel. However I am fine with it - no need to change it, and = it > > makes it shorter as you say. >=20 > No, u8/u16 etc are only available for Linux. Please use standard > uint8_t etc. See also HACKING 2.1. They are just in the comments, like I said above. Just did a git grep to = verify, here is the output (snipped because there are many comments): U playa:qemu alon (usb_ccid.v24)$ git grep "\" hw/ccid.h U playa:qemu alon (usb_ccid.v24)$ git grep "\" hw/ccid.h U playa:qemu alon (usb_ccid.v24)$ git grep "\" hw/usb-ccid.c hw/usb-ccid.c: 0x10, 0x01, /* u16 bcdUSB; v1.1 */ hw/usb-ccid.c: /* u16 idVendor */ hw/usb-ccid.c: /* u16 idProduct */ hw/usb-ccid.c: /* u16 bcdDevice */ hw/usb-ccid.c: 0x5d, 0x00, /* u16 wTotalLength; 9+9+54+7+7+7 */ hw/usb-ccid.c: 0x10, 0x01, /* u16 bcdCCID; CCID Specification Rele= ase Number.=20 hw/usb-ccid.c: * u16 wLcdLayout; XXYY Number of lines= (XX) and ch hw/usb-ccid.c: /* u16 ep_wMaxPacketSize; */ hw/usb-ccid.c: 0x40, 0x00, /* u16 ep_wMaxPacketSize; */ hw/usb-ccid.c: 0x40, 0x00, /* u16 ep_wMaxPacketSize; */ U playa:qemu alon (usb_ccid.v24)$ git grep "\" hw/usb-ccid.c hw/usb-ccid.c: 0x12, /* u8 bLength; */ hw/usb-ccid.c: USB_DT_DEVICE, /* u8 bDescriptorType; Device */ hw/usb-ccid.c: 0x00, /* u8 bDeviceClass; */ hw/usb-ccid.c: 0x00, /* u8 bDeviceSubClass; */ hw/usb-ccid.c: 0x00, /* u8 bDeviceProtocol; [ low/full spe= eds only ] * [snip 46 more lines with comments]