[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/16] re-activate usb-host for bsd
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH 01/16] re-activate usb-host for bsd |
Date: |
Thu, 4 Aug 2011 18:50:05 +0000 |
On Thu, Aug 4, 2011 at 3:10 PM, Gerd Hoffmann <address@hidden> wrote:
> A bunch of code was disabled via #if 0, for a quite long time (since
> Sept 2009). Surprisingly the code builds just fine when they are
> removed (tested on OpenBSD). /me wonders nevertheless whenever there
> are any users of those bits when this went unnoticed for almost two
> years ...
I added the #ifdeffery. The build was broken by some previous commit
but since my OpenBSD machine doesn't have USB so I couldn't test it.
Did you test if USB works now or just that code builds?
> Signed-off-by: Gerd Hoffmann <address@hidden>
> ---
> usb-bsd.c | 10 ++--------
> 1 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/usb-bsd.c b/usb-bsd.c
> index 3b97eb4..ab8e3b7 100644
> --- a/usb-bsd.c
> +++ b/usb-bsd.c
> @@ -62,7 +62,6 @@ typedef struct USBHostDevice {
> } USBHostDevice;
>
>
> -#if 0
> static int ensure_ep_open(USBHostDevice *dev, int ep, int mode)
> {
> char buf[32];
> @@ -110,7 +109,6 @@ static void ensure_eps_closed(USBHostDevice *dev)
> epnum++;
> }
> }
> -#endif
>
> static void usb_host_handle_reset(USBDevice *dev)
> {
> @@ -119,7 +117,6 @@ static void usb_host_handle_reset(USBDevice *dev)
> #endif
> }
>
> -#if 0
> /* XXX:
> * -check device states against transfer requests
> * and return appropriate response
> @@ -278,7 +275,6 @@ static int usb_host_handle_data(USBDevice *dev, USBPacket
> *p)
> return ret;
> }
> }
> -#endif
>
> static void usb_host_handle_destroy(USBDevice *opaque)
> {
> @@ -305,8 +301,8 @@ static int usb_host_initfn(USBDevice *dev)
> USBDevice *usb_host_device_open(const char *devname)
> {
> struct usb_device_info bus_info, dev_info;
> - USBDevice *d = NULL;
> - USBHostDevice *dev, *ret = NULL;
> + USBDevice *d = NULL, *ret = NULL;
> + USBHostDevice *dev;
> char ctlpath[PATH_MAX + 1];
> char buspath[PATH_MAX + 1];
> int bfd, dfd, bus, address, i;
> @@ -408,10 +404,8 @@ static struct USBDeviceInfo usb_host_dev_info = {
> .init = usb_host_initfn,
> .handle_packet = usb_generic_handle_packet,
> .handle_reset = usb_host_handle_reset,
> -#if 0
> .handle_control = usb_host_handle_control,
> .handle_data = usb_host_handle_data,
> -#endif
> .handle_destroy = usb_host_handle_destroy,
> };
>
> --
> 1.7.1
>
>
>
- [Qemu-devel] [PATCH 03/16] Add iov_clear(), (continued)
- [Qemu-devel] [PATCH 15/16] hid: move idle+protocol from usb-hid to hid too., Gerd Hoffmann, 2011/08/04
- [Qemu-devel] [PATCH 01/16] re-activate usb-host for bsd, Gerd Hoffmann, 2011/08/04
- Re: [Qemu-devel] [PATCH 01/16] re-activate usb-host for bsd,
Blue Swirl <=
- [Qemu-devel] [PATCH 09/16] uhci: remove buffer, Gerd Hoffmann, 2011/08/04
- [Qemu-devel] [PATCH 16/16] bluetooth: kill dummy usb device, use hid code directly., Gerd Hoffmann, 2011/08/04
- [Qemu-devel] [PATCH 11/16] usb-hid: create & use HIDState, Gerd Hoffmann, 2011/08/04
- [Qemu-devel] [PATCH 14/16] usb-hid: split hid code to hw/hid.[ch], Gerd Hoffmann, 2011/08/04
- [Qemu-devel] [PATCH 10/16] ehci: iovec support, remove buffer, Gerd Hoffmann, 2011/08/04
- [Qemu-devel] [PATCH 05/16] usb: use iovecs in USBPacket, Gerd Hoffmann, 2011/08/04
- Re: [Qemu-devel] [PULL] usb patch queue: iovecs, hid split, misc fixes, Anthony Liguori, 2011/08/04