Revision 4706ab6c hw/usb-ehci.c
b/hw/usb-ehci.c | ||
---|---|---|
751 | 751 |
|
752 | 752 |
trace_usb_ehci_port_detach(port->index); |
753 | 753 |
|
754 |
ehci_queues_rip_device(s, port->dev); |
|
755 |
|
|
754 | 756 |
*portsc &= ~PORTSC_CONNECT; |
755 | 757 |
*portsc |= PORTSC_CSC; |
756 | 758 |
|
... | ... | |
764 | 766 |
} |
765 | 767 |
} |
766 | 768 |
|
769 |
static void ehci_child_detach(USBPort *port, USBDevice *child) |
|
770 |
{ |
|
771 |
EHCIState *s = port->opaque; |
|
772 |
|
|
773 |
ehci_queues_rip_device(s, child); |
|
774 |
} |
|
775 |
|
|
767 | 776 |
/* 4.1 host controller initialization */ |
768 | 777 |
static void ehci_reset(void *opaque) |
769 | 778 |
{ |
... | ... | |
2117 | 2126 |
cpu_register_physical_memory(addr, size, s->mem); |
2118 | 2127 |
} |
2119 | 2128 |
|
2120 |
static void ehci_device_destroy(USBBus *bus, USBDevice *dev) |
|
2121 |
{ |
|
2122 |
EHCIState *s = container_of(bus, EHCIState, bus); |
|
2123 |
|
|
2124 |
ehci_queues_rip_device(s, dev); |
|
2125 |
} |
|
2126 |
|
|
2127 | 2129 |
static int usb_ehci_initfn(PCIDevice *dev); |
2128 | 2130 |
|
2129 | 2131 |
static USBPortOps ehci_port_ops = { |
2130 | 2132 |
.attach = ehci_attach, |
2131 | 2133 |
.detach = ehci_detach, |
2134 |
.child_detach = ehci_child_detach, |
|
2132 | 2135 |
.complete = ehci_async_complete_packet, |
2133 | 2136 |
}; |
2134 | 2137 |
|
2135 | 2138 |
static USBBusOps ehci_bus_ops = { |
2136 |
.device_destroy = ehci_device_destroy, |
|
2137 | 2139 |
}; |
2138 | 2140 |
|
2139 | 2141 |
static PCIDeviceInfo ehci_info = { |
Also available in: Unified diff