All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yu, Xiaoyang" <xiaoyang.yu@intel.com>
To: qemu-devel@nongnu.org
Subject: RE: [Qemu-devel] USB storage cannot be recognized on guest Linux domain?
Date: Thu, 15 Feb 2007 15:44:55 +0800	[thread overview]
Message-ID: <A3C277AA6499944188602D8A7168B9A70169C41D@bjsmsx401> (raw)
In-Reply-To: <1171507413.4091.48.camel@vaio>

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. 

I also wonder why the kernel 2.6.11-1.1369_FC4 can recognize USB storage without UHCI suspend/resume support.

Thanks
Xiaoyang
 
-----Original Message-----
From: qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org [mailto:qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org] On Behalf Of Lonnie Mendez
Sent: 2007年2月15日 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? 
> 
> 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.

  reply	other threads:[~2007-02-15  7:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-14  7:05 [Qemu-devel] USB storage cannot be recognized on guest Linux domain? Yu, Xiaoyang
2007-02-14 10:26 ` Yu, Xiaoyang
2007-02-14 11:27   ` AW: [Qemu-devel] USB storage cannot be recognized on guest Linuxdomain? Nenad Cimerman
2007-02-14 12:24     ` [Qemu-devel] USB storage cannot be recognized on guestLinuxdomain? Yu, Xiaoyang
2007-02-14 12:39       ` Yu, Xiaoyang
2007-02-14 15:00   ` [Qemu-devel] USB storage cannot be recognized on guest Linux domain? Lonnie Mendez
2007-02-15  2:36     ` [Qemu-devel] USB storage cannot be recognized on guest Linuxdomain? Yu, Xiaoyang
2007-02-15  2:43       ` Lonnie Mendez
2007-02-15  7:44         ` Yu, Xiaoyang [this message]
2007-02-15 14:48           ` [Qemu-devel] USB storage cannot be recognized on guest Linux domain? Lonnie Mendez
2007-02-16  5:10             ` [Qemu-devel] USB storage cannot be recognized on guest Linuxdomain? Yu, Xiaoyang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A3C277AA6499944188602D8A7168B9A70169C41D@bjsmsx401 \
    --to=xiaoyang.yu@intel.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.