2 * $OpenBSD: usb_port.h,v 1.18 2000/09/06 22:42:10 rahnds Exp $
3 * $NetBSD: usb_port.h,v 1.54 2002/03/28 21:49:19 ichiro 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.11 2004/09/30 18:59:14 dillon 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"
64 #define USB_USE_SOFTINTR
72 #define SCSI_MODE_SENSE MODE_SENSE
74 typedef struct proc *usb_proc_ptr;
76 typedef struct device *device_ptr_t;
77 #define USBBASEDEVICE struct device
78 #define USBDEV(bdev) (&(bdev))
79 #define USBDEVNAME(bdev) ((bdev).dv_xname)
80 #define USBDEVUNIT(bdev) ((bdev).dv_unit)
81 #define USBDEVPTRNAME(bdevptr) ((bdevptr)->dv_xname)
82 #define USBGETSOFTC(d) ((void *)(d))
84 #define DECLARE_USB_DMA_T \
85 struct usb_dma_block; \
87 struct usb_dma_block *block; \
91 typedef struct callout usb_callout_t;
92 #define usb_callout_init(h) callout_init(&(h))
93 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
94 #define usb_uncallout(h, f, d) callout_stop(&(h))
96 #define usb_kthread_create1 kthread_create1
97 #define usb_kthread_create kthread_create
99 typedef int usb_malloc_type;
101 #define Ether_ifattach ether_ifattach
102 #define IF_INPUT(ifp, m) (*(ifp)->if_input)((ifp), (m))
104 #define logprintf printf
106 #define USB_DNAME(dname) dname
107 #define USB_DECLARE_DRIVER(dname) \
108 int __CONCAT(dname,_match)(struct device *, struct cfdata *, void *); \
109 void __CONCAT(dname,_attach)(struct device *, struct device *, void *); \
110 int __CONCAT(dname,_detach)(struct device *, int); \
111 int __CONCAT(dname,_activate)(struct device *, enum devact); \
113 extern struct cfdriver __CONCAT(dname,_cd); \
115 CFATTACH_DECL(USB_DNAME(dname), \
116 sizeof(struct ___CONCAT(dname,_softc)), \
117 ___CONCAT(dname,_match), \
118 ___CONCAT(dname,_attach), \
119 ___CONCAT(dname,_detach), \
120 ___CONCAT(dname,_activate))
122 #define USB_MATCH(dname) \
123 int __CONCAT(dname,_match)(struct device *parent, struct cfdata *match, void *aux)
125 #define USB_MATCH_START(dname, uaa) \
126 struct usb_attach_arg *uaa = aux
128 #define USB_ATTACH(dname) \
129 void __CONCAT(dname,_attach)(struct device *parent, struct device *self, void *aux)
131 #define USB_ATTACH_START(dname, sc, uaa) \
132 struct __CONCAT(dname,_softc) *sc = \
133 (struct __CONCAT(dname,_softc) *)self; \
134 struct usb_attach_arg *uaa = aux
136 /* Returns from attach */
137 #define USB_ATTACH_ERROR_RETURN return
138 #define USB_ATTACH_SUCCESS_RETURN return
140 #define USB_ATTACH_SETUP printf("\n")
142 #define USB_DETACH(dname) \
143 int __CONCAT(dname,_detach)(struct device *self, int flags)
145 #define USB_DETACH_START(dname, sc) \
146 struct __CONCAT(dname,_softc) *sc = \
147 (struct __CONCAT(dname,_softc) *)self
149 #define USB_GET_SC_OPEN(dname, unit, sc) \
150 if (unit >= __CONCAT(dname,_cd).cd_ndevs) \
152 sc = __CONCAT(dname,_cd).cd_devs[unit]; \
156 #define USB_GET_SC(dname, unit, sc) \
157 sc = __CONCAT(dname,_cd).cd_devs[unit]
159 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
160 (config_found_sm(parent, args, print, sub))
162 #elif defined(__OpenBSD__)
168 typedef struct proc *usb_proc_ptr;
170 #define UCOMBUSCF_PORTNO -1
171 #define UCOMBUSCF_PORTNO_DEFAULT -1
173 #define SCSI_MODE_SENSE MODE_SENSE
174 #define XS_STS_DONE ITSDONE
175 #define XS_CTL_POLL SCSI_POLL
176 #define XS_CTL_DATA_IN SCSI_DATA_IN
177 #define XS_CTL_DATA_OUT SCSI_DATA_OUT
178 #define scsipi_adapter scsi_adapter
179 #define scsipi_cmd scsi_cmd
180 #define scsipi_device scsi_device
181 #define scsipi_done scsi_done
182 #define scsipi_link scsi_link
183 #define scsipi_minphys scsi_minphys
184 #define scsipi_sense scsi_sense
185 #define scsipi_xfer scsi_xfer
186 #define xs_control flags
187 #define xs_status status
189 #define memcpy(d, s, l) bcopy((s),(d),(l))
190 #define memset(d, v, l) bzero((d),(l))
191 #define bswap32(x) swap32(x)
192 #define bswap16(x) swap16(x)
195 * The UHCI/OHCI controllers are little endian, so on big endian machines
196 * the data strored in memory needs to be swapped.
200 #define le32toh(x) letoh32(x)
201 #define le16toh(x) letoh16(x)
204 #define usb_kthread_create1 kthread_create
205 #define usb_kthread_create kthread_create_deferred
207 #define config_pending_incr()
208 #define config_pending_decr()
210 typedef int usb_malloc_type;
212 #define Ether_ifattach ether_ifattach
213 #define if_deactivate(x)
214 #define IF_INPUT(ifp, m) (*(ifp)->if_input)(ifp, m)
216 #define usbpoll usbselect
217 #define uhidpoll uhidselect
218 #define ugenpoll ugenselect
219 #define uriopoll urioselect
220 #define uscannerpoll uscannerselect
222 #define powerhook_establish(fn, sc) (fn)
223 #define powerhook_disestablish(hdl)
226 #define logprintf printf
228 #define swap_bytes_change_sign16_le swap_bytes_change_sign16
229 #define change_sign16_swap_bytes_le change_sign16_swap_bytes
230 #define change_sign16_le change_sign16
232 #define realloc usb_realloc
233 void *usb_realloc(void *, u_int, int, int);
237 typedef struct device *device_ptr_t;
238 #define USBBASEDEVICE struct device
239 #define USBDEV(bdev) (&(bdev))
240 #define USBDEVNAME(bdev) ((bdev).dv_xname)
241 #define USBDEVUNIT(bdev) ((bdev).dv_unit)
242 #define USBDEVPTRNAME(bdevptr) ((bdevptr)->dv_xname)
243 #define USBGETSOFTC(d) ((void *)(d))
245 #define DECLARE_USB_DMA_T \
246 struct usb_dma_block; \
248 struct usb_dma_block *block; \
252 typedef char usb_callout_t;
253 #define usb_callout_init(h)
254 #define usb_callout(h, t, f, d) timeout((f), (d), (t))
255 #define usb_uncallout(h, f, d) untimeout((f), (d))
257 #define USB_DECLARE_DRIVER(dname) \
258 int __CONCAT(dname,_match)(struct device *, void *, void *); \
259 void __CONCAT(dname,_attach)(struct device *, struct device *, void *); \
260 int __CONCAT(dname,_detach)(struct device *, int); \
261 int __CONCAT(dname,_activate)(struct device *, enum devact); \
263 struct cfdriver __CONCAT(dname,_cd) = { \
264 NULL, #dname, DV_DULL \
267 const struct cfattach __CONCAT(dname,_ca) = { \
268 sizeof(struct __CONCAT(dname,_softc)), \
269 __CONCAT(dname,_match), \
270 __CONCAT(dname,_attach), \
271 __CONCAT(dname,_detach), \
272 __CONCAT(dname,_activate), \
275 #define USB_MATCH(dname) \
277 __CONCAT(dname,_match)(parent, match, aux) \
278 struct device *parent; \
282 #define USB_MATCH_START(dname, uaa) \
283 struct usb_attach_arg *uaa = aux
285 #define USB_ATTACH(dname) \
287 __CONCAT(dname,_attach)(parent, self, aux) \
288 struct device *parent; \
289 struct device *self; \
292 #define USB_ATTACH_START(dname, sc, uaa) \
293 struct __CONCAT(dname,_softc) *sc = \
294 (struct __CONCAT(dname,_softc) *)self; \
295 struct usb_attach_arg *uaa = aux
297 /* Returns from attach */
298 #define USB_ATTACH_ERROR_RETURN return
299 #define USB_ATTACH_SUCCESS_RETURN return
301 #define USB_ATTACH_SETUP printf("\n")
303 #define USB_DETACH(dname) \
305 __CONCAT(dname,_detach)(self, flags) \
306 struct device *self; \
309 #define USB_DETACH_START(dname, sc) \
310 struct __CONCAT(dname,_softc) *sc = \
311 (struct __CONCAT(dname,_softc) *)self
313 #define USB_GET_SC_OPEN(dname, unit, sc) \
314 if (unit >= __CONCAT(dname,_cd).cd_ndevs) \
316 sc = __CONCAT(dname,_cd).cd_devs[unit]; \
320 #define USB_GET_SC(dname, unit, sc) \
321 sc = __CONCAT(dname,_cd).cd_devs[unit]
323 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
324 (config_found_sm(parent, args, print, sub))
326 #elif defined(__DragonFly__)
327 /***************************************************************************
333 #include <sys/malloc.h>
335 MALLOC_DECLARE(M_USB);
336 MALLOC_DECLARE(M_USBDEV);
337 MALLOC_DECLARE(M_USBHC);
343 /* We don't use the soft interrupt code in FreeBSD. */
344 /* #undef USB_USE_SOFTINTR */
346 #define Static static
348 #define device_ptr_t device_t
349 #define USBBASEDEVICE device_t
350 #define USBDEV(bdev) (bdev)
351 #define USBDEVNAME(bdev) device_get_nameunit(bdev)
352 #define USBDEVUNIT(bdev) device_get_unit(bdev)
353 #define USBDEVPTRNAME(bdev) device_get_nameunit(bdev)
354 #define USBDEVUNIT(bdev) device_get_unit(bdev)
355 #define USBGETSOFTC(bdev) (device_get_softc(bdev))
357 #define DECLARE_USB_DMA_T \
358 struct usb_dma_block; \
360 struct usb_dma_block *block; \
366 #define PROC_UNLOCK(p)
367 #define uio_procp uio_td
369 #define selwakeuppri(p, pri) selwakeup(p)
371 typedef struct thread *usb_proc_ptr;
373 /* XXX Change this when FreeBSD has memset */
374 #define memcpy(d, s, l) bcopy((s),(d),(l))
375 #define memset(d, v, l) bzero((d),(l))
377 #define config_pending_incr()
378 #define config_pending_decr()
380 #define usb_kthread_create(f, s) \
381 kthread_create(f, s, NULL, "dummy")
382 #define usb_kthread_create1(f, s, p, name, arg) \
383 kthread_create(f, s, p, name, arg)
384 #define usb_kthread_create2(f, s, p, name) \
385 kthread_create(f, s, p, name)
387 typedef struct callout usb_callout_t;
388 #define usb_callout_init(h) callout_init(&(h))
389 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
390 #define usb_uncallout(h, f, d) callout_stop(&(h))
392 #define ETHER_ALIGN 2
394 #define clalloc(p, s, x) (clist_alloc_cblocks((p), (s), (s)), 0)
395 #define clfree(p) clist_free_cblocks((p))
398 #define PWR_SUSPEND 1
400 #define config_detach(dev, flag) device_delete_child(device_get_parent(dev), dev)
402 typedef struct malloc_type *usb_malloc_type;
404 #define USB_DECLARE_DRIVER_INIT(dname, init...) \
405 Static device_probe_t __CONCAT(dname,_match); \
406 Static device_attach_t __CONCAT(dname,_attach); \
407 Static device_detach_t __CONCAT(dname,_detach); \
409 Static devclass_t __CONCAT(dname,_devclass); \
411 Static device_method_t __CONCAT(dname,_methods)[] = { \
412 DEVMETHOD(device_probe, __CONCAT(dname,_match)), \
413 DEVMETHOD(device_attach, __CONCAT(dname,_attach)), \
414 DEVMETHOD(device_detach, __CONCAT(dname,_detach)), \
419 Static driver_t __CONCAT(dname,_driver) = { \
421 __CONCAT(dname,_methods), \
422 sizeof(struct __CONCAT(dname,_softc)) \
424 MODULE_DEPEND(dname, usb, 1, 1, 1)
427 #define METHODS_NONE {0,0}
428 #define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, METHODS_NONE)
430 #define USB_MATCH(dname) \
432 __CONCAT(dname,_match)(device_t self)
434 #define USB_MATCH_START(dname, uaa) \
435 struct usb_attach_arg *uaa = device_get_ivars(self)
437 #define USB_MATCH_SETUP \
440 #define USB_ATTACH(dname) \
442 __CONCAT(dname,_attach)(device_t self)
444 #define USB_ATTACH_START(dname, sc, uaa) \
445 struct __CONCAT(dname,_softc) *sc = device_get_softc(self); \
446 struct usb_attach_arg *uaa = device_get_ivars(self)
448 /* Returns from attach */
449 #define USB_ATTACH_ERROR_RETURN return ENXIO
450 #define USB_ATTACH_SUCCESS_RETURN return 0
452 #define USB_ATTACH_SETUP \
454 device_set_desc_copy(self, devinfo)
456 #define USB_DETACH(dname) \
458 __CONCAT(dname,_detach)(device_t self)
460 #define USB_DETACH_START(dname, sc) \
461 struct __CONCAT(dname,_softc) *sc = device_get_softc(self)
463 #define USB_GET_SC_OPEN(dname, unit, sc) \
464 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit); \
468 #define USB_GET_SC(dname, unit, sc) \
469 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit)
471 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
472 (device_probe_and_attach((bdev)) == 0 ? (bdev) : 0)
474 /* conversion from one type of queue to the other */
475 #define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD
476 #define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD
477 #define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL
478 #define SIMPLEQ_NEXT STAILQ_NEXT
479 #define SIMPLEQ_FIRST STAILQ_FIRST
480 #define SIMPLEQ_HEAD STAILQ_HEAD
481 #define SIMPLEQ_EMPTY STAILQ_EMPTY
482 #define SIMPLEQ_FOREACH STAILQ_FOREACH
483 #define SIMPLEQ_INIT STAILQ_INIT
484 #define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
485 #define SIMPLEQ_ENTRY STAILQ_ENTRY
487 #include <sys/syslog.h>
489 #define logprintf(args...) log(LOG_DEBUG, args)
491 #define logprintf printf
494 SYSCTL_DECL(_hw_usb);
497 #elif defined(__FreeBSD__) || defined(__DragonFly__)
498 /***************************************************************************
505 #include <sys/malloc.h>
507 MALLOC_DECLARE(M_USB);
508 MALLOC_DECLARE(M_USBDEV);
509 MALLOC_DECLARE(M_USBHC);
515 /* We don't use the soft interrupt code in FreeBSD. */
517 #define USB_USE_SOFTINTR
520 #define Static static
522 #define device_ptr_t device_t
523 #define USBBASEDEVICE device_t
524 #define USBDEV(bdev) (bdev)
525 #define USBDEVNAME(bdev) device_get_nameunit(bdev)
526 #define USBDEVUNIT(bdev) device_get_unit(bdev)
527 #define USBDEVPTRNAME(bdev) device_get_nameunit(bdev)
528 #define USBDEVUNIT(bdev) device_get_unit(bdev)
529 #define USBGETSOFTC(bdev) (device_get_softc(bdev))
531 #define DECLARE_USB_DMA_T \
532 struct usb_dma_block; \
534 struct usb_dma_block *block; \
539 #if defined(__FreeBSD__) && __FreeBSD_version >= 500000
540 typedef struct thread *usb_proc_ptr;
542 #define uio_procp uio_td
544 #define usb_kthread_create1(f, s, p, a0, a1) \
545 kthread_create((f), (s), (p), RFHIGHPID, 0, (a0), (a1))
546 #define usb_kthread_create2(f, s, p, a0) \
547 kthread_create((f), (s), (p), RFHIGHPID, 0, (a0))
548 #define usb_kthread_create kthread_create
550 #define config_pending_incr()
551 #define config_pending_decr()
553 typedef struct callout usb_callout_t;
554 #define usb_callout_init(h) callout_init(&(h), 0)
555 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
556 #define usb_uncallout(h, f, d) callout_stop(&(h))
558 typedef struct proc *usb_proc_ptr;
561 #define PROC_UNLOCK(p)
563 #define usb_kthread_create1(f, s, p, a0, a1) \
564 kthread_create((f), (s), (p), (a0), (a1))
565 #define usb_kthread_create2(f, s, p, a0) \
566 kthread_create((f), (s), (p), (a0))
567 #define usb_kthread_create kthread_create
569 #define config_pending_incr()
570 #define config_pending_decr()
572 typedef struct callout usb_callout_t;
573 #define usb_callout_init(h) callout_init(&(h))
574 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
575 #define usb_uncallout(h, f, d) callout_stop(&(h))
577 #define BUS_DMA_COHERENT 0
578 #define ETHER_ALIGN 2
579 #define BPF_MTAP(ifp, m) if ((ifp)->if_bpf) bpf_mtap((ifp), (m));
582 #define clalloc(p, s, x) (clist_alloc_cblocks((p), (s), (s)), 0)
583 #define clfree(p) clist_free_cblocks((p))
586 #define PWR_SUSPEND 1
588 #define config_detach(dev, flag) device_delete_child(device_get_parent(dev), dev)
590 typedef struct malloc_type *usb_malloc_type;
592 #define USB_DECLARE_DRIVER_INIT(dname, init...) \
593 Static device_probe_t __CONCAT(dname,_match); \
594 Static device_attach_t __CONCAT(dname,_attach); \
595 Static device_detach_t __CONCAT(dname,_detach); \
597 Static devclass_t __CONCAT(dname,_devclass); \
599 Static device_method_t __CONCAT(dname,_methods)[] = { \
600 DEVMETHOD(device_probe, __CONCAT(dname,_match)), \
601 DEVMETHOD(device_attach, __CONCAT(dname,_attach)), \
602 DEVMETHOD(device_detach, __CONCAT(dname,_detach)), \
607 Static driver_t __CONCAT(dname,_driver) = { \
609 __CONCAT(dname,_methods), \
610 sizeof(struct __CONCAT(dname,_softc)) \
612 MODULE_DEPEND(dname, usb, 1, 1, 1)
615 #define METHODS_NONE {0,0}
616 #define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, METHODS_NONE)
618 #define USB_MATCH(dname) \
620 __CONCAT(dname,_match)(device_t self)
622 #define USB_MATCH_START(dname, uaa) \
623 struct usb_attach_arg *uaa = device_get_ivars(self)
625 #define USB_MATCH_SETUP \
628 #define USB_ATTACH(dname) \
630 __CONCAT(dname,_attach)(device_t self)
632 #define USB_ATTACH_START(dname, sc, uaa) \
633 struct __CONCAT(dname,_softc) *sc = device_get_softc(self); \
634 struct usb_attach_arg *uaa = device_get_ivars(self)
636 /* Returns from attach */
637 #define USB_ATTACH_ERROR_RETURN return ENXIO
638 #define USB_ATTACH_SUCCESS_RETURN return 0
640 #define USB_ATTACH_SETUP \
642 device_set_desc_copy(self, devinfo)
644 #define USB_DETACH(dname) \
646 __CONCAT(dname,_detach)(device_t self)
648 #define USB_DETACH_START(dname, sc) \
649 struct __CONCAT(dname,_softc) *sc = device_get_softc(self)
651 #define USB_GET_SC_OPEN(dname, unit, sc) \
652 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit); \
656 #define USB_GET_SC(dname, unit, sc) \
657 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit)
659 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
660 (device_probe_and_attach((bdev)) == 0 ? (bdev) : 0)
662 /* conversion from one type of queue to the other */
663 #define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD
664 #define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD
665 #define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL
666 #define SIMPLEQ_NEXT STAILQ_NEXT
667 #define SIMPLEQ_FIRST STAILQ_FIRST
668 #define SIMPLEQ_HEAD STAILQ_HEAD
669 #define SIMPLEQ_EMPTY STAILQ_EMPTY
670 #define SIMPLEQ_FOREACH STAILQ_FOREACH
671 #define SIMPLEQ_INIT STAILQ_INIT
672 #define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
673 #define SIMPLEQ_ENTRY STAILQ_ENTRY
675 #include <sys/syslog.h>
677 #define logprintf(args...) log(LOG_DEBUG, args)
679 #define logprintf printf
682 SYSCTL_DECL(_hw_usb);
685 #endif /* __FreeBSD__ */
687 #endif /* _USB_PORT_H */