All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Large USB patch
Date: Sun, 23 Apr 2006 17:02:34 +0200	[thread overview]
Message-ID: <444B970A.3090706@bellard.org> (raw)
In-Reply-To: <4447E811.1040403@gmx.de>

Hi,

Could you make a small patch containing just the bug fixes of the state 
machine ?

Concerning your API changes, I am relunctant to include them now, but my 
mind can evolve. An API change that I would consider as very useful 
could be to be able to make asynchronous USB I/Os to avoid blocking QEMU 
while doing host USB I/Os.

Regards,

Fabrice.

nix.wie.weg@gmx.de wrote:
> Hello everybody,
> 
> I have extended the USB support for Qemu. The patch is included and
> compiles just fine against todays cvs repository. As explained below,
> this patch touches 15 different files, which makes it not so easy to
> keep it applying on that very fast developing project. Thats why I would
> ask you to test it quickly and apply it to cvs as soon as possible.
> 
> With this patch applied I could detect a USB Epson Scanner and a USB
> Epson Printer from Windows 98 + XP and I could even print pages with
> the printer (see known problems below).
> 
> reasons for this patch:
> I was looking for a way to address my USB printer with windows while
> working on linux. As I started the work I had to recognize that my
> printer was not even detected under qemu. So I started to work on it.
> 
> changes I made:
> First I eliminated all potential error sources, which could be avoided.
> One of these sources where the
> 
> 1. usb-hub - which I transfered to an extra file usb-hub.c, then I
> added the usb-libusb.c devices directly to the UHCI controller this
> introduced the changes of 2)
> 2. I enhanced the usb add device potentialities so that you should be
> able to add a device to the UHCI controller. This device can be a usb
> hub or a usb device. Behind this device you can add another hub or
> device ... (remember this feature is now theoretically possible but not
> tested yet), this let to a new usb syntax:
> #$ qemu -usb controller=uhci,busnum=001 device=host:2:3,addto=001:001
> (the short form is:
> #$ qemu -usb controller=uhci -usb device=host:2:3)
> so you can build up a complete usb tree.
> 3. I changed the usb_generic_handle_packet() function and implemented a
> state machine, which is able to handle the usb packets correct.
> 4. I changed the linux standard usb-host library to libusb. I personally
> will always prefer a portable solution if possible.
> 5. I changed large parts of usb-libusb.c. Some changes were made because
> I found the source very awkward, some others because I fixed errors and
> some because I changed the general usb api (see item 2).
> 6. I tried to join as many usb functions as possible to the usb related
> files. So that hopefully nobody has to change 15 files again.
> 7. I made minor changes to usb-uhci - mainly I applied the new api and
> changed the handling of special messages like usb_reset or usb_attach
> 8. I made the necessary changes to usb-hid.c and usb-hub.c
> 9. I wrote a lot of source comments
> 
> this patch breaks some things:
> Sorry guys but I could not fix all of it, so I need your help, I didn't
> want to destroy anybodys work, but the new api makes it necessary to
> change some files:
> 1. usb-linux.c and usb-bsd.c will not work without adoption of the new api
> 2. I did not test usb-hid and usb-hub
> 
> known problems:
> 1. under linux the uhci controller reports an error if no usb device is
> connected
> 2. the printer and the scanner are recognized under Windows 98/XP and
> Linux, but the scanner goes into STALL state as soon as a packet in
> usb_write_bulk() or usb_read_bulk()
> 3. the libusb usb_host_reset() function does not work as expected and I
> don't know why (i have commented out this part of the source)
> 4. the printer stops printing on large images and is then in a state,
> where it will not resume his work (probably a timing issue)
> 
> With kind regards,
> Tino H. Seifert
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel

  parent reply	other threads:[~2006-04-23 15:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-20 19:59 [Qemu-devel] Large USB patch nix.wie.weg
2006-04-21  2:23 ` Lonnie Mendez
2006-04-21  5:59   ` nix.wie.weg
2006-04-21  7:04     ` Lonnie Mendez
2006-04-21 14:53 ` Lonnie Mendez
2006-04-21 15:00   ` Lonnie Mendez
2006-04-21 15:50   ` Lonnie Mendez
2006-04-21 16:19     ` Lonnie Mendez
2006-04-21 16:29       ` nix.wie.weg
2006-04-21 17:28         ` Lonnie Mendez
2006-04-21 18:06           ` Lonnie Mendez
2006-04-21 18:38             ` Lonnie Mendez
2006-04-21 20:50               ` Lonnie Mendez
2006-04-22  9:33                 ` nix.wie.weg
2006-04-22 14:36                   ` Lonnie Mendez
2006-04-22 15:36                     ` nix.wie.weg
2006-04-22 15:38                       ` nix.wie.weg
2006-04-22 16:00                     ` nix.wie.weg
2006-04-22 16:19                       ` Lonnie Mendez
2006-04-22 16:35                         ` nix.wie.weg
2006-04-23  3:38                           ` Lonnie Mendez
2006-04-23 21:54                             ` nix.wie.weg
2006-04-29  1:03                             ` Lonnie Mendez
2006-04-29  3:29                               ` Lonnie Mendez
2006-04-30  0:46                                 ` Lonnie Mendez
2006-04-30 20:56                                   ` Lonnie Mendez
2006-04-21 16:26     ` nix.wie.weg
2006-04-22 14:15 ` nix.wie.weg
2006-04-23 15:02 ` Fabrice Bellard [this message]
2006-04-23 16:11   ` nix.wie.weg
2006-04-24 23:50 ` [Qemu-devel] Update for cvs 2006-04-24 nix.wie.weg

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=444B970A.3090706@bellard.org \
    --to=fabrice@bellard.org \
    --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.