2 * $OpenBSD: usb_port.h,v 1.18 2000/09/06 22:42:10 rahnds Exp $
3 * $NetBSD: usb_port.h,v 1.68 2005/07/30 06:14:50 skrll Exp $
4 * $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.65 2003/11/09 23:54:21 joe Exp $
5 * $DragonFly: src/sys/bus/usb/usb_port.h,v 1.13 2005/08/27 19:00:49 asmodai Exp $
8 /* Also already merged from NetBSD:
9 * $NetBSD: usb_port.h,v 1.57 2002/09/27 20:42:01 thorpej Exp $
10 * $NetBSD: usb_port.h,v 1.58 2002/10/01 01:25:26 thorpej Exp $
14 * Copyright (c) 1998 The NetBSD Foundation, Inc.
15 * All rights reserved.
17 * This code is derived from software contributed to The NetBSD Foundation
18 * by Lennart Augustsson (lennart@augustsson.net) at
19 * Carlstedt Research & Technology.
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * 3. All advertising materials mentioning features or use of this software
30 * must display the following acknowledgement:
31 * This product includes software developed by the NetBSD
32 * Foundation, Inc. and its contributors.
33 * 4. Neither the name of The NetBSD Foundation nor the names of its
34 * contributors may be used to endorse or promote products derived
35 * from this software without specific prior written permission.
37 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
38 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
39 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
40 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
41 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
43 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
44 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
45 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
47 * POSSIBILITY OF SUCH DAMAGE.
54 * Macro's to cope with the differences between operating systems.
57 #if defined(__NetBSD__)
62 #include "opt_usbverbose.h"
65 #include <sys/mallocvar.h>
67 MALLOC_DECLARE(M_USB);
68 MALLOC_DECLARE(M_USBDEV);
69 MALLOC_DECLARE(M_USBHC);
73 #define USB_USE_SOFTINTR
81 #define SCSI_MODE_SENSE MODE_SENSE
83 typedef struct proc *usb_proc_ptr;
85 typedef struct device *device_ptr_t;
86 #define USBBASEDEVICE struct device
87 #define USBDEV(bdev) (&(bdev))
88 #define USBDEVNAME(bdev) ((bdev).dv_xname)
89 #define USBDEVUNIT(bdev) ((bdev).dv_unit)
90 #define USBDEVPTRNAME(bdevptr) ((bdevptr)->dv_xname)
91 #define USBGETSOFTC(d) ((void *)(d))
93 #define DECLARE_USB_DMA_T \
94 struct usb_dma_block; \
96 struct usb_dma_block *block; \
100 typedef struct callout usb_callout_t;
101 #define usb_callout_init(h) callout_init(&(h))
102 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
103 #define usb_uncallout(h, f, d) callout_stop(&(h))
105 #define usb_kthread_create1 kthread_create1
106 #define usb_kthread_create kthread_create
108 typedef struct malloc_type *usb_malloc_type;
110 #define Ether_ifattach ether_ifattach
111 #define IF_INPUT(ifp, m) (*(ifp)->if_input)((ifp), (m))
113 #define logprintf printf
115 #define USB_DNAME(dname) dname
116 #define USB_DECLARE_DRIVER(dname) \
117 int __CONCAT(dname,_match)(struct device *, struct cfdata *, void *); \
118 void __CONCAT(dname,_attach)(struct device *, struct device *, void *); \
119 int __CONCAT(dname,_detach)(struct device *, int); \
120 int __CONCAT(dname,_activate)(struct device *, enum devact); \
122 extern struct cfdriver __CONCAT(dname,_cd); \
124 CFATTACH_DECL(USB_DNAME(dname), \
125 sizeof(struct ___CONCAT(dname,_softc)), \
126 ___CONCAT(dname,_match), \
127 ___CONCAT(dname,_attach), \
128 ___CONCAT(dname,_detach), \
129 ___CONCAT(dname,_activate))
131 #define USB_MATCH(dname) \
132 int __CONCAT(dname,_match)(struct device *parent, struct cfdata *match, void *aux)
134 #define USB_MATCH_START(dname, uaa) \
135 struct usb_attach_arg *uaa = aux
137 #define USB_ATTACH(dname) \
138 void __CONCAT(dname,_attach)(struct device *parent, struct device *self, void *aux)
140 #define USB_ATTACH_START(dname, sc, uaa) \
141 struct __CONCAT(dname,_softc) *sc = \
142 (struct __CONCAT(dname,_softc) *)self; \
143 struct usb_attach_arg *uaa = aux
145 /* Returns from attach */
146 #define USB_ATTACH_ERROR_RETURN return
147 #define USB_ATTACH_SUCCESS_RETURN return
149 #define USB_ATTACH_SETUP printf("\n")
151 #define USB_DETACH(dname) \
152 int __CONCAT(dname,_detach)(struct device *self, int flags)
154 #define USB_DETACH_START(dname, sc) \
155 struct __CONCAT(dname,_softc) *sc = \
156 (struct __CONCAT(dname,_softc) *)self
158 #define USB_GET_SC_OPEN(dname, unit, sc) \
159 if (unit >= __CONCAT(dname,_cd).cd_ndevs) \
161 sc = __CONCAT(dname,_cd).cd_devs[unit]; \
165 #define USB_GET_SC(dname, unit, sc) \
166 sc = __CONCAT(dname,_cd).cd_devs[unit]
168 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
169 (config_found_sm_loc(parent, (args)->port == 0 ? "usb" : "uhub", \
170 NULL, args, print, sub))
172 #elif defined(__OpenBSD__)
178 typedef struct proc *usb_proc_ptr;
180 #define UCOMBUSCF_PORTNO -1
181 #define UCOMBUSCF_PORTNO_DEFAULT -1
183 #define SCSI_MODE_SENSE MODE_SENSE
184 #define XS_STS_DONE ITSDONE
185 #define XS_CTL_POLL SCSI_POLL
186 #define XS_CTL_DATA_IN SCSI_DATA_IN
187 #define XS_CTL_DATA_OUT SCSI_DATA_OUT
188 #define scsipi_adapter scsi_adapter
189 #define scsipi_cmd scsi_cmd
190 #define scsipi_device scsi_device
191 #define scsipi_done scsi_done
192 #define scsipi_link scsi_link
193 #define scsipi_minphys scsi_minphys
194 #define scsipi_sense scsi_sense
195 #define scsipi_xfer scsi_xfer
196 #define xs_control flags
197 #define xs_status status
199 #define memcpy(d, s, l) bcopy((s),(d),(l))
200 #define memset(d, v, l) bzero((d),(l))
201 #define bswap32(x) swap32(x)
202 #define bswap16(x) swap16(x)
205 * The UHCI/OHCI controllers are little endian, so on big endian machines
206 * the data strored in memory needs to be swapped.
210 #define le32toh(x) letoh32(x)
211 #define le16toh(x) letoh16(x)
214 #define usb_kthread_create1 kthread_create
215 #define usb_kthread_create kthread_create_deferred
217 #define usb_lockmgr(lk, mode, ptr) lockmgr(lk, mode, ptr, curproc)
219 #define config_pending_incr()
220 #define config_pending_decr()
222 typedef int usb_malloc_type;
224 #define Ether_ifattach ether_ifattach
225 #define if_deactivate(x)
226 #define IF_INPUT(ifp, m) (*(ifp)->if_input)(ifp, m)
228 #define usbpoll usbselect
229 #define uhidpoll uhidselect
230 #define ugenpoll ugenselect
231 #define uscannerpoll uscannerselect
233 #define powerhook_establish(fn, sc) (fn)
234 #define powerhook_disestablish(hdl)
237 #define logprintf printf
239 #define swap_bytes_change_sign16_le swap_bytes_change_sign16
240 #define change_sign16_swap_bytes_le change_sign16_swap_bytes
241 #define change_sign16_le change_sign16
243 #define realloc usb_realloc
244 void *usb_realloc(void *, u_int, int, int);
248 typedef struct device *device_ptr_t;
249 #define USBBASEDEVICE struct device
250 #define USBDEV(bdev) (&(bdev))
251 #define USBDEVNAME(bdev) ((bdev).dv_xname)
252 #define USBDEVUNIT(bdev) ((bdev).dv_unit)
253 #define USBDEVPTRNAME(bdevptr) ((bdevptr)->dv_xname)
254 #define USBGETSOFTC(d) ((void *)(d))
256 #define DECLARE_USB_DMA_T \
257 struct usb_dma_block; \
259 struct usb_dma_block *block; \
263 typedef char usb_callout_t;
264 #define usb_callout_init(h)
265 #define usb_callout(h, t, f, d) timeout((f), (d), (t))
266 #define usb_uncallout(h, f, d) untimeout((f), (d))
268 #define USB_DECLARE_DRIVER(dname) \
269 int __CONCAT(dname,_match)(struct device *, void *, void *); \
270 void __CONCAT(dname,_attach)(struct device *, struct device *, void *); \
271 int __CONCAT(dname,_detach)(struct device *, int); \
272 int __CONCAT(dname,_activate)(struct device *, enum devact); \
274 struct cfdriver __CONCAT(dname,_cd) = { \
275 NULL, #dname, DV_DULL \
278 const struct cfattach __CONCAT(dname,_ca) = { \
279 sizeof(struct __CONCAT(dname,_softc)), \
280 __CONCAT(dname,_match), \
281 __CONCAT(dname,_attach), \
282 __CONCAT(dname,_detach), \
283 __CONCAT(dname,_activate), \
286 #define USB_MATCH(dname) \
288 __CONCAT(dname,_match)(parent, match, aux) \
289 struct device *parent; \
293 #define USB_MATCH_START(dname, uaa) \
294 struct usb_attach_arg *uaa = aux
296 #define USB_ATTACH(dname) \
298 __CONCAT(dname,_attach)(parent, self, aux) \
299 struct device *parent; \
300 struct device *self; \
303 #define USB_ATTACH_START(dname, sc, uaa) \
304 struct __CONCAT(dname,_softc) *sc = \
305 (struct __CONCAT(dname,_softc) *)self; \
306 struct usb_attach_arg *uaa = aux
308 /* Returns from attach */
309 #define USB_ATTACH_ERROR_RETURN return
310 #define USB_ATTACH_SUCCESS_RETURN return
312 #define USB_ATTACH_SETUP printf("\n")
314 #define USB_DETACH(dname) \
316 __CONCAT(dname,_detach)(self, flags) \
317 struct device *self; \
320 #define USB_DETACH_START(dname, sc) \
321 struct __CONCAT(dname,_softc) *sc = \
322 (struct __CONCAT(dname,_softc) *)self
324 #define USB_GET_SC_OPEN(dname, unit, sc) \
325 if (unit >= __CONCAT(dname,_cd).cd_ndevs) \
327 sc = __CONCAT(dname,_cd).cd_devs[unit]; \
331 #define USB_GET_SC(dname, unit, sc) \
332 sc = __CONCAT(dname,_cd).cd_devs[unit]
334 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
335 (config_found_sm(parent, args, print, sub))
337 #elif defined(__DragonFly__)
338 /***************************************************************************
344 #include <sys/malloc.h>
346 MALLOC_DECLARE(M_USB);
347 MALLOC_DECLARE(M_USBDEV);
348 MALLOC_DECLARE(M_USBHC);
354 /* We don't use the soft interrupt code in FreeBSD. */
355 /* #undef USB_USE_SOFTINTR */
357 #define Static static
359 #define device_ptr_t device_t
360 #define USBBASEDEVICE device_t
361 #define USBDEV(bdev) (bdev)
362 #define USBDEVNAME(bdev) device_get_nameunit(bdev)
363 #define USBDEVUNIT(bdev) device_get_unit(bdev)
364 #define USBDEVPTRNAME(bdev) device_get_nameunit(bdev)
365 #define USBDEVUNIT(bdev) device_get_unit(bdev)
366 #define USBGETSOFTC(bdev) (device_get_softc(bdev))
368 #define DECLARE_USB_DMA_T \
369 struct usb_dma_block; \
371 struct usb_dma_block *block; \
377 #define PROC_UNLOCK(p)
378 #define uio_procp uio_td
380 #define selwakeuppri(p, pri) selwakeup(p)
382 typedef struct thread *usb_proc_ptr;
384 /* XXX Change this when FreeBSD has memset */
385 #define memcpy(d, s, l) bcopy((s),(d),(l))
386 #define memset(d, v, l) bzero((d),(l))
388 #define config_pending_incr()
389 #define config_pending_decr()
391 #define usb_kthread_create(f, s) \
392 kthread_create(f, s, NULL, "dummy")
393 #define usb_kthread_create1(f, s, p, name, arg) \
394 kthread_create(f, s, p, name, arg)
395 #define usb_kthread_create2(f, s, p, name) \
396 kthread_create(f, s, p, name)
398 typedef struct callout usb_callout_t;
399 #define usb_callout_init(h) callout_init(&(h))
400 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
401 #define usb_uncallout(h, f, d) callout_stop(&(h))
403 #define usb_lockmgr lockmgr
405 #define ETHER_ALIGN 2
407 #define clalloc(p, s, x) (clist_alloc_cblocks((p), (s), (s)), 0)
408 #define clfree(p) clist_free_cblocks((p))
411 #define PWR_SUSPEND 1
413 #define config_detach(dev, flag) device_delete_child(device_get_parent(dev), dev)
415 typedef struct malloc_type *usb_malloc_type;
417 #define USB_DECLARE_DRIVER_INIT(dname, init...) \
418 Static device_probe_t __CONCAT(dname,_match); \
419 Static device_attach_t __CONCAT(dname,_attach); \
420 Static device_detach_t __CONCAT(dname,_detach); \
422 Static devclass_t __CONCAT(dname,_devclass); \
424 Static device_method_t __CONCAT(dname,_methods)[] = { \
425 DEVMETHOD(device_probe, __CONCAT(dname,_match)), \
426 DEVMETHOD(device_attach, __CONCAT(dname,_attach)), \
427 DEVMETHOD(device_detach, __CONCAT(dname,_detach)), \
432 Static driver_t __CONCAT(dname,_driver) = { \
434 __CONCAT(dname,_methods), \
435 sizeof(struct __CONCAT(dname,_softc)) \
437 MODULE_DEPEND(dname, usb, 1, 1, 1)
440 #define METHODS_NONE {0,0}
441 #define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, METHODS_NONE)
443 #define USB_MATCH(dname) \
445 __CONCAT(dname,_match)(device_t self)
447 #define USB_MATCH_START(dname, uaa) \
448 struct usb_attach_arg *uaa = device_get_ivars(self)
450 #define USB_MATCH_SETUP \
453 #define USB_ATTACH(dname) \
455 __CONCAT(dname,_attach)(device_t self)
457 #define USB_ATTACH_START(dname, sc, uaa) \
458 struct __CONCAT(dname,_softc) *sc = device_get_softc(self); \
459 struct usb_attach_arg *uaa = device_get_ivars(self)
461 /* Returns from attach */
462 #define USB_ATTACH_ERROR_RETURN return ENXIO
463 #define USB_ATTACH_SUCCESS_RETURN return 0
465 #define USB_ATTACH_SETUP \
467 device_set_desc_copy(self, devinfo)
469 #define USB_DETACH(dname) \
471 __CONCAT(dname,_detach)(device_t self)
473 #define USB_DETACH_START(dname, sc) \
474 struct __CONCAT(dname,_softc) *sc = device_get_softc(self)
476 #define USB_GET_SC_OPEN(dname, unit, sc) \
477 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit); \
481 #define USB_GET_SC(dname, unit, sc) \
482 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit)
484 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
485 (device_probe_and_attach((bdev)) == 0 ? (bdev) : 0)
487 /* conversion from one type of queue to the other */
488 #define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD
489 #define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD
490 #define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL
491 #define SIMPLEQ_NEXT STAILQ_NEXT
492 #define SIMPLEQ_FIRST STAILQ_FIRST
493 #define SIMPLEQ_HEAD STAILQ_HEAD
494 #define SIMPLEQ_EMPTY STAILQ_EMPTY
495 #define SIMPLEQ_FOREACH STAILQ_FOREACH
496 #define SIMPLEQ_INIT STAILQ_INIT
497 #define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
498 #define SIMPLEQ_ENTRY STAILQ_ENTRY
500 #include <sys/syslog.h>
502 #define logprintf(args...) log(LOG_DEBUG, args)
504 #define logprintf printf
507 SYSCTL_DECL(_hw_usb);
510 #elif defined(__FreeBSD__) || defined(__DragonFly__)
511 /***************************************************************************
518 #include <sys/malloc.h>
520 MALLOC_DECLARE(M_USB);
521 MALLOC_DECLARE(M_USBDEV);
522 MALLOC_DECLARE(M_USBHC);
528 /* We don't use the soft interrupt code in FreeBSD. */
530 #define USB_USE_SOFTINTR
533 #define Static static
535 #define device_ptr_t device_t
536 #define USBBASEDEVICE device_t
537 #define USBDEV(bdev) (bdev)
538 #define USBDEVNAME(bdev) device_get_nameunit(bdev)
539 #define USBDEVUNIT(bdev) device_get_unit(bdev)
540 #define USBDEVPTRNAME(bdev) device_get_nameunit(bdev)
541 #define USBDEVUNIT(bdev) device_get_unit(bdev)
542 #define USBGETSOFTC(bdev) (device_get_softc(bdev))
544 #define DECLARE_USB_DMA_T \
545 struct usb_dma_block; \
547 struct usb_dma_block *block; \
552 #if defined(__FreeBSD__) && __FreeBSD_version >= 500000
553 typedef struct thread *usb_proc_ptr;
555 #define uio_procp uio_td
557 #define usb_kthread_create1(f, s, p, a0, a1) \
558 kthread_create((f), (s), (p), RFHIGHPID, 0, (a0), (a1))
559 #define usb_kthread_create2(f, s, p, a0) \
560 kthread_create((f), (s), (p), RFHIGHPID, 0, (a0))
561 #define usb_kthread_create kthread_create
563 #define config_pending_incr()
564 #define config_pending_decr()
566 typedef struct callout usb_callout_t;
567 #define usb_callout_init(h) callout_init(&(h), 0)
568 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
569 #define usb_uncallout(h, f, d) callout_stop(&(h))
571 typedef struct proc *usb_proc_ptr;
574 #define PROC_UNLOCK(p)
576 #define usb_kthread_create1(f, s, p, a0, a1) \
577 kthread_create((f), (s), (p), (a0), (a1))
578 #define usb_kthread_create2(f, s, p, a0) \
579 kthread_create((f), (s), (p), (a0))
580 #define usb_kthread_create kthread_create
582 #define config_pending_incr()
583 #define config_pending_decr()
585 typedef struct callout usb_callout_t;
586 #define usb_callout_init(h) callout_init(&(h))
587 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
588 #define usb_uncallout(h, f, d) callout_stop(&(h))
591 #define clalloc(p, s, x) (clist_alloc_cblocks((p), (s), (s)), 0)
592 #define clfree(p) clist_free_cblocks((p))
595 #define PWR_SUSPEND 1
597 #define config_detach(dev, flag) device_delete_child(device_get_parent(dev), dev)
599 typedef struct malloc_type *usb_malloc_type;
601 #define USB_DECLARE_DRIVER_INIT(dname, init...) \
602 Static device_probe_t __CONCAT(dname,_match); \
603 Static device_attach_t __CONCAT(dname,_attach); \
604 Static device_detach_t __CONCAT(dname,_detach); \
606 Static devclass_t __CONCAT(dname,_devclass); \
608 Static device_method_t __CONCAT(dname,_methods)[] = { \
609 DEVMETHOD(device_probe, __CONCAT(dname,_match)), \
610 DEVMETHOD(device_attach, __CONCAT(dname,_attach)), \
611 DEVMETHOD(device_detach, __CONCAT(dname,_detach)), \
616 Static driver_t __CONCAT(dname,_driver) = { \
618 __CONCAT(dname,_methods), \
619 sizeof(struct __CONCAT(dname,_softc)) \
621 MODULE_DEPEND(dname, usb, 1, 1, 1)
624 #define METHODS_NONE {0,0}
625 #define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, METHODS_NONE)
627 #define USB_MATCH(dname) \
629 __CONCAT(dname,_match)(device_t self)
631 #define USB_MATCH_START(dname, uaa) \
632 struct usb_attach_arg *uaa = device_get_ivars(self)
634 #define USB_MATCH_SETUP \
637 #define USB_ATTACH(dname) \
639 __CONCAT(dname,_attach)(device_t self)
641 #define USB_ATTACH_START(dname, sc, uaa) \
642 struct __CONCAT(dname,_softc) *sc = device_get_softc(self); \
643 struct usb_attach_arg *uaa = device_get_ivars(self)
645 /* Returns from attach */
646 #define USB_ATTACH_ERROR_RETURN return ENXIO
647 #define USB_ATTACH_SUCCESS_RETURN return 0
649 #define USB_ATTACH_SETUP \
651 device_set_desc_copy(self, devinfo)
653 #define USB_DETACH(dname) \
655 __CONCAT(dname,_detach)(device_t self)
657 #define USB_DETACH_START(dname, sc) \
658 struct __CONCAT(dname,_softc) *sc = device_get_softc(self)
660 #define USB_GET_SC_OPEN(dname, unit, sc) \
661 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit); \
665 #define USB_GET_SC(dname, unit, sc) \
666 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit)
668 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
669 (device_probe_and_attach((bdev)) == 0 ? (bdev) : 0)
671 /* conversion from one type of queue to the other */
672 #define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD
673 #define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD
674 #define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL
675 #define SIMPLEQ_NEXT STAILQ_NEXT
676 #define SIMPLEQ_FIRST STAILQ_FIRST
677 #define SIMPLEQ_HEAD STAILQ_HEAD
678 #define SIMPLEQ_EMPTY STAILQ_EMPTY
679 #define SIMPLEQ_FOREACH STAILQ_FOREACH
680 #define SIMPLEQ_INIT STAILQ_INIT
681 #define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
682 #define SIMPLEQ_ENTRY STAILQ_ENTRY
684 #include <sys/syslog.h>
686 #define logprintf(args...) log(LOG_DEBUG, args)
688 #define logprintf printf
691 SYSCTL_DECL(_hw_usb);
694 #endif /* __FreeBSD__ */
696 #endif /* _USB_PORT_H */