* Re: [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13
@ 2013-05-02 20:21 Ed Maste
2013-05-03 6:09 ` Gerd Hoffmann
0 siblings, 1 reply; 3+ messages in thread
From: Ed Maste @ 2013-05-02 20:21 UTC (permalink / raw)
To: qemu-devel
I recently discovered QEMU's libusb support and hoped that this would
provide a good solution for the USB host issue on current FreeBSD
versions. (Right now the FreeBSD ports tree sets USB_HOST=stub, since
the bsd USB code isn't compatible with FreeBSD 8.x and later.)
I'm wondering how best to address QEMU's libusb support on FreeBSD,
and discovered the libusb vs. libusbx saga. Is it safe to assume that
in the Linux world "pkg-config libusb-1.0" is generally going to refer
to libusbx?
FreeBSD has its own libusb-compatible implementation, but currently
lacks libusb_get_port_path and perhaps others, and if libusbx is
virtually universal on Linux we presumably want to grow these same
interfaces.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13
2013-05-02 20:21 [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13 Ed Maste
@ 2013-05-03 6:09 ` Gerd Hoffmann
0 siblings, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2013-05-03 6:09 UTC (permalink / raw)
To: Ed Maste; +Cc: qemu-devel
Hi,
> I'm wondering how best to address QEMU's libusb support on FreeBSD,
> and discovered the libusb vs. libusbx saga. Is it safe to assume that
> in the Linux world "pkg-config libusb-1.0" is generally going to refer
> to libusbx?
In recent linux distributions yes.
> FreeBSD has its own libusb-compatible implementation, but currently
> lacks libusb_get_port_path and perhaps others, and if libusbx is
> virtually universal on Linux we presumably want to grow these same
> interfaces.
Yes.
Even better would be to get the freebsd support merged into libusbx.
/me suspects the reason why freebsd has its own implementation is
basically the same why the libusbx exists in the first place: unfriendly
libusb upstream.
So if you tried + failed to merge the freebsd bits to libusb in the past
it is worth trying again to get them into libusbx, then switch over
freebsd to libusbx too.
cheers,
Gerd
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PULL 0/4] usb patch queue
@ 2013-04-23 8:32 Gerd Hoffmann
2013-04-23 8:32 ` [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13 Gerd Hoffmann
0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2013-04-23 8:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
Nothing major, just some small fixes.
please pull,
Gerd
The following changes since commit 456736710df19c2275192269fe67a3f0b2583835:
block: Fix build with tracing enabled (2013-04-22 11:31:41 -0500)
are available in the git repository at:
git://git.kraxel.org/qemu usb.81
for you to fetch changes up to 3f5cc97e2ba00b34fd20a5553ed9d2fecf32f7e3:
usb-host: raise libusbx minimum version to 1.0.13 (2013-04-23 08:43:10 +0200)
----------------------------------------------------------------
Gerd Hoffmann (3):
xhci: remove XHCIRing->base (unused)
usb: better speed mismatch error reporting
usb-host: raise libusbx minimum version to 1.0.13
Hans de Goede (1):
ehci_free_packet: Discard finished packets when the queue is halted
configure | 2 +-
hw/usb/bus.c | 36 ++++++++++++++++++++++++++++++++----
hw/usb/desc.c | 2 --
hw/usb/hcd-ehci.c | 16 +++++++++++-----
hw/usb/hcd-xhci.c | 4 +---
hw/usb/host-libusb.c | 5 -----
trace-events | 2 +-
7 files changed, 46 insertions(+), 21 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13
2013-04-23 8:32 [Qemu-devel] [PULL 0/4] usb patch queue Gerd Hoffmann
@ 2013-04-23 8:32 ` Gerd Hoffmann
0 siblings, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2013-04-23 8:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Allows to remove one FIXME. Makes LIBUSB_LOG_LEVEL_WARNING build errors
go away. And starting with that version libusb has a LIBUSBX_API_VERSION
define which allows to easily #ifdef version dependencies should that
need arrive in the future.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
configure | 2 +-
hw/usb/host-libusb.c | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/configure b/configure
index 51a6c56..33d3354 100755
--- a/configure
+++ b/configure
@@ -3060,7 +3060,7 @@ fi
# check for libusb
if test "$libusb" != "no" ; then
- if $pkg_config libusb-1.0 >/dev/null 2>&1 ; then
+ if $pkg_config --atleast-version=1.0.13 libusb-1.0 >/dev/null 2>&1 ; then
libusb="yes"
usb="libusb"
libusb_cflags=$($pkg_config --cflags libusb-1.0 2>/dev/null)
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 29f35b3..d1186b8 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -236,8 +236,6 @@ static int usb_host_init(void)
static int usb_host_get_port(libusb_device *dev, char *port, size_t len)
{
-#if defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x010000ff)
- /* have libusb_get_port_path() */
uint8_t path[7];
size_t off;
int rc, i;
@@ -251,9 +249,6 @@ static int usb_host_get_port(libusb_device *dev, char *port, size_t len)
off += snprintf(port+off, len-off, ".%d", path[i]);
}
return off;
-#else
- return snprintf(port, len, "FIXME");
-#endif
}
static void usb_host_libusb_error(const char *func, int rc)
--
1.7.9.7
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-03 6:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 20:21 [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13 Ed Maste
2013-05-03 6:09 ` Gerd Hoffmann
-- strict thread matches above, loose matches on Subject: below --
2013-04-23 8:32 [Qemu-devel] [PULL 0/4] usb patch queue Gerd Hoffmann
2013-04-23 8:32 ` [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13 Gerd Hoffmann
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).