mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
usb: Make port wakeup and complete ops take a USBPort instead of a Device
This makes them consistent with the attach and detach ops, and in general it makes sense to make portops take a port as argument. This also makes adding support for a companion controller easier / cleaner. [ kraxel: fix usb-musb.c build ] Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
ae60fea97c
commit
d47e59b8b8
7 changed files with 28 additions and 26 deletions
10
hw/usb-hub.c
10
hw/usb-hub.c
|
@ -246,10 +246,10 @@ static void usb_hub_detach(USBPort *port1)
|
|||
}
|
||||
}
|
||||
|
||||
static void usb_hub_wakeup(USBDevice *dev)
|
||||
static void usb_hub_wakeup(USBPort *port1)
|
||||
{
|
||||
USBHubState *s = dev->port->opaque;
|
||||
USBHubPort *port = &s->ports[dev->port->index];
|
||||
USBHubState *s = port1->opaque;
|
||||
USBHubPort *port = &s->ports[port1->index];
|
||||
|
||||
if (port->wPortStatus & PORT_STAT_SUSPEND) {
|
||||
port->wPortChange |= PORT_STAT_C_SUSPEND;
|
||||
|
@ -257,9 +257,9 @@ static void usb_hub_wakeup(USBDevice *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void usb_hub_complete(USBDevice *dev, USBPacket *packet)
|
||||
static void usb_hub_complete(USBPort *port, USBPacket *packet)
|
||||
{
|
||||
USBHubState *s = dev->port->opaque;
|
||||
USBHubState *s = port->opaque;
|
||||
|
||||
/*
|
||||
* Just pass it along upstream for now.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue