[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/23] usb: Move (initial) call of usb_port_location
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 03/23] usb: Move (initial) call of usb_port_location to usb_fill_port |
Date: |
Fri, 8 Jul 2011 11:50:53 +0200 |
From: Hans de Goede <address@hidden>
Cleanup / preparation patch for companion controller support. Note that
as a "side-effect" this patch also fixes the milkymist-softusb controller
not having a port_location set for its ports.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb-bus.c | 1 +
hw/usb-ehci.c | 1 -
hw/usb-musb.c | 1 -
hw/usb-ohci.c | 1 -
hw/usb-uhci.c | 1 -
5 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index 776974e..e37e8a2 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -149,6 +149,7 @@ static void usb_fill_port(USBPort *port, void *opaque, int
index,
port->index = index;
port->ops = ops;
port->speedmask = speedmask;
+ usb_port_location(port, NULL, index + 1);
}
void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index,
diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
index 91fb7de..88cb2c2 100644
--- a/hw/usb-ehci.c
+++ b/hw/usb-ehci.c
@@ -2206,7 +2206,6 @@ static int usb_ehci_initfn(PCIDevice *dev)
for(i = 0; i < NB_PORTS; i++) {
usb_register_port(&s->bus, &s->ports[i], s, i, &ehci_port_ops,
USB_SPEED_MASK_HIGH);
- usb_port_location(&s->ports[i], NULL, i+1);
s->ports[i].dev = 0;
}
diff --git a/hw/usb-musb.c b/hw/usb-musb.c
index d15971f..84e6017 100644
--- a/hw/usb-musb.c
+++ b/hw/usb-musb.c
@@ -369,7 +369,6 @@ struct MUSBState *musb_init(qemu_irq *irqs)
usb_bus_new(&s->bus, &musb_bus_ops, NULL /* FIXME */);
usb_register_port(&s->bus, &s->port, s, 0, &musb_port_ops,
USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
- usb_port_location(&s->port, NULL, 1);
return s;
}
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index 1c29b9f..95e4623 100644
--- a/hw/usb-ohci.c
+++ b/hw/usb-ohci.c
@@ -1742,7 +1742,6 @@ static void usb_ohci_init(OHCIState *ohci, DeviceState
*dev,
for (i = 0; i < num_ports; i++) {
usb_register_port(&ohci->bus, &ohci->rhport[i].port, ohci, i,
&ohci_port_ops,
USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
- usb_port_location(&ohci->rhport[i].port, NULL, i+1);
}
ohci->async_td = 0;
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 405fa7b..fd25d2a 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -1129,7 +1129,6 @@ static int usb_uhci_common_initfn(PCIDevice *dev)
for(i = 0; i < NB_PORTS; i++) {
usb_register_port(&s->bus, &s->ports[i].port, s, i, &uhci_port_ops,
USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
- usb_port_location(&s->ports[i].port, NULL, i+1);
}
s->frame_timer = qemu_new_timer_ns(vm_clock, uhci_frame_timer, s);
s->num_ports_vmstate = NB_PORTS;
--
1.7.1
- [Qemu-devel] [PULL] usb patch queue, Gerd Hoffmann, 2011/07/08
- [Qemu-devel] [PATCH 03/23] usb: Move (initial) call of usb_port_location to usb_fill_port,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 04/23] usb: Add a register_companion USB bus op., Gerd Hoffmann, 2011/07/08
- [Qemu-devel] [PATCH 02/23] usb: Add a usb_fill_port helper function, Gerd Hoffmann, 2011/07/08
- [Qemu-devel] [PATCH 10/23] usb: assert on calling usb_attach(port, NULL) on a port without a dev, Gerd Hoffmann, 2011/07/08
- [Qemu-devel] [PATCH 09/23] usb-ehci: cleanup port reset handling, Gerd Hoffmann, 2011/07/08
- [Qemu-devel] [PATCH 08/23] usb-ehci: Connect Status bit is read only, don't allow changing it by the guest, Gerd Hoffmann, 2011/07/08
- [Qemu-devel] [PATCH 11/23] usb-ehci: Fix handling of PED and PEDC port status bits, Gerd Hoffmann, 2011/07/08
- [Qemu-devel] [PATCH 01/23] hw/usb-musb.c: Don't misuse usb_packet_complete(), Gerd Hoffmann, 2011/07/08
- [Qemu-devel] [PATCH 07/23] usb-ehci: drop unused num-ports state member, Gerd Hoffmann, 2011/07/08
- [Qemu-devel] [PATCH 05/23] usb: Make port wakeup and complete ops take a USBPort instead of a Device, Gerd Hoffmann, 2011/07/08
- [Qemu-devel] [PATCH 14/23] usb-ohci: Add support for being a companion controller, Gerd Hoffmann, 2011/07/08