From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chun Yan Liu" Subject: Re: [PATCH V6 3/7] libxl: add pvusb API Date: Tue, 15 Sep 2015 02:14:40 -0600 Message-ID: <55F860100200006600050C2B@relay2.provo.novell.com> References: <1439202928-24813-1-git-send-email-cyliu@suse.com> <1439202928-24813-4-git-send-email-cyliu@suse.com> <1441721852.24450.120.camel@citrix.com> <55F2F64F02000066000508CA@relay2.provo.novell.com> <1441978018.3549.33.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1441978018.3549.33.camel@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , xen-devel@lists.xen.org Cc: Juergen Gross , wei.liu2@citrix.com, george.dunlap@eu.citrix.com, Ian.Jackson@eu.citrix.com, Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org >>> On 9/11/2015 at 09:26 PM, in message <1441978018.3549.33.camel@citrix.com>, Ian Campbell wrote: > On Thu, 2015-09-10 at 23:42 -0600, Chun Yan Liu wrote: > > > > > Do these fields have any particular size requirements arising from e.g. > the > > > USB spec or from possible dom0 implementations? > > > > > > If they have a well defined fixed size from a USB spec then maybe we > > > could > > > use the appropriate fixed size types? > > > > Di> dn't see the size limitation. In Linux kernel code, busnum and devnum > (here > > 'hostbus, hostaddr') are both 'int' type. > > Is that a Linux-specific implementation detail or a fundamental property of > USB? We should be designing the interface around Linux implementation > details. It seems like something in the USB spec ought to define precisely > the number of bits in both a bus number and a device address within that > bus. Have a look at USB 2.0 Spec, it has some description on Device Address: a seven-bit value representing the address of the debvice on USB. (up to 127 devices). So int8 is appropriate. No description to Bus Num. -Chunyan > > > And idProduct and idVendor are 'u16'. > > That's a USB spec thing, I think, so int16 in the IDL seems appropriate. > > Ian. > >