From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HHbJ1-0002QL-Af for qemu-devel@nongnu.org; Thu, 15 Feb 2007 02:45:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HHbIz-0002Q8-HG for qemu-devel@nongnu.org; Thu, 15 Feb 2007 02:45:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHbIz-0002Q5-BT for qemu-devel@nongnu.org; Thu, 15 Feb 2007 02:45:25 -0500 Received: from mga03.intel.com ([143.182.124.21]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HHbIy-0007Ii-PJ for qemu-devel@nongnu.org; Thu, 15 Feb 2007 02:45:25 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Subject: RE: [Qemu-devel] USB storage cannot be recognized on guest Linux domain? Date: Thu, 15 Feb 2007 15:44:55 +0800 Message-ID: In-Reply-To: <1171507413.4091.48.camel@vaio> From: "Yu, Xiaoyang" 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 Hi Lonnie, Thanks a lot for the information. In our use case, we do not know the USB disk information before it is = plugged by customer, so we cannot start qemu with -usbdevice. For Linux, reload the uhci_hcd driver works. If we use this solution in = our use case, then we need to issue an interrupt (maybe by = pic_set_irq_new?) to the guest OS when QEMU detect a USB device is = attached, and then the guest OS will reload the uhci_hcd driver. Is that = right? Currently there is something wrong with the list archive server, = so I haven't search out any example code from it :-( I found that there is a patch to add the UHCI suspend/resume support in = the archive posted by you, but it cannot be applied to QEMU-DM 0.8.2 = directly: http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00576.html I wonder why there is no official UHCI suspend/resume support in QEMU. = To reload the uhci_hcd driver seems to be only a work around. Sometimes = it even cause kernel oops.=20 I also wonder why the kernel 2.6.11-1.1369_FC4 can recognize USB storage = without UHCI suspend/resume support. Thanks Xiaoyang =20 -----Original Message----- From: qemu-devel-bounces+xiaoyang.yu=3Dintel.com@nongnu.org = [mailto:qemu-devel-bounces+xiaoyang.yu=3Dintel.com@nongnu.org] On Behalf = Of Lonnie Mendez Sent: 2007=C4=EA2=D4=C215=C8=D5 10:44 To: qemu-devel@nongnu.org Subject: RE: [Qemu-devel] USB storage cannot be recognized onguest = Linuxdomain? On Thu, 2007-02-15 at 10:36 +0800, Yu, Xiaoyang wrote: > Thanks a lot for the instruction. Will the suspend/resume support be = added in the future release?=20 >=20 > Without the suspend/resume support, is there anything can be done in = the guest domain to help detect a USB device? Maybe patch the kernel? For windows you can disable the power management for the controller. That will cause windows to constantly poll hub status. For linux you have to reload the uhci hcd driver. Notice that starting qemu with -usbdevice works. The code to implement this is very easy. You basically set/clear some bits and trigger an interrupt. See list archives for example code.