Statistics
| Branch: | Revision:

root / hw / usb / hcd-uhci.c @ c19537a1

History | View | Annotate | Download (37.2 kB)

# Date Author Comment
5e59b024 07/29/2012 05:05 pm Michael S. Tsirkin

Merge branch pci into master

Merge master and pci branch, resolve build breakage in hw/esp.c
introduced by f90c2bcd.

Conflicts:
hw/esp.c

75f151cd 07/12/2012 04:00 pm Gerd Hoffmann

uhci: initialize expire_time when loading v1 vmstate

$subject says all: when loading old (v1) vmstate which doesn't contain
expire_time initialize it with a reasonable default (current time).

Signed-off-by: Gerd Hoffmann <>

f90c2bcd 07/04/2012 03:52 pm Alex Williamson

pci: convert PCIUnregisterFunc to void

Not a single driver has any possibility of failure on their
exit function, let's keep it that way.

Signed-off-by: Alex Williamson <>
Signed-off-by: Michael S. Tsirkin <>

e2f89926 06/28/2012 12:33 am David Gibson

usb: Convert usb_packet_{map, unmap} to universal DMA helpers

The USB UHCI and EHCI drivers were converted some time ago to use the
pci_dma_*() helper functions. However, this conversion was not complete
because in some places both these drivers do DMA via the usb_packet_map()...

77fa9aee 06/20/2012 03:46 pm Gerd Hoffmann

uhci: fix uhci_async_cancel_all

We update the QTAILQ in the loop, thus we must use the SAFE version
to make sure we don't touch the queue struct after freeing it.

https://bugzilla.novell.com/show_bug.cgi?id=766310

Signed-off-by: Gerd Hoffmann <>

4aed20e2 06/07/2012 11:02 am Gerd Hoffmann

uhci: fix bandwidth management

uhci_process_frame() can be invoked multiple times per frame, so
accounting usb bandwith in a local variable doesn't fly, use a variable
in UHCIState instead. Also check the limit more frequently.

Signed-off-by: Gerd Hoffmann <>

9a16c595 06/07/2012 11:02 am Gerd Hoffmann

uhci: use bottom half

Schedule bottom half on completion of async packets instead of calling
uhci_process_frame directly. This way we run uhci_process_frame only
once in case multiple packets finish in a row. Also check whenever
there is bandwidth left before scheduling uhci_process_frame....

40141d12 06/07/2012 11:02 am Gerd Hoffmann

uhci: make bandwidth tunable

Add a property for the uhci bandwidth. Can be used to make uhci
emulation run faster than real hardware.

Signed-off-by: Gerd Hoffmann <>

5852d3bf 06/07/2012 11:02 am Gerd Hoffmann

uhci: zap uhci_pre_save

Cancel transactions before saving vmstate is pretty pointless and just
causes disruptions. We need to cancel them before loading vmstate,
but in that case uhci_reset() handles it already and no special action
is needed.

Signed-off-by: Gerd Hoffmann <>

973002c1 06/07/2012 11:02 am Gerd Hoffmann

uhci: fix irq routing

The multifunction ich9 ehci controller with uhci companions uses a
different interrupt pin for each function. The three uhci devices
get pins A, B and C, whereas ehci uses pin D. This way the guest
can assign different IRQ lines to each controller....

aba1f242 04/26/2012 01:21 pm Gerd Hoffmann

usb-uhci: update irq line on reset

uhci_reset() clears irq mask and irq status registers, but doesn't
update the irq line. Which may result in suspious IRQs after uhci
reset. Fix it.

Signed-off-by: Gerd Hoffmann <>

52b0fecd 04/17/2012 11:23 am Gerd Hoffmann

usb-uhci: stop queue filling when we find a in-flight td

Not only QHs can form rings, but TDs too. With the new
queuing/pipelining support we are following TD chains and
can actually walk in circles. An assert() prevents us from
entering an endless loop then....

ee008ba6 04/17/2012 11:23 am Gerd Hoffmann

usb-uhci: queuing fix

When we queue up usb packets we may happen to find a already queued
packet, which also might be finished at that point already. We don't
want continue processing the packet at this point though, so lets
just signal back we've found a in-flight packet when in queuing mode....

f1ae32a1 03/13/2012 11:15 am Gerd Hoffmann

usb: the big rename

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...

afb9a60e 03/13/2012 11:15 am Gerd Hoffmann

usb: zap hw/ush-{ohic,uhci}.h + init wrappers

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: Gerd Hoffmann <>

16ce543e 03/13/2012 11:15 am Gerd Hoffmann

uhci: pass addr to uhci_async_alloc

Also do async->td initialization in uhci_async_alloc now.
Prepares for adding tracepoints.

Signed-off-by: Gerd Hoffmann <>

60f8afcb 03/13/2012 11:15 am Gerd Hoffmann

uhci: fix uhci_async_cancel_all

It should also free all queues.

Signed-off-by: Gerd Hoffmann <>

d9a528db 03/13/2012 11:15 am Gerd Hoffmann

uhci: cancel on schedule stop.

Cancel any in-flight transaction when the guest stops the uhci schedule.

Signed-off-by: Gerd Hoffmann <>

50dcc0f8 03/13/2012 11:15 am Gerd Hoffmann

uhci: tracing support

Zap DPRINTF, add tracepoints instead.

Signed-off-by: Gerd Hoffmann <>

60e1b2a6 03/13/2012 11:15 am Gerd Hoffmann

uhci: use enum for uhci_handle_td return codes

Step #1 (separate for better bisectability): replace numbers with names.

Signed-off-by: Gerd Hoffmann <>

0cd178ca 03/13/2012 11:15 am Gerd Hoffmann

uhci: renumber uhci_handle_td return codes

Step #2 (separate for better bisectability): renumber so the silly '-1'
goes away. Pick a range which doesn't overlap the old values.

Signed-off-by: Gerd Hoffmann <>

4efe4ef3 03/13/2012 11:15 am Gerd Hoffmann

uhci: new uhci_handle_td return code for tds still in flight

Signed-off-by: Gerd Hoffmann <>

6c601340 03/13/2012 11:15 am Gerd Hoffmann

uhci: alloc can't fail, drop check.

Signed-off-by: Gerd Hoffmann <>