summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2013-12-10net/cadence_gem: Fix small packet FCS strippingPeter Crosthwaite1-5/+8
The minimum packet size is 64, however this is before FCS stripping occurs. So when FCS stripping the minimum packet size is 60. Fix. Reported-by: Deepika Dhamija <deepika@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 8aac5bd737f9cf48b87f32943d7eb5939061e546.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10net/cadence_gem: Fix rx multi-fragment packetsPeter Crosthwaite1-1/+1
Bytes_to_copy was being updated before its final use where it advances the rx buffer pointer. This was causing total mayhem, where packet data for any subsequent fragments was being fetched from the wrong place. Reported-by: Deepika Dhamija <deepika@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: c2a1c65c1fd06eb274442a0fa4a6839d940e145e.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10net/cadence_gem: Add missing VMSTATE_END_OF_LISTPeter Crosthwaite1-0/+1
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 8f8c2bfb15f40fb5f0d5766aa4cd3d54c596de6a.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10net/cadence_gem: Implement SAR (de)activationPeter Crosthwaite1-4/+23
The Specific address registers can be enabled or disabled by software. QEMU was assuming they were always enabled. Implement the disable/enable feature. SARs are disabled by writing to the lower half register. They are re-enabled by then writing the upper half. Reported-by: Deepika Dhamija <deepika@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 49efd1f7450af8f980b967d3054245bae137866c.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10net/cadence_gem: Implement SAR match bit in rx descPeter Crosthwaite1-0/+2
Bit 27 of the RX buffer desc word 1 should be set when the packet was accepted due to specific address register match. Implement. This feature is absent from the Xilinx documentation (UG585) but the behaviour is tested as accurate on real hardware. Reported-by: Deepika Dhamija <deepika@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 7e3f26fc4ab244e8123efc12723e7164730abdcb.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10net/cadence_gem: Implement RX descriptor match mode flagsPeter Crosthwaite1-13/+69
The various Rx packet address matching mode flags were not being set in the rx descriptor. Implement. Reported-by: Deepika Dhamija <deepika@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 6002a24a6a8ceaa11d3009ab5392840d1c084b28.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10net/cadence_gem: Prefetch rx descriptors ASAPPeter Crosthwaite1-27/+35
The real hardware prefetches rx buffer descriptors ASAP and potentially throws relevant interrupts following the fetch even in the absence of a received packet. Reported-by: Deepika Dhamija <deepika@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 41629e35edfdb1f02f1e401f2c3d0e2e4c9e44b3.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10net/cadence_gem: simplify rx buf descriptor walkingPeter Crosthwaite1-28/+9
There was a replication of the rx descriptor address walking logic. Reorder the flow control to remove. This refactoring also obsoletes the local variables packet_desc_addr and last_desc_addr. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 2a425b457ff0b57274bf206ad2236690cd7f5909.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10net/cadence_gem: Don't assert against 0 buffer addressPeter Crosthwaite1-9/+0
This has no real hardware analog and asserting correctness of DMA addresses is not a perhiperal level problem. Delete. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: fc02417eb1874cb05e4f20531c6203c5a00110f1.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10net/cadence_gem: Update DMA rx descriptors as we process themEdgar E. Iglesias1-17/+16
We were updating the ownership bit of all descriptors if packets get split and written through several descriptors. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: d61b7847b51487118783c93765a485bc5c66d272.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10net/cadence_gem: Implement mac level loopback modePeter Crosthwaite1-1/+1
Cadence GEM has a MAC level loopback mode. Implement. Use the same basic operation as the already implemented PHY loopback. Reported-by: Deepika Dhamija <deepika@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 3a0baf1b6b2fc1be638bdf1a37408ec38988e970.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10hw/arm/virt: Support -cpu hostPeter Maydell1-0/+8
Support -cpu host in virt machine (treating it like an A15, ie with a GIC v2 and the A15's private peripherals.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Message-id: 1385140638-10444-12-git-send-email-peter.maydell@linaro.org
2013-12-10hw/arm: Add 'virt' platformPeter Maydell2-1/+445
Add 'virt' platform support corresponding to arch/arm/mach-virt in the Linux kernel tree. This has no platform-specific code but can use any device whose kernel driver is is able to work purely from a device tree node. We use this to instantiate a minimal set of devices: a GIC and some virtio-mmio transports. Signed-off-by: John Rigby <john.rigby@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Message-id: 1385140638-10444-8-git-send-email-peter.maydell@linaro.org [PMM: Significantly overhauled: * renamed user-facing machine to just "virt" * removed the A9 support (it can't work since the A9 has no generic timers) * added virtio-mmio transports instead of random set of 'soc' devices (though we retain a pl011 UART) * instead of updating io_base as we step through adding devices, define a memory map with an array (similar to vexpress) * similarly, define irqmap with an array * folded in some minor fixes from John's aarch64-support patch * rather than explicitly doing endian-swapping on FDT cells, use fdt APIs that let us just pass in host-endian values and let the fdt layer take care of the swapping * miscellaneous minor code cleanups and style fixes ] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10hw/arm/boot: Allow boards to provide an fdt blobJohn Rigby1-12/+20
If no fdt is provided on command line and the new field get_dtb in struct arm_boot_info is set then call it to get a device tree blob. Signed-off-by: John Rigby <john.rigby@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Message-id: 1385140638-10444-4-git-send-email-peter.maydell@linaro.org [PMM: minor tweaks and cleanup] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10cpu/a9mpcore: Add Global TimerFrançois LEGAL1-5/+21
Add the global timer to A9 MPCore. Signed-off-by: François LEGAL <devel@thom.fr.eu.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: ff92f35f438ac671b57d99d823723dd3e62d2c49.1385969450.git.peter.crosthwaite@xilinx.com [PC Changes: * new commit message * split off original version as a separate patch * Rebased against new mpcore implementation (with struct embedding) ] Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10hw/timer: Introduce ARM A9 Global Timer.Peter Crosthwaite2-0/+370
The ARM A9 MPCore has a timer that is global to all cores in the cluster. The timer is shared but each core has a private independent comparator and interrupt. Based on version contributed by Francois LEGAL. Signed-off-by: François LEGAL <devel@thom.fr.eu.org> Message-id: 4918e89476b8da916be2964ec41578b50d569a37.1385969450.git.peter.crosthwaite@xilinx.com [PC changes: * New commit message * Re-implemented as single timer model * Fixed backwards counting issue in polled mode * completed VMSD fields * macroified magic numbers (and headerified reg definitions) * split of as device-model-only patch * use bitops for 64 bit register access * Fixed auto increment mode to check condition properly * general cleanup (names/style etc). ] Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [PMM: * minor typo fixes * added missing return after error_setg() * dropped setting dc->no_user = 1 ] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10cpu/a9mpcore: reorder operations/declarationsPeter Crosthwaite1-14/+14
To make it consistent for easier code reading. The order in which variables are defined and functions are called is set to match the address map ordering. The new consistent order of doing stuff is: SCU -> GIC -> MPTimer -> WDT. 0 functional change. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 8f31398e6d9a93f57291399f269039da1a77a2b5.1385969450.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10cpu/a9mpcore: rename timerbusdev variablePeter Crosthwaite1-4/+4
Rename this variable for consistency with the above defined mptimerdev variable. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 28939ef95589a62414634e86c47cef76b21b15f7.1385969450.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-10integrator/cp: add support for REFCNT registerJan Petrous1-3/+10
Linux kernel from version 3.4 requires CM_REFCNT register for sched timer for Integrator/CP board (integrator_defconfig). See http://infocenter.arm.com/help/topic/com.arm.doc.dui0138e/ch04s06s11.html Signed-off-by: Jan Petrous <jan.petrous@tieto.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-12-07Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20131206.0' ↵Anthony Liguori1-5/+128
into staging vfio-pci updates include: - Update linux-headers to include KVM-VFIO device support - Enable QEMU support for KVM-VFIO device - Additional Nvidia x-vga quirk to ACK MSI interrupts - Debug options to disable MSI/X KVM acceleration - Fix to cleanup MSI-X vectors on shutdown and avoid IRQ route leaks The KVM-VFIO device support enables KVM to manage how it handles coherency instructions in the presence of non-coherent I/O. Dave Airlie had noted that the Nvidia MSI ACK support here may just be scratching the surface, but it's better than what we have now and it's only enabled via the x-vga option, so I'm willing to add since it does enable some users. # gpg: Signature made Fri 06 Dec 2013 12:28:19 PM PST using RSA key ID 3BB08B22 # gpg: Can't check signature: public key not found # By Alex Williamson # Via Alex Williamson * awilliam/tags/vfio-pci-for-qemu-20131206.0: vfio-pci: Release all MSI-X vectors when disabled vfio-pci: Add debug config options to disable MSI/X KVM support vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk vfio-pci: Make use of new KVM-VFIO device linux-headers: Update from v3.13-rc3 Message-id: 20131206204715.16731.12627.stgit@bling.home Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-12-07Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori1-23/+131
# By Paolo Bonzini (17) and others # Via Stefan Hajnoczi * stefanha/block: (48 commits) qemu-iotests: filter QEMU monitor \r\n aio: make aio_poll(ctx, true) block with no fds block: clean up bdrv_drain_all() throttling comments qcow2: use start_of_cluster() and offset_into_cluster() everywhere qemu-img: decrease progress update interval on convert qemu-img: round down request length to an aligned sector qemu-img: dynamically adjust iobuffer size during convert block/iscsi: set bs->bl.opt_transfer_length block: add opt_transfer_length to BlockLimits block/iscsi: set bdi->cluster_size qemu-img: fix usage instruction for qemu-img convert qemu-img: add support for skipping zeroes in input during convert qemu-nbd: add doc for option -f qemu-iotests: add test for snapshot in qemu-img convert qemu-img: add -l for snapshot in convert qemu-iotests: add 058 internal snapshot export with qemu-nbd case qemu-nbd: support internal snapshot export snapshot: distinguish id and name in load_tmp qemu-iotests: Split qcow2 only cases in 048 qemu-iotests: Clean up spaces in usage output ... Message-id: 1386347807-27359-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-12-07Merge remote-tracking branch 'kraxel/tags/pull-seabios-31b8b4e-1' into stagingAnthony Liguori2-3/+26
Update seabios to master snapshot (pre-1.7.4). Update vgabios, switch from lgplvgabios to seavgabios. Update build process to build both 128k and 256k bios versions. Use 256k bios for pc-*-2.0+ machine types. # gpg: Signature made Fri 06 Dec 2013 12:01:24 AM PST using RSA key ID D3E87138 # gpg: Can't check signature: public key not found # By Gerd Hoffmann # Via Gerd Hoffmann * kraxel/tags/pull-seabios-31b8b4e-1: pc: switch 2.0 machine types to large seabios binary roms: update vgabios binaries roms: update seabios binaries roms: enable seabios cross builds roms: build two seabios binaries roms: update seabios submodule to 31b8b4eea9d9ad58a73b22a6060d3ac1c419c26d add firmware to machine options add pc-{i440fx,q35}-2.0 machine types Message-id: 1386322527-23148-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-12-06Merge remote-tracking branch 'sstabellini/xen-2013-12-01' into stagingAnthony Liguori2-2/+7
# By Paul Durrant (1) and Wei Liu (1) # Via Stefano Stabellini * sstabellini/xen-2013-12-01: xen-pvdevice: make device-id property compulsory xen: fix two errors when debug is enabled Message-id: alpine.DEB.2.02.1312011829000.3198@kaball.uk.xensource.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-12-06Merge remote-tracking branch 'kraxel/tags/pull-usb-1' into stagingAnthony Liguori9-87/+300
Improvements for usb3 bulk stream (usb core, xhci). Bugfixes for uas emulation. Add remote wakeup support for ehci. Add suspend support for xhci. Misc minor tweaks and fixes. # gpg: Signature made Thu 28 Nov 2013 11:44:49 PM PST using RSA key ID D3E87138 # gpg: Can't check signature: public key not found # By Hans de Goede (11) and others # Via Gerd Hoffmann * kraxel/tags/pull-usb-1: usb: move usb_{hi,lo} helpers to header file. usb: add vendor request defines trace-events: Clean up after removal of old usb-host code Revert "usb-tablet: Don't claim wakeup capability for USB-2 version" ehci: implement port wakeup xhci: Call usb_device_alloc/free_streams usb: Add usb_device_alloc/free_streams usb: Add max_streams attribute to endpoint info uas: s/ui/iu/ uas: Fix response iu struct definition uas: Bounds check tags when using streams uas: Streams are numbered 1-y, rather then 0-x uas: Fix / cleanup usb_uas_task error handling uas: Only use report iu-s for task_mgmt status reporting scsi: Add 2 new sense codes needed by uas xhci: add support for suspend/resume xhci: Add a few missing checks for disconnected devices Message-id: 1385712381-30918-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-12-06eeprom93xx: fix coding styleAntony Pavlov1-31/+31
scripts/checkpatch.pl reports about some style problems, this commit fixes some of them: ERROR: space prohibited before open square bracket '[' + .fields = (VMStateField []) { ERROR: space prohibited after that '!' (ctx:BxW) + if (! eeprom->eecs && eecs) { ^ ERROR: space prohibited after that '!' (ctx:WxW) + } else if (eeprom->eecs && ! eecs) { ^ ERROR: space prohibited after that '!' (ctx:WxW) + } else if (eecs && ! eeprom->eesk && eesk) { ^ ERROR: switch and case should be at the same indent switch (address >> (eeprom->addrbits - 2)) { + case 0: [...] + case 1: [...] + case 2: [...] + case 3: ERROR: return is not a function, parentheses are not required + return (eeprom->eedo); ERROR: switch and case should be at the same indent switch (nwords) { + case 16: + case 64: [...] + case 128: + case 256: [...] + default: Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Stefan Weil <sw@weilnetz.de> Reviewed-by: Stefan Weil <sw@weilnetz.de> Cc: qemu-trivial@nongnu.org Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-06vfio-pci: Release all MSI-X vectors when disabledAlex Williamson1-0/+12
We were relying on msix_unset_vector_notifiers() to release all the vectors when we disable MSI-X, but this only happens when MSI-X is still enabled on the device. Perform further cleanup by releasing any remaining vectors listed as in-use after this call. This caused a leak of IRQ routes on hotplug depending on how the guest OS prepared the device for removal. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Cc: qemu-stable@nongnu.org
2013-12-06vfio-pci: Add debug config options to disable MSI/X KVM supportAlex Williamson1-4/+20
It's sometimes useful to be able to verify interrupts are passing through correctly. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-12-06vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirkAlex Williamson1-1/+29
When MSI is enabled on Nvidia GeForce cards the driver seems to acknowledge the interrupt by writing a 0xff byte to the MSI capability ID register using the PCI config space mirror at offset 0x88000 from BAR0. Without this, the device will only fire a single interrupt. VFIO handles the PCI capability ID/next registers as virtual w/o write support, so any write through config space is currently dropped. Add a check for this and allow the write through the BAR window. The registers are read-only anyway. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-12-06vfio-pci: Make use of new KVM-VFIO deviceAlex Williamson1-0/+67
Add and remove groups from the KVM virtual VFIO device as we make use of them. This allows KVM to optimize for performance and correctness based on properties of the group. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-12-06pc: switch 2.0 machine types to large seabios binaryGerd Hoffmann2-2/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-03scsi-disk: correctly implement WRITE SAMEPaolo Bonzini1-24/+116
Fetch the data to be written from the input buffer. If it is all zeroes, we can use the write_zeroes call (possibly with the new MAY_UNMAP flag). Otherwise, do as many write cycles as needed, writing 512k at a time. Strictly speaking, this is still incorrect because a zero cluster should only be written if the MAY_UNMAP flag is set. But this is a bug in qcow2 and the other formats, not in the SCSI code. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03scsi-disk: reject ANCHOR=1 for UNMAP and WRITE SAME commandsPaolo Bonzini1-1/+11
Since we report ANC_SUP==0 in VPD page B2h, we need to return an error (ILLEGAL REQUEST/INVALID FIELD IN CDB) for all WRITE SAME requests with ANCHOR==1. Inspired by a similar patch to the LIO in-kernel target. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03scsi-disk: catch write protection errors in UNMAPPaolo Bonzini1-0/+6
This is the same that is already done for WRITE SAME. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-02hw/ppc/mac.h: remove unused BIOS_FILENAME definitionMichael Tokarev1-1/+0
This definition has been moved to prep.c. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-02virtio-net: fix the indentZhi Yong Wu1-1/+1
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-02misc: Replace 'struct QEMUTimer' by 'QEMUTimer'Stefan Weil5-10/+10
Most code already used QEMUTimer without the redundant 'struct' keyword. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-02acpi-build: Fix compiler warning (missing gnu_printf format attribute)Stefan Weil1-2/+3
gcc 4.8.2 reports this warning when extra warnings are enabled (-Wextra): CC m68k-softmmu/hw/m68k/mcf5206.o hw/i386/acpi-build.c: In function ‘build_append_nameseg’: hw/i386/acpi-build.c:294:5: error: function might be possible candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] g_string_vprintf(s, format, args); ^ When this warning is fixed, there is a new compiler warning: CC i386-softmmu/hw/i386/acpi-build.o hw/i386/acpi-build.c: In function ‘build_append_notify’: hw/i386/acpi-build.c:632:5: error: format not a string literal and no format arguments [-Werror=format-security] build_append_nameseg(method, name); ^ This is fixed here, too. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-02trace: Remove trace.h from hw/usb/hcd-ehci.h (less dependencies)Stefan Weil2-1/+1
This reduces the dependencies on trace.h. Only one source file which needs hcd-ehci.h also needs trace.h. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-02trace: Remove trace.h from console.h (less dependencies)Stefan Weil1-0/+1
This reduces the dependencies on trace.h. Only two source files which need console.h also need trace.h. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-02add pc-{i440fx,q35}-2.0 machine typesGerd Hoffmann2-3/+22
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-01xen-pvdevice: make device-id property compulsoryPaul Durrant1-1/+5
The intention of the Xen PV device is that it is used as a parent device for PV drivers in Xen HVM guests and the set of PV drivers that bind to the device is determined by its device ID (and possibly vendor ID and revision). As such, the device should not have a default device ID, it should always be supplied by the Xen toolstack. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-12-01xen: fix two errors when debug is enabledWei Liu1-1/+2
This patch fixes: 1. build error in xen_pt.c when XEN_PT_LOGGING_ENABLED is defined 2. debug output format string error when DEBUG_XEN is defined In the second case I also have the output info in consistent with the output in mapping function - that is, print start_addr instead of phys_offset. Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-11-28usb: move usb_{hi,lo} helpers to header file.Gerd Hoffmann2-10/+11
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-11-28Revert "usb-tablet: Don't claim wakeup capability for USB-2 version"Gerd Hoffmann1-1/+1
This reverts commit aa1c9e971e80d25b92908dce3dec7c38b49480ea. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-11-28ehci: implement port wakeupGerd Hoffmann1-2/+16
Update portsc register and raise irq in case a suspended port is woken up, so remote wakeup works on our ehci ports. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-11-26xhci: Call usb_device_alloc/free_streamsHans de Goede1-0/+117
Note this code is not as KISS as I would like, the reason for this is that the Linux kernel interface wants streams on eps belonging to one interface to be allocated in one call. Things will also work if we do this one ep at a time (as long as all eps support the same amount of streams), but lets stick to the kernel API. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-11-26usb: Add usb_device_alloc/free_streamsHans de Goede1-0/+18
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-11-26usb: Add max_streams attribute to endpoint infoHans de Goede2-0/+24
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-11-26uas: s/ui/iu/Hans de Goede1-38/+38
The various uas data structures are called IU-s, which is short for Information Unit, rather then UI-s. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-11-26uas: Fix response iu struct definitionHans de Goede1-10/+8
This patch mirrors a patch to the Linux uas kernel driver which I've just submitted. It looks like the qemu uas struct definitions were taken from the Linux kernel driver, and have inherited the same mistake. Besides fixing the response iu struct, the patch also drops the add_info parameter from the usb_uas_queue_response() function, it is always 0 anyways, and expressing 3 zero-bytes as a function argument is a bit hard. Below is the long explanation for this change taken from the kernel commit: The response iu struct before this patch has a size of 7 bytes, which is weird since all other iu-s are explictly padded to a multiple of 4 bytes. Submitting a 7 byte bulk transfer to the status endpoint of a real uasp device when expecting a response iu results in an USB babble error, as the device actually sends 8 bytes. Up on closer reading of the UAS spec: http://www.t10.org/cgi-bin/ac.pl?t=f&f=uas2r00.pdf The reason for this becomes clear, the 2 entries in "Table 17 — RESPONSE IU" are numbered 4 and 6, looking at other iu definitions in the spec, esp. multi-byte fields, this indicates that the ADDITIONAL RESPONSE INFORMATION field is not a 2 byte field as one might assume at a first look, but is a multi-byte field containing 3 bytes. This also aligns with the SCSI Architecture Model 4 spec, which UAS is based on which states in paragraph "7.1 Task management function procedure calls" that the "Additional Response Information" output argument for a Task management function procedure call is 3 bytes. Last but not least I've verified this by sending a logical unit reset task management call with an invalid lun to an actual uasp device, and received back a response-iu with byte 6 being 0, and byte 7 being 9, which is the responce code for an invalid iu, which confirms that the response code is being reported in byte 7 of the response iu rather then in byte 6. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>