From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GsApL-0001kl-1a for qemu-devel@nongnu.org; Wed, 06 Dec 2006 23:25:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GsApI-0001jc-FN for qemu-devel@nongnu.org; Wed, 06 Dec 2006 23:25:42 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsApI-0001jR-C5 for qemu-devel@nongnu.org; Wed, 06 Dec 2006 23:25:40 -0500 Received: from [24.93.47.44] (helo=ms-smtp-05.texas.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GsApI-00022u-8C for qemu-devel@nongnu.org; Wed, 06 Dec 2006 23:25:40 -0500 Received: from vaio (cpe-66-68-31-100.austin.res.rr.com [66.68.31.100]) by ms-smtp-05.texas.rr.com (8.13.6/8.13.6) with ESMTP id kB74PYsg024913 for ; Wed, 6 Dec 2006 22:25:35 -0600 (CST) Subject: Re: [Qemu-devel] Bus number and address changes after usb_add? From: Lonnie Mendez In-Reply-To: References: Content-Type: text/plain; charset=iso-8859-13 Date: Wed, 06 Dec 2006 22:25:23 -0600 Message-Id: <1165465523.19968.10.camel@vaio> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thu, 2006-12-07 at 12:18 +0800, Yu, Xiaoyang wrote: > After add a USB device by =B4usb_add=A1, I can view it by =B4info usb=A1= . It > shows the bus number and address. >=20 > =20 >=20 > As shown in vl.c, it seems that usb_info() is called when issue =B4info > usb=A1, and usb_device_add() is called when issue =B4usb_add=A1.=20 >=20 > =20 >=20 > But if I add call to usb_info() in the end of usb_device_add(), it > always show the bus number and address as =B40.0=A1, which can be > different from the output of =B4usb_add=A1. >=20 > So it seems like the bus number and address of a USB device changed > some time after =B4usb_add=A1. Does anyone know why it changes? Thanks = in > advance! The address you see with the monitor command "info usb" is the address all usb devices start out with when connected to the guest. The guest os will later assign the device an address on bus 0 (the uhci controller on the i386 system target) after it does things like fetch the device descriptor, configuration, etc. iirc linux will first assign a device an address unlike windows which queries for the configuration information before an address is assigned.