All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] USB support
@ 2005-11-05 14:45 Fabrice Bellard
  2005-11-05 16:31 ` Volker Ruppert
  2005-11-06  2:04 ` [Qemu-devel] " Mark Williamson
  0 siblings, 2 replies; 12+ messages in thread
From: Fabrice Bellard @ 2005-11-05 14:45 UTC (permalink / raw)
  To: qemu-devel

Hi,

I just commited an initial USB support for QEMU. This USB layer will 
ultimately enable QEMU to use some host USB devices and to simulate USB 
devices.

WARNING: the current USB support is for USB hackers only - it is not 
meant to be fully usable yet.

The following features are implemented:

- PCI UHCI USB controller (I finally decided to implement UHCI because I 
know it better than OHCI and because Bochs has a similar driver. Of 
course it would still be very interesting to have an equivalent OHCI 
controller for non PC targets and an EHCI controller for USB 2.0 devices).

- Virtual USB 1.1 hub.

- Linux host USB redirector to use the USB 1.1 host devices which are 
not requested by the host OS (i.e. no host driver is loaded for them). 
It is *very* limited and buggy at the moment, but I was able (once !) to 
mount a disk-on-key flash device.

I plan to implement a USB mouse device as in Bochs just to have at least 
one "useful" virtual USB device to play with. Anyone is free to 
implement other devices by looking at the USB hub implementation in usb.c.

Fabrice.

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [Qemu-devel] USB support
@ 2008-02-09 15:34 Marek Zelem
  2008-02-10 13:06 ` Arnon Gilboa
  0 siblings, 1 reply; 12+ messages in thread
From: Marek Zelem @ 2008-02-09 15:34 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]


    Hi

I want to inform you that I successfully attached my Canon MP830
(printer, scanner, fax) to Qemu via USB.
It was not easy, I had to pass though two stoppages.

1. There is no support for multi port/config (do not know proper term
for that) USB devices in Qemu. Meaning that if single USB device
provides multiple functionalities (like printer, scanner, fax) it will
be rejected by Qemu.
Fortunately there is patch for that available on internet page
http://www.wina.at/uni/html/linux-qemu.html
(qemu-0.9.0-usb-multi-configs.patch).

2. When I applied the patch I hit another issue. When the USB device is
not ready it is automatically switched to HALT state (if I understood it
correctly) and additional ioctl USBDEVFS_CLEAR_HALT is required to give
device another chance. Thus, I have written patch for that issue. The
patch I am sending as attachment.

When I applied both patches, everything worked fine. I suggest to
include those two patches in Qemu.

Best regards

Marek Zelem

--
  e-mail: marek@terminus.sk
  web: http://marek.terminus.sk/
  pgp key: http://marek.terminus.sk/gpg.txt


[-- Attachment #2: qemu-0.9.0-usb-clrhalt.patch --]
[-- Type: text/x-patch, Size: 524 bytes --]

--- usb-linux.c.orig	2008-01-12 12:56:09.000000000 +0100
+++ usb-linux.c	2008-01-12 14:02:47.000000000 +0100
@@ -229,12 +229,14 @@
     if (ret < 0) {
         switch(errno) {
         case ETIMEDOUT:
+	    ret = ioctl(s->fd, USBDEVFS_CLEAR_HALT, &(bt.ep));
             return USB_RET_NAK;
         case EPIPE:
         default:
 #ifdef DEBUG
             printf("handle_data: errno=%d\n", errno);
 #endif
+	    ret = ioctl(s->fd, USBDEVFS_CLEAR_HALT, &(bt.ep));
             return USB_RET_STALL;
         }
     } else {

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-02-10 13:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-05 14:45 [Qemu-devel] USB support Fabrice Bellard
2005-11-05 16:31 ` Volker Ruppert
2005-11-05 17:10   ` Fabrice Bellard
2005-11-05 17:24     ` Lonnie Mendez
2005-11-06 14:11       ` Fabrice Bellard
2005-11-13  1:00         ` [Qemu-devel] [patch] " Oliver Gerlich
2005-11-13 21:47           ` Fabrice Bellard
2005-11-05 23:39     ` [Qemu-devel] " Matthew Mastracci
2005-11-06  2:04 ` [Qemu-devel] " Mark Williamson
2005-11-06  2:10   ` Paul Brook
2008-02-09 15:34 Marek Zelem
2008-02-10 13:06 ` Arnon Gilboa

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.