From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GsDJg-00089o-Oe for qemu-devel@nongnu.org; Thu, 07 Dec 2006 02:05:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GsDJf-00086s-2F for qemu-devel@nongnu.org; Thu, 07 Dec 2006 02:05:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsDJe-00086c-U1 for qemu-devel@nongnu.org; Thu, 07 Dec 2006 02:05:10 -0500 Received: from [24.93.47.42] (helo=ms-smtp-03.texas.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GsDJd-0007bm-NE for qemu-devel@nongnu.org; Thu, 07 Dec 2006 02:05:10 -0500 Received: from vaio (cpe-66-68-31-100.austin.res.rr.com [66.68.31.100]) by ms-smtp-03.texas.rr.com (8.13.6/8.13.6) with ESMTP id kB7757Nm021637 for ; Thu, 7 Dec 2006 01:05:08 -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 Date: Thu, 07 Dec 2006 01:04:56 -0600 Message-Id: <1165475096.19968.21.camel@vaio> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 14:43 +0800, Yu, Xiaoyang wrote: > Thanks a lot! So we need to use "usb_del bus.addr" to remove the device from the guest. So I must get the bus.addr information for the device first. But I cannot do so by just add code into usb_device_add() function, because the bus.addr will change after that. Is there a place in QEMU source code suitable for logging the bus.addr information? The usb code could use some improvement in regards to tracking the devices internally in qemu. If you scan this list there was an attempt at adding devices to a tree for tracking them, but that code was seemingly rushed so it had numerous bugs. You can find the thread with the proposal here: http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00489.html