|
Hans de Goede |
3f1f29 |
From 397fed3bc9bf6dd0e8e18c5be077897299e5c4e2 Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
3f1f29 |
From: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
3f1f29 |
Date: Thu, 30 Jun 2011 12:05:19 +0200
|
|
Hans de Goede |
3f1f29 |
Subject: [PATCH 03/35] usb: Move (initial) call of usb_port_location to
|
|
Hans de Goede |
3f1f29 |
usb_fill_port
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
Cleanup / preparation patch for companion controller support. Note that
|
|
Hans de Goede |
3f1f29 |
as a "side-effect" this patch also fixes the milkymist-softusb controller
|
|
Hans de Goede |
3f1f29 |
not having a port_location set for its ports.
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
3f1f29 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
3f1f29 |
---
|
|
Hans de Goede |
3f1f29 |
hw/usb-bus.c | 1 +
|
|
Hans de Goede |
3f1f29 |
hw/usb-ehci.c | 1 -
|
|
Hans de Goede |
3f1f29 |
hw/usb-musb.c | 1 -
|
|
Hans de Goede |
3f1f29 |
hw/usb-ohci.c | 1 -
|
|
Hans de Goede |
3f1f29 |
hw/usb-uhci.c | 1 -
|
|
Hans de Goede |
3f1f29 |
5 files changed, 1 insertions(+), 4 deletions(-)
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
diff --git a/hw/usb-bus.c b/hw/usb-bus.c
|
|
Hans de Goede |
3f1f29 |
index 776974e..e37e8a2 100644
|
|
Hans de Goede |
3f1f29 |
--- a/hw/usb-bus.c
|
|
Hans de Goede |
3f1f29 |
+++ b/hw/usb-bus.c
|
|
Hans de Goede |
3f1f29 |
@@ -149,6 +149,7 @@ static void usb_fill_port(USBPort *port, void *opaque, int index,
|
|
Hans de Goede |
3f1f29 |
port->index = index;
|
|
Hans de Goede |
3f1f29 |
port->ops = ops;
|
|
Hans de Goede |
3f1f29 |
port->speedmask = speedmask;
|
|
Hans de Goede |
3f1f29 |
+ usb_port_location(port, NULL, index + 1);
|
|
Hans de Goede |
3f1f29 |
}
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index,
|
|
Hans de Goede |
3f1f29 |
diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
|
|
Hans de Goede |
3f1f29 |
index 91fb7de..88cb2c2 100644
|
|
Hans de Goede |
3f1f29 |
--- a/hw/usb-ehci.c
|
|
Hans de Goede |
3f1f29 |
+++ b/hw/usb-ehci.c
|
|
Hans de Goede |
3f1f29 |
@@ -2206,7 +2206,6 @@ static int usb_ehci_initfn(PCIDevice *dev)
|
|
Hans de Goede |
3f1f29 |
for(i = 0; i < NB_PORTS; i++) {
|
|
Hans de Goede |
3f1f29 |
usb_register_port(&s->bus, &s->ports[i], s, i, &ehci_port_ops,
|
|
Hans de Goede |
3f1f29 |
USB_SPEED_MASK_HIGH);
|
|
Hans de Goede |
3f1f29 |
- usb_port_location(&s->ports[i], NULL, i+1);
|
|
Hans de Goede |
3f1f29 |
s->ports[i].dev = 0;
|
|
Hans de Goede |
3f1f29 |
}
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
diff --git a/hw/usb-musb.c b/hw/usb-musb.c
|
|
Hans de Goede |
3f1f29 |
index d15971f..84e6017 100644
|
|
Hans de Goede |
3f1f29 |
--- a/hw/usb-musb.c
|
|
Hans de Goede |
3f1f29 |
+++ b/hw/usb-musb.c
|
|
Hans de Goede |
3f1f29 |
@@ -369,7 +369,6 @@ struct MUSBState *musb_init(qemu_irq *irqs)
|
|
Hans de Goede |
3f1f29 |
usb_bus_new(&s->bus, &musb_bus_ops, NULL /* FIXME */);
|
|
Hans de Goede |
3f1f29 |
usb_register_port(&s->bus, &s->port, s, 0, &musb_port_ops,
|
|
Hans de Goede |
3f1f29 |
USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
|
|
Hans de Goede |
3f1f29 |
- usb_port_location(&s->port, NULL, 1);
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
return s;
|
|
Hans de Goede |
3f1f29 |
}
|
|
Hans de Goede |
3f1f29 |
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
|
|
Hans de Goede |
3f1f29 |
index 1c29b9f..95e4623 100644
|
|
Hans de Goede |
3f1f29 |
--- a/hw/usb-ohci.c
|
|
Hans de Goede |
3f1f29 |
+++ b/hw/usb-ohci.c
|
|
Hans de Goede |
3f1f29 |
@@ -1742,7 +1742,6 @@ static void usb_ohci_init(OHCIState *ohci, DeviceState *dev,
|
|
Hans de Goede |
3f1f29 |
for (i = 0; i < num_ports; i++) {
|
|
Hans de Goede |
3f1f29 |
usb_register_port(&ohci->bus, &ohci->rhport[i].port, ohci, i, &ohci_port_ops,
|
|
Hans de Goede |
3f1f29 |
USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
|
|
Hans de Goede |
3f1f29 |
- usb_port_location(&ohci->rhport[i].port, NULL, i+1);
|
|
Hans de Goede |
3f1f29 |
}
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
ohci->async_td = 0;
|
|
Hans de Goede |
3f1f29 |
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
|
|
Hans de Goede |
3f1f29 |
index 405fa7b..fd25d2a 100644
|
|
Hans de Goede |
3f1f29 |
--- a/hw/usb-uhci.c
|
|
Hans de Goede |
3f1f29 |
+++ b/hw/usb-uhci.c
|
|
Hans de Goede |
3f1f29 |
@@ -1129,7 +1129,6 @@ static int usb_uhci_common_initfn(PCIDevice *dev)
|
|
Hans de Goede |
3f1f29 |
for(i = 0; i < NB_PORTS; i++) {
|
|
Hans de Goede |
3f1f29 |
usb_register_port(&s->bus, &s->ports[i].port, s, i, &uhci_port_ops,
|
|
Hans de Goede |
3f1f29 |
USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
|
|
Hans de Goede |
3f1f29 |
- usb_port_location(&s->ports[i].port, NULL, i+1);
|
|
Hans de Goede |
3f1f29 |
}
|
|
Hans de Goede |
3f1f29 |
s->frame_timer = qemu_new_timer_ns(vm_clock, uhci_frame_timer, s);
|
|
Hans de Goede |
3f1f29 |
s->num_ports_vmstate = NB_PORTS;
|
|
Hans de Goede |
3f1f29 |
--
|
|
Hans de Goede |
3f1f29 |
1.7.5.1
|
|
Hans de Goede |
3f1f29 |
|