diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 1999-08-16 22:08:50 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 1999-08-16 22:08:50 +0000 |
commit | d91d986d9cd78adbf8a71dcbaaca39948318f45a (patch) | |
tree | e3673610b81ca09c0f766c1b0f8f14f5b10f8f93 | |
parent | d0975f9b73b5bdeadb661c2c461eba0d46eea925 (diff) |
Sync with NetBSD. Mostly FreeBSD related changes.
Diffs sent to augustsson.
-rw-r--r-- | sys/dev/usb/hid.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/ohcivar.h | 14 | ||||
-rw-r--r-- | sys/dev/usb/ugen.c | 49 | ||||
-rw-r--r-- | sys/dev/usb/uhci.c | 15 | ||||
-rw-r--r-- | sys/dev/usb/uhcivar.h | 9 | ||||
-rw-r--r-- | sys/dev/usb/uhid.c | 50 | ||||
-rw-r--r-- | sys/dev/usb/uhub.c | 27 | ||||
-rw-r--r-- | sys/dev/usb/usb.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/usb_mem.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/usb_port.h | 6 | ||||
-rw-r--r-- | sys/dev/usb/usb_subr.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/usbdi.c | 9 | ||||
-rw-r--r-- | sys/dev/usb/usbdi.h | 5 | ||||
-rw-r--r-- | sys/dev/usb/usbdi_util.c | 6 |
14 files changed, 140 insertions, 74 deletions
diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c index 3f28036f33c..2d62617742c 100644 --- a/sys/dev/usb/hid.c +++ b/sys/dev/usb/hid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hid.c,v 1.1 1999/08/13 05:28:03 fgsch Exp $ */ +/* $OpenBSD: hid.c,v 1.2 1999/08/16 22:08:48 fgsch Exp $ */ /* $NetBSD: hid.c,v 1.7 1999/01/08 11:58:25 augustss Exp $ */ /* @@ -52,8 +52,8 @@ #include <dev/usb/hid.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) printf x -#define DPRINTFN(n,x) if (usbdebug>(n)) printf x +#define DPRINTF(x) if (usbdebug) logprintf x +#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x extern int usbdebug; #else #define DPRINTF(x) diff --git a/sys/dev/usb/ohcivar.h b/sys/dev/usb/ohcivar.h index 1bdcf2ea5d1..76a2dfea5d4 100644 --- a/sys/dev/usb/ohcivar.h +++ b/sys/dev/usb/ohcivar.h @@ -1,5 +1,5 @@ -/* $OpenBSD: ohcivar.h,v 1.1 1999/08/13 05:28:04 fgsch Exp $ */ -/* $NetBSD: ohcivar.h,v 1.5 1999/05/20 09:52:35 augustss Exp $ */ +/* $OpenBSD: ohcivar.h,v 1.2 1999/08/16 22:08:48 fgsch Exp $ */ +/* $NetBSD: ohcivar.h,v 1.6 1999/08/14 14:49:31 augustss Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -66,18 +66,14 @@ typedef struct ohci_soft_td { typedef struct ohci_softc { struct usbd_bus sc_bus; /* base device */ -#if defined(__NetBSD__) || defined(__OpenBSD__) - void *sc_ih; /* interrupt vectoring */ bus_space_tag_t iot; bus_space_handle_t ioh; +#if defined(__NetBSD__) || defined(__OpenBSD__) + void *sc_ih; /* interrupt vectoring */ bus_dma_tag_t sc_dmatag; /* DMA tag */ /* XXX should keep track of all DMA memory */ - -#elif defined(__FreeBSD__) - int sc_iobase; - int unit; -#endif /* __FreeBSD__ */ +#endif /* __NetBSD__ */ usb_dma_t sc_hccadma; struct ohci_hcca *sc_hcca; diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index de222a7bf40..968078fc9bb 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugen.c,v 1.1 1999/08/13 05:28:04 fgsch Exp $ */ +/* $OpenBSD: ugen.c,v 1.2 1999/08/16 22:08:48 fgsch Exp $ */ /* $NetBSD: ugen.c,v 1.13 1999/08/02 19:32:56 augustss Exp $ */ /* @@ -67,8 +67,8 @@ #include <dev/usb/usbdi_util.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (ugendebug) printf x -#define DPRINTFN(n,x) if (ugendebug>(n)) printf x +#define DPRINTF(x) if (ugendebug) logprintf x +#define DPRINTFN(n,x) if (ugendebug>(n)) logprintf x int ugendebug = 0; #else #define DPRINTF(x) @@ -105,12 +105,41 @@ struct ugen_softc { u_char sc_dying; }; -int ugenopen __P((dev_t, int, int, struct proc *)); -int ugenclose __P((dev_t, int, int, struct proc *)); -int ugenread __P((dev_t, struct uio *, int)); -int ugenwrite __P((dev_t, struct uio *, int)); -int ugenioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); -int ugenpoll __P((dev_t, int, struct proc *)); +#if defined(__NetBSD__) || defined(__OpenBSD__) +cdev_decl(ugen); +#elif defined(__FreeBSD__) +d_open_t ugenopen; +d_close_t ugenclose; +d_read_t ugenread; +d_write_t ugenwrite; +d_ioctl_t ugenioctl; +d_poll_t ugenpoll; + +#define UGEN_CDEV_MAJOR 114 + +static struct cdevsw ugen_cdevsw = { + /* open */ ugenopen, + /* close */ ugenclose, + /* read */ ugenread, + /* write */ ugenwrite, + /* ioctl */ ugenioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ ugenpoll, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "ugen", + /* parms */ noparms, + /* maj */ UGEN_CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 +}; +#endif + void ugenintr __P((usbd_request_handle reqh, usbd_private_handle addr, usbd_status status)); @@ -1084,5 +1113,5 @@ ugenpoll(dev, events, p) } #if defined(__FreeBSD__) -DRIVER_MODULE(ugen, usb, ugen_driver, ugen_devclass, usbd_driver_load, 0); +DEV_DRIVER_MODULE(ugen, uhub, ugen_driver, ugen_devclass, ugen_cdevsw, usbd_driver_load, 0); #endif diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 96400f513c0..a0b2a0059ed 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci.c,v 1.1 1999/08/13 05:28:04 fgsch Exp $ */ +/* $OpenBSD: uhci.c,v 1.2 1999/08/16 22:08:48 fgsch Exp $ */ /* $NetBSD: uhci.c,v 1.34 1999/08/02 23:35:55 augustss Exp $ */ /* @@ -62,6 +62,9 @@ #include <sys/queue.h> #include <sys/select.h> +#if defined(__FreeBSD__) +#include <machine/bus_pio.h> +#endif #include <machine/bus.h> #include <dev/usb/usb.h> @@ -218,17 +221,11 @@ void uhci_dump __P((void)); void uhci_dump_td __P((uhci_soft_td_t *)); #endif -#if defined(__NetBSD__) || defined(__OpenBSD__) #define UWRITE2(sc, r, x) bus_space_write_2((sc)->iot, (sc)->ioh, (r), (x)) #define UWRITE4(sc, r, x) bus_space_write_4((sc)->iot, (sc)->ioh, (r), (x)) +#define UREAD1(sc, r) bus_space_read_1((sc)->iot, (sc)->ioh, (r)) #define UREAD2(sc, r) bus_space_read_2((sc)->iot, (sc)->ioh, (r)) #define UREAD4(sc, r) bus_space_read_4((sc)->iot, (sc)->ioh, (r)) -#elif defined(__FreeBSD__) -#define UWRITE2(sc,r,x) outw((sc)->sc_iobase + (r), (x)) -#define UWRITE4(sc,r,x) outl((sc)->sc_iobase + (r), (x)) -#define UREAD2(sc,r) inw((sc)->sc_iobase + (r)) -#define UREAD4(sc,r) inl((sc)->sc_iobase + (r)) -#endif #define UHCICMD(sc, cmd) UWRITE2(sc, UHCI_CMD, cmd) #define UHCISTS(sc) UREAD2(sc, UHCI_STS) @@ -469,7 +466,7 @@ uhci_dumpregs(sc) UREAD2(sc, UHCI_INTR), UREAD2(sc, UHCI_FRNUM), UREAD4(sc, UHCI_FLBASEADDR), - UREAD2(sc, UHCI_SOF), + UREAD1(sc, UHCI_SOF), UREAD2(sc, UHCI_PORTSC1), UREAD2(sc, UHCI_PORTSC2)); } diff --git a/sys/dev/usb/uhcivar.h b/sys/dev/usb/uhcivar.h index 0ef9e2c33f4..d81af2589af 100644 --- a/sys/dev/usb/uhcivar.h +++ b/sys/dev/usb/uhcivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uhcivar.h,v 1.1 1999/08/13 05:28:04 fgsch Exp $ */ +/* $OpenBSD: uhcivar.h,v 1.2 1999/08/16 22:08:49 fgsch Exp $ */ /* $NetBSD: uhcivar.h,v 1.7 1999/06/26 08:30:18 augustss Exp $ */ /* @@ -117,16 +117,13 @@ struct uhci_vframe { typedef struct uhci_softc { struct usbd_bus sc_bus; /* base device */ -#if defined(__NetBSD__) || defined(__OpenBSD__) - void *sc_ih; /* interrupt vectoring */ bus_space_tag_t iot; bus_space_handle_t ioh; +#if defined(__NetBSD__) || defined(__OpenBSD__) + void *sc_ih; /* interrupt vectoring */ bus_dma_tag_t sc_dmatag; /* DMA tag */ /* XXX should keep track of all DMA memory */ -#elif defined(__FreeBSD__) - int sc_iobase; - int unit; #endif /* defined(__FreeBSD__) */ uhci_physaddr_t *sc_pframes; diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index aa9cf4da9b5..c8069545114 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhid.c,v 1.1 1999/08/13 05:28:04 fgsch Exp $ */ +/* $OpenBSD: uhid.c,v 1.2 1999/08/16 22:08:49 fgsch Exp $ */ /* $NetBSD: uhid.c,v 1.18 1999/06/30 06:44:23 augustss Exp $ */ /* @@ -73,8 +73,8 @@ #include <dev/usb/usb_quirks.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (uhiddebug) printf x -#define DPRINTFN(n,x) if (uhiddebug>(n)) printf x +#define DPRINTF(x) if (uhiddebug) logprintf x +#define DPRINTFN(n,x) if (uhiddebug>(n)) logprintf x int uhiddebug = 0; #else #define DPRINTF(x) @@ -116,12 +116,41 @@ struct uhid_softc { #define UHID_CHUNK 128 /* chunk size for read */ #define UHID_BSIZE 1020 /* buffer size */ -int uhidopen __P((dev_t, int, int, struct proc *)); -int uhidclose __P((dev_t, int, int, struct proc *p)); -int uhidread __P((dev_t, struct uio *uio, int)); -int uhidwrite __P((dev_t, struct uio *uio, int)); -int uhidioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); -int uhidpoll __P((dev_t, int, struct proc *)); +#if defined(__NetBSD__) || defined(__OpenBSD__) +cdev_decl(uhid); +#elif defined(__FreeBSD__) +d_open_t uhidopen; +d_close_t uhidclose; +d_read_t uhidread; +d_write_t uhidwrite; +d_ioctl_t uhidioctl; +d_poll_t uhidpoll; + +#define UHID_CDEV_MAJOR 122 + +static struct cdevsw uhid_cdevsw = { + /* open */ uhidopen, + /* close */ uhidclose, + /* read */ uhidread, + /* write */ uhidwrite, + /* ioctl */ uhidioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ uhidpoll, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "uhid", + /* parms */ noparms, + /* maj */ UHID_CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 +}; +#endif + void uhid_intr __P((usbd_request_handle, usbd_private_handle, usbd_status)); int uhid_do_read __P((struct uhid_softc *, struct uio *uio, int)); @@ -621,5 +650,6 @@ uhidpoll(dev, events, p) } #if defined(__FreeBSD__) -DRIVER_MODULE(uhid, usb, uhid_driver, uhid_devclass, usbd_driver_load, 0); +DEV_DRIVER_MODULE(uhid, uhub, uhid_driver, uhid_devclass, + uhid_cdevsw, usbd_driver_load, 0); #endif diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index ffbf0349e2e..af333fa22e4 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhub.c,v 1.1 1999/08/13 05:28:04 fgsch Exp $ */ +/* $OpenBSD: uhub.c,v 1.2 1999/08/16 22:08:49 fgsch Exp $ */ /* $NetBSD: uhub.c,v 1.18 1999/06/30 06:44:23 augustss Exp $ */ /* @@ -60,8 +60,8 @@ #include <dev/usb/usbdivar.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) printf x -#define DPRINTFN(n,x) if (usbdebug>(n)) printf x +#define DPRINTF(x) if (usbdebug) logprintf x +#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x extern int usbdebug; extern char *usbd_error_strs[]; #else @@ -82,7 +82,7 @@ void uhub_disconnect_port __P((struct usbd_port *up)); usbd_status uhub_explore __P((usbd_device_handle hub)); void uhub_intr __P((usbd_request_handle, usbd_private_handle, usbd_status)); -USB_DECLARE_DRIVER_NAME(usb, uhub); +USB_DECLARE_DRIVER_NAME(usb, uhub); #if defined(__NetBSD__) || defined(__OpenBSD__) struct cfattach uhub_uhub_ca = { @@ -258,6 +258,11 @@ uhub_init_port(up) /* First let the device go through a good power cycle, */ usbd_delay_ms(dev, USB_PORT_POWER_DOWN_TIME); +#if 0 +usbd_clear_hub_feature(dev, UHF_C_HUB_OVER_CURRENT); +usbd_clear_port_feature(dev, port, UHF_C_PORT_OVER_CURRENT); +#endif + /* then turn the power on. */ r = usbd_set_port_feature(dev, port, UHF_PORT_POWER); if (r != USBD_NORMAL_COMPLETION) @@ -273,6 +278,17 @@ uhub_init_port(up) r = usbd_get_port_status(dev, port, &up->status); if (r != USBD_NORMAL_COMPLETION) return (r); + DPRINTF(("usb_init_port: after power on status=0x%04x " + "change=0x%04x\n", + UGETW(up->status.wPortStatus), + UGETW(up->status.wPortChange))); + +#if 0 +usbd_clear_hub_feature(dev, UHF_C_HUB_OVER_CURRENT); +usbd_clear_port_feature(dev, port, UHF_C_PORT_OVER_CURRENT); +usbd_get_port_status(dev, port, &up->status); +#endif + pstatus = UGETW(up->status.wPortStatus); if ((pstatus & UPS_PORT_POWER) == 0) printf("%s: port %d did not power up\n", @@ -538,5 +554,6 @@ uhub_intr(reqh, addr, status) } #if defined(__FreeBSD__) -DRIVER_MODULE(uhub, usb, uhub_driver, uhub_devclass, usbd_driver_load, 0); +DRIVER_MODULE(uhub, usb, uhubroot_driver, uhubroot_devclass, 0, 0); +DRIVER_MODULE(uhub, uhub, uhub_driver, uhub_devclass, usbd_driver_load, 0); #endif diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 76081762b76..947f0f9e1ba 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb.c,v 1.1 1999/08/13 05:28:04 fgsch Exp $ */ +/* $OpenBSD: usb.c,v 1.2 1999/08/16 22:08:49 fgsch Exp $ */ /* $NetBSD: usb.c,v 1.15 1999/08/02 19:36:48 augustss Exp $ */ /* @@ -78,8 +78,8 @@ MALLOC_DEFINE(M_USBHC, "USBHC", "USB host controller"); #include <dev/usb/usb_quirks.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) printf x -#define DPRINTFN(n,x) if (usbdebug>(n)) printf x +#define DPRINTF(x) if (usbdebug) logprintf x +#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x int usbdebug = 0; int uhcidebug; int ohcidebug; diff --git a/sys/dev/usb/usb_mem.c b/sys/dev/usb/usb_mem.c index a83a7a3782d..9dec07993c0 100644 --- a/sys/dev/usb/usb_mem.c +++ b/sys/dev/usb/usb_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_mem.c,v 1.1 1999/08/13 05:28:04 fgsch Exp $ */ +/* $OpenBSD: usb_mem.c,v 1.2 1999/08/16 22:08:49 fgsch Exp $ */ /* $NetBSD: usb_mem.c,v 1.7 1999/08/02 19:49:50 augustss Exp $ */ /* @@ -62,8 +62,8 @@ #include <dev/usb/usb_mem.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) printf x -#define DPRINTFN(n,x) if (usbdebug>(n)) printf x +#define DPRINTF(x) if (usbdebug) logprintf x +#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x extern int usbdebug; #else #define DPRINTF(x) diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 56162c122ac..8b77e56d11d 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_port.h,v 1.2 1999/08/13 08:26:29 fgsch Exp $ */ +/* $OpenBSD: usb_port.h,v 1.3 1999/08/16 22:08:49 fgsch Exp $ */ /* $NetBSD: usb_port.h,v 1.7 1999/06/30 06:44:23 augustss Exp $ */ /* @@ -57,6 +57,8 @@ typedef struct device bdevice; /* base device */ #define usb_timeout(f, d, t, h) timeout((f), (d), (t)) #define usb_untimeout(f, d, h) untimeout((f), (d)) +#define logprintf printf + #define USB_DECLARE_DRIVER_NAME_INIT(_1, dname, _2) \ int __CONCAT(dname,_match) __P((struct device *, struct cfdata *, void *)); \ void __CONCAT(dname,_attach) __P((struct device *, struct device *, void *)); \ @@ -120,7 +122,7 @@ __CONCAT(dname,_attach)(parent, self, aux) \ * OpenBSD */ #define memcpy(d, s, l) bcopy((s),(d),(l)) -#define memset(d, v, l) bzero((d),(l)) +#define memset(d, v, l) bzero((d),(l)) #define usbpoll usbselect #define uhidpoll uhidselect diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 79779fef325..83cc9bc3c6a 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_subr.c,v 1.1 1999/08/13 05:28:04 fgsch Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.2 1999/08/16 22:08:49 fgsch Exp $ */ /* $NetBSD: usb_subr.c,v 1.34 1999/06/30 06:44:23 augustss Exp $ */ /* @@ -65,8 +65,8 @@ #endif #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) printf x -#define DPRINTFN(n,x) if (usbdebug>(n)) printf x +#define DPRINTF(x) if (usbdebug) logprintf x +#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x extern int usbdebug; #else #define DPRINTF(x) diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 0d5c93c2985..bdaeaca129a 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.c,v 1.1 1999/08/13 05:28:05 fgsch Exp $ */ +/* $OpenBSD: usbdi.c,v 1.2 1999/08/16 22:08:49 fgsch Exp $ */ /* $NetBSD: usbdi.c,v 1.26 1999/07/06 07:12:03 augustss Exp $ */ /* @@ -62,8 +62,8 @@ #endif #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) printf x -#define DPRINTFN(n,x) if (usbdebug>(n)) printf x +#define DPRINTF(x) if (usbdebug) logprintf x +#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x extern int usbdebug; #else #define DPRINTF(x) @@ -159,7 +159,7 @@ usbd_open_pipe_intr(iface, address, flags, pipe, priv, buffer, length, cb) } usbd_status -usbd_open_pipe_iso(iface, address, flags, pipe, priv, bufsize, nbuf, cb) +usbd_open_pipe_iso(iface, address, flags, pipe, priv, bufsize, nbuf) usbd_interface_handle iface; u_int8_t address; u_int8_t flags; @@ -167,7 +167,6 @@ usbd_open_pipe_iso(iface, address, flags, pipe, priv, bufsize, nbuf, cb) usbd_private_handle priv; u_int32_t bufsize; u_int32_t nbuf; - usbd_callback cb; { usbd_status r; usbd_pipe_handle p; diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 70d323d7762..335c019eab0 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.h,v 1.1 1999/08/13 05:28:05 fgsch Exp $ */ +/* $OpenBSD: usbdi.h,v 1.2 1999/08/16 22:08:49 fgsch Exp $ */ /* $NetBSD: usbdi.h,v 1.20 1999/06/30 06:44:23 augustss Exp $ */ /* @@ -130,8 +130,7 @@ usbd_status usbd_open_pipe_intr usbd_status usbd_open_pipe_iso __P((usbd_interface_handle iface, u_int8_t address, u_int8_t flags, usbd_pipe_handle *pipe, - usbd_private_handle priv, u_int32_t bufsize, u_int32_t nbuf, - usbd_callback)); + usbd_private_handle priv, u_int32_t bufsize, u_int32_t nbuf)); usbd_status usbd_do_request __P((usbd_device_handle pipe, usb_device_request_t *req, void *data)); usbd_status usbd_do_request_async diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index 5bfdd906a03..8ed127df125 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi_util.c,v 1.1 1999/08/13 05:28:05 fgsch Exp $ */ +/* $OpenBSD: usbdi_util.c,v 1.2 1999/08/16 22:08:49 fgsch Exp $ */ /* $NetBSD: usbdi_util.c,v 1.16 1999/08/07 23:14:17 augustss Exp $ */ /* @@ -55,8 +55,8 @@ #include <dev/usb/usbdi_util.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) printf x -#define DPRINTFN(n,x) if (usbdebug>(n)) printf x +#define DPRINTF(x) if (usbdebug) logprintf x +#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x extern int usbdebug; #else #define DPRINTF(x) |