- 13 3月, 2012 4 次提交
-
-
由 Gerd Hoffmann 提交于
It should also free all queues. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Also do async->td initialization in uhci_async_alloc now. Prepares for adding tracepoints. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Remove the uhci and ohci init wrappers, which all wrapped a pci_create_simple() one-liner. Switch callsites to call pci_create_simple directly. Remove the header files where the wrappers where declared. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Reorganize usb source files. Create a new hw/usb/ directory and move all usb source code to that place. Also make filenames a bit more descriptive. Host adapters are prefixed with "hch-" now, usb device emulations are prefixed with "dev-". Fixup paths Makefile and include paths to make it compile. No code changes. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 07 3月, 2012 2 次提交
-
-
由 Gerd Hoffmann 提交于
-
由 Hans de Goede 提交于
We already have USB_RET_NAK, but that means that a device does not want to send/receive right now. But with host / network redirection we can actually have a transaction fail due to some io error, rather then ie the device just not having any data atm. This patch adds a new error code named USB_RET_IOERROR for this, and uses it were appropriate. Notes: -Currently all usb-controllers handle this the same as NODEV, but that may change in the future, OHCI could indicate a CRC error instead for example. -This patch does not touch hw/usb-musb.c, that is because the code in there handles STALL and NAK specially and has a if status < 0 generic catch all for all other errors Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 27 2月, 2012 4 次提交
-
-
由 Gerd Hoffmann 提交于
When a usb device is busy processing a packet (and returns USB_RET_ASYNC), continue walking the transfer descriptor list and process them to fill the request queue. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Restruct the uhci_handle_td return code processing to make the control flow more clear and the code more readable. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
UHCIAsync structs (in-flight requests) grouped in UHCIQueue now. Each (active) usb endpoint gets its own UHCIQueue. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 15 2月, 2012 1 次提交
-
-
由 Andreas Färber 提交于
Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: NAndreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 10 2月, 2012 5 次提交
-
-
由 Gerd Hoffmann 提交于
With the separation of the device lookup (via usb_find_device) and packet processing we can lookup device and endpoint before setting up the usb packet. So we can initialize USBPacket->ep early and keep it valid for the whole lifecycle of the USBPacket. Also the devaddr and devep fields are not needed any more. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Add enum to track the status of USBPackets, use that instead of the owner pointer to figure whenever a usb packet is currently in flight or not. Add some more packet status sanity checks. Also rename the USBEndpoint pointer from "owner" to "ep". Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Switch over UHCI to use the new usb_find_device() function for device lookup. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
The USB subsystem pipes internal reset notifications through usb_handle_packet() with a special magic PID. This indirection is a pretty pointless excercise as it ends up being handled by usb_generic_handle_packet anyway. Replace the USB_MSG_RESET with a usb_device_reset() function which can be called directly. Also rename the existing usb_reset() function to usb_port_reset() to avoid confusion. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
The OS is allowed to make the UHCI Controller run in circles. That is usually done to serve multiple connected USB devices in a robin-round fashion, so the available USB bandwidth is evenly distributed between devices. The uhci emulation handles this in a very poor way though. When it figures it runs in circles it stops processing unconditionally, so it usually processes at most a single transfer desriptor per queue, even if there are multiple transfer descriptors are queued up. This patch makes uhci act in a more sophisticated way. It keeps track of successful processed transfer descriptors and transfered bytes. Then it will stop processing when there is nothing to do (no transfer descriptor was completed the last round) or when the transfered data reaches the usb bandwidth limit. Result is that the usb-storage devices connected to uhci are ten times faster, mkfs.vfat time for a 64M stick goes down from five seconds to a half second. Reason for this is that we are now processing up to 20 transfer descriptors (with 64 bytes each) per frame instead of a single one. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 04 2月, 2012 1 次提交
-
-
由 Anthony Liguori 提交于
This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree. The first step was a sed-based addition of the parent type to the subclass registration functions. The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate. Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls. We are almost fully converted to QOM after this commit. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 28 1月, 2012 2 次提交
-
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
These are various small stylistic changes which help make things more consistent such that the automated conversion script can be simpler. It's not necessary to agree or disagree with these style changes because all of this code is going to be rewritten by the patch monkey script anyway. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 17 1月, 2012 1 次提交
-
-
由 Gerd Hoffmann 提交于
Add USBEndpoint for the control endpoint to USBDevices. Link async packets to the USBEndpoint instead of the USBDevice. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 13 12月, 2011 1 次提交
-
-
由 David Gibson 提交于
This patch removes some unnecessary casts in the usb-uhci device, introduced by commit fff23ee9 'usb-uhci: Use PCI DMA stub functions'. Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 02 11月, 2011 1 次提交
-
-
由 David Gibson 提交于
This updates the usb-uhci device emulation to use the explicit PCI DMA wrapper to initialize its scatter/gathjer structure. This means this driver should not need further changes when the sglist interface is extended to support IOMMUs. Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 13 10月, 2011 1 次提交
-
-
由 Gerd Hoffmann 提交于
commit 891fb2cd removed the implicit detach before (re-)attaching in usb_attach(). Some usb host controllers used that behavior though to do a port reset by a detach+attach sequence. This patch establishes old behavior by adding a new usb_reset() function for port resets and putting it into use, thereby also unifying port reset behavior of all host controllers. The patch also adds asserts to usb_attach() and usb_detach() to make sure the calls are symmetrical. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 20 9月, 2011 1 次提交
-
-
由 Michael S. Tsirkin 提交于
Fix up some erroneous comments in code: interrupt pins are named A-D, the interrupt pin register is always readonly and isn't zeroed out on reset. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 07 9月, 2011 1 次提交
-
-
由 Gerd Hoffmann 提交于
This patch makes qemu assign a port when creating the device, not when attaching it. For most usb devices this isn't a noticable difference because they are in attached state all the time. The change affects usb-host devices which live in detached state while the real device is unplugged from the host. They have a fixed port assigned all the time now instead of getting grabbing one on attach and releasing it at detach, i.e. they stop floating around at the usb bus. The change also allows to simplify usb-hub. It doesn't need the handle_attach() callback any more to configure the downstream ports. This can be done at device initialitation time now. The changed initialization order (first grab upstream port, then register downstream ports) also fixes some icky corner cases. For example it is not possible any more to plug the hub into one of its own downstream ports. The usb host adapters must care too. USBPort->dev being non-NULL doesn't imply any more the device is in attached state. The host adapters must additionally check the USBPort->dev->attached flag. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 21 8月, 2011 1 次提交
-
-
由 Anthony Liguori 提交于
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 08 8月, 2011 2 次提交
-
-
由 Avi Kivity 提交于
Reviewed-by: NRichard Henderson <rth@twiddle.net> Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NAvi Kivity <avi@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Avi Kivity 提交于
Reviewed-by: NRichard Henderson <rth@twiddle.net> Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NAvi Kivity <avi@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 04 8月, 2011 2 次提交
-
-
由 Gerd Hoffmann 提交于
Map guest memory and pass on a direct pointer instead of copying the bits to a indirect buffer. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Zap data pointer from USBPacket, add a QEMUIOVector instead. Add a bunch of helper functions to manage USBPacket data. Switch over users to the new interface. Note that USBPacket->len was used for two purposes: First to pass in the buffer size and second to return the number of transfered bytes or the status code on async transfers. There is a new result variable for the latter. A new status code was added to catch uninitialized result. Nobody creates iovecs with more than one element (yet). Some users are (temporarely) limited to iovecs with a single element to keep the patch size as small as possible. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 22 7月, 2011 1 次提交
-
-
由 Gerd Hoffmann 提交于
Spec on UHCI_STS_USBERR: "If the TD on which the error interrupt occurred also had its IOC bit set, both this bit and Bit 0 are set." Make UHCI emulation do that. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 05 7月, 2011 5 次提交
-
-
由 Gerd Hoffmann 提交于
Add ich9 controllers, Factor out properties to a separate struct and reference it to reduce duplication. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Hans de Goede 提交于
To use as a companion controller set the masterbus property. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Hans de Goede 提交于
Note this fixes 2 things in one go, first of all the device_destroy bus op should be a device_detach bus op, as pending async packets from the device should be cancelled on detach not on destroy. Secondly having this as a bus op won't work with companion controllers, since then there will be 1 bus driven by the ehci controller and thus 1 set of bus ops, but the device being detached may be downstream of a handed over port. Making the detach of a downstream device a port op allows the ehci controller to forward this to the companion controller port for handed over ports. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Hans de Goede 提交于
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: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Hans de Goede 提交于
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: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 14 6月, 2011 3 次提交
-
-
由 Gerd Hoffmann 提交于
expire_time must be initialited when the guest activates the usb scheduler, not at device creation time. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Brad Hards 提交于
Signed-off-by: NBrad Hards <bradh@frogmouth.net> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
This patch adds USBBusOps struct with (for now) only a single callback which is called when a device is about to be destroyed. The USB Host adapters are implementing this callback and use it to cancel any async requests which might be in flight before the device actually goes away. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 12 6月, 2011 1 次提交
-
-
由 Isaku Yamahata 提交于
use PCIDeviceInfo to initialize ids. Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-