qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] [USB] recent fixes
@ 2006-02-22  4:32 Lonnie Mendez
  0 siblings, 0 replies; only message in thread
From: Lonnie Mendez @ 2006-02-22  4:32 UTC (permalink / raw)
  To: qemu-devel

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

    Hello list.  I've bundled a few fixes recently posted along with a 
modification by myself.  Please find description below and patch attached.

usb-linux.c:

-Modified code in usb_host_scan function to avoid returning information 
on the host's root hubs.  These are the physical ports that the usb 
devices plug in to that show up with product id 0x0000 and vendor id 
0x0000.  This cleans up the information presented by 'info usbhost' by 
only showing usb devices on the system that can be proxied.

hw/usb-uhci.c:

The below changes were submitted by Krister Walfridsson to the list 
recently to allow further functionality with the uhci driver used by 
*BSD guests.

-Changed region number registered with pci_register_io_region from 0 to 4.
-Added USB release value to pci configuration space of the controller.




[-- Attachment #2: misc-usb-fixes.patch --]
[-- Type: text/plain, Size: 1352 bytes --]

--- a/qemu/usb-linux.c	2006-01-15 22:06:40.000000000 -0600
+++ b/qemu/usb-linux.c	2006-02-21 10:13:51.000000000 -0600
@@ -278,7 +354,7 @@
         if (strlen(line) > 0)
             line[strlen(line) - 1] = '\0';
         if (line[0] == 'T' && line[1] == ':') {
-            if (device_count) {
+            if (device_count && (vendor_id || product_id)) {
                 ret = func(opaque, bus_num, addr, class_id, vendor_id, 
                            product_id, product_name, speed);
                 if (ret)
@@ -321,7 +397,7 @@
         }
     fail: ;
     }
-    if (device_count) {
+    if (device_count && (vendor_id || product_id)) {
         ret = func(opaque, bus_num, addr, class_id, vendor_id, 
                    product_id, product_name, speed);
     }
--- a/qemu/hw/usb-uhci.c	2005-12-19 16:51:53.000000000 -0600
+++ b/qemu/hw/usb-uhci.c	2006-02-21 10:25:45.000000000 -0600
@@ -654,6 +661,7 @@
     pci_conf[0x0b] = 0x0c;
     pci_conf[0x0e] = 0x00; // header_type
     pci_conf[0x3d] = 4; // interrupt pin 3
+    pci_conf[0x60] = 0x10; // release number
     
     for(i = 0; i < NB_PORTS; i++) {
         port = &s->ports[i];
@@ -666,6 +674,6 @@
 
     uhci_reset(s);
 
-    pci_register_io_region(&s->dev, 0, 0x20, 
+    pci_register_io_region(&s->dev, 4, 0x20, 
                            PCI_ADDRESS_SPACE_IO, uhci_map);
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-22  4:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-22  4:32 [Qemu-devel] [PATCH] [USB] recent fixes Lonnie Mendez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).