* [Qemu-devel] [PULL 0/4] Usb 20170913 patches
@ 2017-09-13 9:32 Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 1/4] xhci: Avoid DMA when ERSTBA is set to zero Gerd Hoffmann
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2017-09-13 9:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
The following changes since commit 619c200f6ce2f44fbc8a5732174530c3b4782aab:
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging (2017-09-11 11:44:30 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu tags/usb-20170913-pull-request
for you to fetch changes up to 2041649f0b04f61869589571ddf5ecd4f0695ea2:
usb: only build usb-host with CONFIG_USB=y (2017-09-13 10:44:49 +0200)
----------------------------------------------------------------
usb: misc small fixes.
----------------------------------------------------------------
Alexey Kardashevskiy (1):
xhci: Avoid DMA when ERSTBA is set to zero
Gerd Hoffmann (2):
usb: drop HOST_USB
usb: only build usb-host with CONFIG_USB=y
Philippe Mathieu-Daudé (1):
MAINTAINERS: add missing USB entry
configure | 7 -------
hw/usb/hcd-xhci.c | 4 ++--
MAINTAINERS | 1 +
hw/usb/Makefile.objs | 6 +++++-
4 files changed, 8 insertions(+), 10 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 1/4] xhci: Avoid DMA when ERSTBA is set to zero
2017-09-13 9:32 [Qemu-devel] [PULL 0/4] Usb 20170913 patches Gerd Hoffmann
@ 2017-09-13 9:32 ` Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 2/4] MAINTAINERS: add missing USB entry Gerd Hoffmann
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2017-09-13 9:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexey Kardashevskiy, Gerd Hoffmann
From: Alexey Kardashevskiy <aik@ozlabs.ru>
The existing XHCI code reads the Event Ring Segment Table Base Address
Register (ERSTBA) every time when it is changed. However zero is its
default state so one would think that zero there means it is not in use.
This adds a check for ERSTBA in addition to the existing check for
the Event Ring Segment Table Size Register (ERSTSZ).
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id: 20170911065606.40600-1-aik@ozlabs.ru
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-xhci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 204ea69d3f..d75c085d94 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -811,8 +811,9 @@ static void xhci_er_reset(XHCIState *xhci, int v)
{
XHCIInterrupter *intr = &xhci->intr[v];
XHCIEvRingSeg seg;
+ dma_addr_t erstba = xhci_addr64(intr->erstba_low, intr->erstba_high);
- if (intr->erstsz == 0) {
+ if (intr->erstsz == 0 || erstba == 0) {
/* disabled */
intr->er_start = 0;
intr->er_size = 0;
@@ -824,7 +825,6 @@ static void xhci_er_reset(XHCIState *xhci, int v)
xhci_die(xhci);
return;
}
- dma_addr_t erstba = xhci_addr64(intr->erstba_low, intr->erstba_high);
pci_dma_read(PCI_DEVICE(xhci), erstba, &seg, sizeof(seg));
le32_to_cpus(&seg.addr_low);
le32_to_cpus(&seg.addr_high);
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 2/4] MAINTAINERS: add missing USB entry
2017-09-13 9:32 [Qemu-devel] [PULL 0/4] Usb 20170913 patches Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 1/4] xhci: Avoid DMA when ERSTBA is set to zero Gerd Hoffmann
@ 2017-09-13 9:32 ` Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 3/4] usb: drop HOST_USB Gerd Hoffmann
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2017-09-13 9:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Gerd Hoffmann
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 36eeb42d19..2c333aba21 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -999,6 +999,7 @@ F: docs/usb2.txt
F: docs/usb-storage.txt
F: include/hw/usb.h
F: include/hw/usb/
+F: default-configs/usb.mak
USB (serial adapter)
M: Gerd Hoffmann <kraxel@redhat.com>
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 3/4] usb: drop HOST_USB
2017-09-13 9:32 [Qemu-devel] [PULL 0/4] Usb 20170913 patches Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 1/4] xhci: Avoid DMA when ERSTBA is set to zero Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 2/4] MAINTAINERS: add missing USB entry Gerd Hoffmann
@ 2017-09-13 9:32 ` Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 4/4] usb: only build usb-host with CONFIG_USB=y Gerd Hoffmann
2017-09-14 15:32 ` [Qemu-devel] [PULL 0/4] Usb 20170913 patches Peter Maydell
4 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2017-09-13 9:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Nowdays we use libusb for usb-host, so we don't have different code
for linux vs. bsd any more. So there is little reason to have the
HOST_USB variable, we can just write things directly into the Makefile
and avoid a pointless indirection.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20170908111217.21985-2-kraxel@redhat.com
---
configure | 7 -------
hw/usb/Makefile.objs | 6 +++++-
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/configure b/configure
index fd7e3a5e81..5367260c80 100755
--- a/configure
+++ b/configure
@@ -5967,13 +5967,6 @@ if test "$live_block_migration" = "yes" ; then
echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
fi
-# USB host support
-if test "$libusb" = "yes"; then
- echo "HOST_USB=libusb legacy" >> $config_host_mak
-else
- echo "HOST_USB=stub" >> $config_host_mak
-fi
-
# TPM passthrough support?
if test "$tpm" = "yes"; then
echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak
diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
index 97f1c4561a..a43ebbc17f 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -38,7 +38,11 @@ endif
common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
# usb pass-through
-common-obj-y += $(patsubst %,host-%.o,$(HOST_USB))
+ifeq ($(CONFIG_LIBUSB),y)
+common-obj-y += host-libusb.o host-legacy.o
+else
+common-obj-y += host-stub.o
+endif
ifeq ($(CONFIG_USB_LIBUSB),y)
common-obj-$(CONFIG_XEN) += xen-usb.o
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 4/4] usb: only build usb-host with CONFIG_USB=y
2017-09-13 9:32 [Qemu-devel] [PULL 0/4] Usb 20170913 patches Gerd Hoffmann
` (2 preceding siblings ...)
2017-09-13 9:32 ` [Qemu-devel] [PULL 3/4] usb: drop HOST_USB Gerd Hoffmann
@ 2017-09-13 9:32 ` Gerd Hoffmann
2017-09-14 15:32 ` [Qemu-devel] [PULL 0/4] Usb 20170913 patches Peter Maydell
4 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2017-09-13 9:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-id: 20170908111217.21985-3-kraxel@redhat.com
---
hw/usb/Makefile.objs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
index a43ebbc17f..757e365562 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -38,7 +38,7 @@ endif
common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
# usb pass-through
-ifeq ($(CONFIG_LIBUSB),y)
+ifeq ($(CONFIG_LIBUSB)$(CONFIG_USB),yy)
common-obj-y += host-libusb.o host-legacy.o
else
common-obj-y += host-stub.o
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] Usb 20170913 patches
2017-09-13 9:32 [Qemu-devel] [PULL 0/4] Usb 20170913 patches Gerd Hoffmann
` (3 preceding siblings ...)
2017-09-13 9:32 ` [Qemu-devel] [PULL 4/4] usb: only build usb-host with CONFIG_USB=y Gerd Hoffmann
@ 2017-09-14 15:32 ` Peter Maydell
4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2017-09-14 15:32 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 13 September 2017 at 10:32, Gerd Hoffmann <kraxel@redhat.com> wrote:
> The following changes since commit 619c200f6ce2f44fbc8a5732174530c3b4782aab:
>
> Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging (2017-09-11 11:44:30 +0100)
>
> are available in the git repository at:
>
> git://git.kraxel.org/qemu tags/usb-20170913-pull-request
>
> for you to fetch changes up to 2041649f0b04f61869589571ddf5ecd4f0695ea2:
>
> usb: only build usb-host with CONFIG_USB=y (2017-09-13 10:44:49 +0200)
>
> ----------------------------------------------------------------
> usb: misc small fixes.
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-09-14 15:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-13 9:32 [Qemu-devel] [PULL 0/4] Usb 20170913 patches Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 1/4] xhci: Avoid DMA when ERSTBA is set to zero Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 2/4] MAINTAINERS: add missing USB entry Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 3/4] usb: drop HOST_USB Gerd Hoffmann
2017-09-13 9:32 ` [Qemu-devel] [PULL 4/4] usb: only build usb-host with CONFIG_USB=y Gerd Hoffmann
2017-09-14 15:32 ` [Qemu-devel] [PULL 0/4] Usb 20170913 patches Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).