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.15 2006/04/23 03:07:58 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"
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
112 #define logprintf printf
114 #define USB_DNAME(dname) dname
115 #define USB_DECLARE_DRIVER(dname) \
116 int __CONCAT(dname,_match)(struct device *, struct cfdata *, void *); \
117 void __CONCAT(dname,_attach)(struct device *, struct device *, void *); \
118 int __CONCAT(dname,_detach)(struct device *, int); \
119 int __CONCAT(dname,_activate)(struct device *, enum devact); \
121 extern struct cfdriver __CONCAT(dname,_cd); \
123 CFATTACH_DECL(USB_DNAME(dname), \
124 sizeof(struct ___CONCAT(dname,_softc)), \
125 ___CONCAT(dname,_match), \
126 ___CONCAT(dname,_attach), \
127 ___CONCAT(dname,_detach), \
128 ___CONCAT(dname,_activate))
130 #define USB_MATCH(dname) \
131 int __CONCAT(dname,_match)(struct device *parent, struct cfdata *match, void *aux)
133 #define USB_MATCH_START(dname, uaa) \
134 struct usb_attach_arg *uaa = aux
136 #define USB_ATTACH(dname) \
137 void __CONCAT(dname,_attach)(struct device *parent, struct device *self, void *aux)
139 #define USB_ATTACH_START(dname, sc, uaa) \
140 struct __CONCAT(dname,_softc) *sc = \
141 (struct __CONCAT(dname,_softc) *)self; \
142 struct usb_attach_arg *uaa = aux
144 /* Returns from attach */
145 #define USB_ATTACH_ERROR_RETURN return
146 #define USB_ATTACH_SUCCESS_RETURN return
148 #define USB_ATTACH_SETUP printf("\n")
150 #define USB_DETACH(dname) \
151 int __CONCAT(dname,_detach)(struct device *self, int flags)
153 #define USB_DETACH_START(dname, sc) \
154 struct __CONCAT(dname,_softc) *sc = \
155 (struct __CONCAT(dname,_softc) *)self
157 #define USB_GET_SC_OPEN(dname, unit, sc) \
158 if (unit >= __CONCAT(dname,_cd).cd_ndevs) \
160 sc = __CONCAT(dname,_cd).cd_devs[unit]; \
164 #define USB_GET_SC(dname, unit, sc) \
165 sc = __CONCAT(dname,_cd).cd_devs[unit]
167 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
168 (config_found_sm_loc(parent, (args)->port == 0 ? "usb" : "uhub", \
169 NULL, args, print, sub))
171 #elif defined(__OpenBSD__)
177 typedef struct proc *usb_proc_ptr;
179 #define UCOMBUSCF_PORTNO -1
180 #define UCOMBUSCF_PORTNO_DEFAULT -1
182 #define SCSI_MODE_SENSE MODE_SENSE
183 #define XS_STS_DONE ITSDONE
184 #define XS_CTL_POLL SCSI_POLL
185 #define XS_CTL_DATA_IN SCSI_DATA_IN
186 #define XS_CTL_DATA_OUT SCSI_DATA_OUT
187 #define scsipi_adapter scsi_adapter
188 #define scsipi_cmd scsi_cmd
189 #define scsipi_device scsi_device
190 #define scsipi_done scsi_done
191 #define scsipi_link scsi_link
192 #define scsipi_minphys scsi_minphys
193 #define scsipi_sense scsi_sense
194 #define scsipi_xfer scsi_xfer
195 #define xs_control flags
196 #define xs_status status
198 #define memcpy(d, s, l) bcopy((s),(d),(l))
199 #define memset(d, v, l) bzero((d),(l))
200 #define bswap32(x) swap32(x)
201 #define bswap16(x) swap16(x)
204 * The UHCI/OHCI controllers are little endian, so on big endian machines
205 * the data strored in memory needs to be swapped.
209 #define le32toh(x) letoh32(x)
210 #define le16toh(x) letoh16(x)
213 #define usb_kthread_create1 kthread_create
214 #define usb_kthread_create kthread_create_deferred
216 #define config_pending_incr()
217 #define config_pending_decr()
219 typedef int usb_malloc_type;
221 #define Ether_ifattach ether_ifattach
222 #define if_deactivate(x)
224 #define usbpoll usbselect
225 #define uhidpoll uhidselect
226 #define ugenpoll ugenselect
227 #define uscannerpoll uscannerselect
229 #define powerhook_establish(fn, sc) (fn)
230 #define powerhook_disestablish(hdl)
233 #define logprintf printf
235 #define swap_bytes_change_sign16_le swap_bytes_change_sign16
236 #define change_sign16_swap_bytes_le change_sign16_swap_bytes
237 #define change_sign16_le change_sign16
239 #define realloc usb_realloc
240 void *usb_realloc(void *, u_int, int, int);
244 typedef struct device *device_ptr_t;
245 #define USBBASEDEVICE struct device
246 #define USBDEV(bdev) (&(bdev))
247 #define USBDEVNAME(bdev) ((bdev).dv_xname)
248 #define USBDEVUNIT(bdev) ((bdev).dv_unit)
249 #define USBDEVPTRNAME(bdevptr) ((bdevptr)->dv_xname)
250 #define USBGETSOFTC(d) ((void *)(d))
252 #define DECLARE_USB_DMA_T \
253 struct usb_dma_block; \
255 struct usb_dma_block *block; \
259 typedef char usb_callout_t;
260 #define usb_callout_init(h)
261 #define usb_callout(h, t, f, d) timeout((f), (d), (t))
262 #define usb_uncallout(h, f, d) untimeout((f), (d))
264 #define USB_DECLARE_DRIVER(dname) \
265 int __CONCAT(dname,_match)(struct device *, void *, void *); \
266 void __CONCAT(dname,_attach)(struct device *, struct device *, void *); \
267 int __CONCAT(dname,_detach)(struct device *, int); \
268 int __CONCAT(dname,_activate)(struct device *, enum devact); \
270 struct cfdriver __CONCAT(dname,_cd) = { \
271 NULL, #dname, DV_DULL \
274 const struct cfattach __CONCAT(dname,_ca) = { \
275 sizeof(struct __CONCAT(dname,_softc)), \
276 __CONCAT(dname,_match), \
277 __CONCAT(dname,_attach), \
278 __CONCAT(dname,_detach), \
279 __CONCAT(dname,_activate), \
282 #define USB_MATCH(dname) \
284 __CONCAT(dname,_match)(parent, match, aux) \
285 struct device *parent; \
289 #define USB_MATCH_START(dname, uaa) \
290 struct usb_attach_arg *uaa = aux
292 #define USB_ATTACH(dname) \
294 __CONCAT(dname,_attach)(parent, self, aux) \
295 struct device *parent; \
296 struct device *self; \
299 #define USB_ATTACH_START(dname, sc, uaa) \
300 struct __CONCAT(dname,_softc) *sc = \
301 (struct __CONCAT(dname,_softc) *)self; \
302 struct usb_attach_arg *uaa = aux
304 /* Returns from attach */
305 #define USB_ATTACH_ERROR_RETURN return
306 #define USB_ATTACH_SUCCESS_RETURN return
308 #define USB_ATTACH_SETUP printf("\n")
310 #define USB_DETACH(dname) \
312 __CONCAT(dname,_detach)(self, flags) \
313 struct device *self; \
316 #define USB_DETACH_START(dname, sc) \
317 struct __CONCAT(dname,_softc) *sc = \
318 (struct __CONCAT(dname,_softc) *)self
320 #define USB_GET_SC_OPEN(dname, unit, sc) \
321 if (unit >= __CONCAT(dname,_cd).cd_ndevs) \
323 sc = __CONCAT(dname,_cd).cd_devs[unit]; \
327 #define USB_GET_SC(dname, unit, sc) \
328 sc = __CONCAT(dname,_cd).cd_devs[unit]
330 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
331 (config_found_sm(parent, args, print, sub))
333 #elif defined(__DragonFly__)
334 /***************************************************************************
340 #include <sys/malloc.h>
342 MALLOC_DECLARE(M_USB);
343 MALLOC_DECLARE(M_USBDEV);
344 MALLOC_DECLARE(M_USBHC);
350 /* We don't use the soft interrupt code in FreeBSD. */
351 /* #undef USB_USE_SOFTINTR */
353 #define Static static
355 #define device_ptr_t device_t
356 #define USBBASEDEVICE device_t
357 #define USBDEV(bdev) (bdev)
358 #define USBDEVNAME(bdev) device_get_nameunit(bdev)
359 #define USBDEVUNIT(bdev) device_get_unit(bdev)
360 #define USBDEVPTRNAME(bdev) device_get_nameunit(bdev)
361 #define USBDEVUNIT(bdev) device_get_unit(bdev)
362 #define USBGETSOFTC(bdev) (device_get_softc(bdev))
364 #define DECLARE_USB_DMA_T \
365 struct usb_dma_block; \
367 struct usb_dma_block *block; \
373 #define PROC_UNLOCK(p)
374 #define uio_procp uio_td
376 #define selwakeuppri(p, pri) selwakeup(p)
378 typedef struct thread *usb_proc_ptr;
380 /* XXX Change this when FreeBSD has memset */
381 #define memcpy(d, s, l) bcopy((s),(d),(l))
382 #define memset(d, v, l) bzero((d),(l))
384 #define config_pending_incr()
385 #define config_pending_decr()
387 #define usb_kthread_create(f, s) \
388 kthread_create(f, s, NULL, "dummy")
389 #define usb_kthread_create1(f, s, p, name, arg) \
390 kthread_create(f, s, p, name, arg)
391 #define usb_kthread_create2(f, s, p, name) \
392 kthread_create(f, s, p, name)
394 typedef struct callout usb_callout_t;
395 #define usb_callout_init(h) callout_init(&(h))
396 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
397 #define usb_uncallout(h, f, d) callout_stop(&(h))
399 #define ETHER_ALIGN 2
401 #define clalloc(p, s, x) (clist_alloc_cblocks((p), (s), (s)), 0)
402 #define clfree(p) clist_free_cblocks((p))
405 #define PWR_SUSPEND 1
407 #define config_detach(dev, flag) device_delete_child(device_get_parent(dev), dev)
409 typedef struct malloc_type *usb_malloc_type;
411 #define USB_DECLARE_DRIVER_INIT(dname, init...) \
412 Static device_probe_t __CONCAT(dname,_match); \
413 Static device_attach_t __CONCAT(dname,_attach); \
414 Static device_detach_t __CONCAT(dname,_detach); \
416 Static devclass_t __CONCAT(dname,_devclass); \
418 Static device_method_t __CONCAT(dname,_methods)[] = { \
419 DEVMETHOD(device_probe, __CONCAT(dname,_match)), \
420 DEVMETHOD(device_attach, __CONCAT(dname,_attach)), \
421 DEVMETHOD(device_detach, __CONCAT(dname,_detach)), \
426 Static driver_t __CONCAT(dname,_driver) = { \
428 __CONCAT(dname,_methods), \
429 sizeof(struct __CONCAT(dname,_softc)) \
431 MODULE_DEPEND(dname, usb, 1, 1, 1)
434 #define METHODS_NONE {0,0}
435 #define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, METHODS_NONE)
437 #define USB_MATCH(dname) \
439 __CONCAT(dname,_match)(device_t self)
441 #define USB_MATCH_START(dname, uaa) \
442 struct usb_attach_arg *uaa = device_get_ivars(self)
444 #define USB_MATCH_SETUP \
447 #define USB_ATTACH(dname) \
449 __CONCAT(dname,_attach)(device_t self)
451 #define USB_ATTACH_START(dname, sc, uaa) \
452 struct __CONCAT(dname,_softc) *sc = device_get_softc(self); \
453 struct usb_attach_arg *uaa = device_get_ivars(self)
455 /* Returns from attach */
456 #define USB_ATTACH_ERROR_RETURN return ENXIO
457 #define USB_ATTACH_SUCCESS_RETURN return 0
459 #define USB_ATTACH_SETUP \
461 device_set_desc_copy(self, devinfo)
463 #define USB_DETACH(dname) \
465 __CONCAT(dname,_detach)(device_t self)
467 #define USB_DETACH_START(dname, sc) \
468 struct __CONCAT(dname,_softc) *sc = device_get_softc(self)
470 #define USB_GET_SC_OPEN(dname, unit, sc) \
471 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit); \
475 #define USB_GET_SC(dname, unit, sc) \
476 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit)
478 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
479 (device_probe_and_attach((bdev)) == 0 ? (bdev) : 0)
481 /* conversion from one type of queue to the other */
482 #define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD
483 #define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD
484 #define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL
485 #define SIMPLEQ_NEXT STAILQ_NEXT
486 #define SIMPLEQ_FIRST STAILQ_FIRST
487 #define SIMPLEQ_HEAD STAILQ_HEAD
488 #define SIMPLEQ_EMPTY STAILQ_EMPTY
489 #define SIMPLEQ_FOREACH STAILQ_FOREACH
490 #define SIMPLEQ_INIT STAILQ_INIT
491 #define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
492 #define SIMPLEQ_ENTRY STAILQ_ENTRY
494 #include <sys/syslog.h>
496 #define logprintf(args...) log(LOG_DEBUG, args)
498 #define logprintf printf
501 SYSCTL_DECL(_hw_usb);
504 #elif defined(__FreeBSD__) || defined(__DragonFly__)
505 /***************************************************************************
512 #include <sys/malloc.h>
514 MALLOC_DECLARE(M_USB);
515 MALLOC_DECLARE(M_USBDEV);
516 MALLOC_DECLARE(M_USBHC);
522 /* We don't use the soft interrupt code in FreeBSD. */
524 #define USB_USE_SOFTINTR
527 #define Static static
529 #define device_ptr_t device_t
530 #define USBBASEDEVICE device_t
531 #define USBDEV(bdev) (bdev)
532 #define USBDEVNAME(bdev) device_get_nameunit(bdev)
533 #define USBDEVUNIT(bdev) device_get_unit(bdev)
534 #define USBDEVPTRNAME(bdev) device_get_nameunit(bdev)
535 #define USBDEVUNIT(bdev) device_get_unit(bdev)
536 #define USBGETSOFTC(bdev) (device_get_softc(bdev))
538 #define DECLARE_USB_DMA_T \
539 struct usb_dma_block; \
541 struct usb_dma_block *block; \
546 #if defined(__FreeBSD__) && __FreeBSD_version >= 500000
547 typedef struct thread *usb_proc_ptr;
549 #define uio_procp uio_td
551 #define usb_kthread_create1(f, s, p, a0, a1) \
552 kthread_create((f), (s), (p), RFHIGHPID, 0, (a0), (a1))
553 #define usb_kthread_create2(f, s, p, a0) \
554 kthread_create((f), (s), (p), RFHIGHPID, 0, (a0))
555 #define usb_kthread_create kthread_create
557 #define config_pending_incr()
558 #define config_pending_decr()
560 typedef struct callout usb_callout_t;
561 #define usb_callout_init(h) callout_init(&(h), 0)
562 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
563 #define usb_uncallout(h, f, d) callout_stop(&(h))
565 typedef struct proc *usb_proc_ptr;
568 #define PROC_UNLOCK(p)
570 #define usb_kthread_create1(f, s, p, a0, a1) \
571 kthread_create((f), (s), (p), (a0), (a1))
572 #define usb_kthread_create2(f, s, p, a0) \
573 kthread_create((f), (s), (p), (a0))
574 #define usb_kthread_create kthread_create
576 #define config_pending_incr()
577 #define config_pending_decr()
579 typedef struct callout usb_callout_t;
580 #define usb_callout_init(h) callout_init(&(h))
581 #define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
582 #define usb_uncallout(h, f, d) callout_stop(&(h))
585 #define clalloc(p, s, x) (clist_alloc_cblocks((p), (s), (s)), 0)
586 #define clfree(p) clist_free_cblocks((p))
589 #define PWR_SUSPEND 1
591 #define config_detach(dev, flag) device_delete_child(device_get_parent(dev), dev)
593 typedef struct malloc_type *usb_malloc_type;
595 #define USB_DECLARE_DRIVER_INIT(dname, init...) \
596 Static device_probe_t __CONCAT(dname,_match); \
597 Static device_attach_t __CONCAT(dname,_attach); \
598 Static device_detach_t __CONCAT(dname,_detach); \
600 Static devclass_t __CONCAT(dname,_devclass); \
602 Static device_method_t __CONCAT(dname,_methods)[] = { \
603 DEVMETHOD(device_probe, __CONCAT(dname,_match)), \
604 DEVMETHOD(device_attach, __CONCAT(dname,_attach)), \
605 DEVMETHOD(device_detach, __CONCAT(dname,_detach)), \
610 Static driver_t __CONCAT(dname,_driver) = { \
612 __CONCAT(dname,_methods), \
613 sizeof(struct __CONCAT(dname,_softc)) \
615 MODULE_DEPEND(dname, usb, 1, 1, 1)
618 #define METHODS_NONE {0,0}
619 #define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, METHODS_NONE)
621 #define USB_MATCH(dname) \
623 __CONCAT(dname,_match)(device_t self)
625 #define USB_MATCH_START(dname, uaa) \
626 struct usb_attach_arg *uaa = device_get_ivars(self)
628 #define USB_MATCH_SETUP \
631 #define USB_ATTACH(dname) \
633 __CONCAT(dname,_attach)(device_t self)
635 #define USB_ATTACH_START(dname, sc, uaa) \
636 struct __CONCAT(dname,_softc) *sc = device_get_softc(self); \
637 struct usb_attach_arg *uaa = device_get_ivars(self)
639 /* Returns from attach */
640 #define USB_ATTACH_ERROR_RETURN return ENXIO
641 #define USB_ATTACH_SUCCESS_RETURN return 0
643 #define USB_ATTACH_SETUP \
645 device_set_desc_copy(self, devinfo)
647 #define USB_DETACH(dname) \
649 __CONCAT(dname,_detach)(device_t self)
651 #define USB_DETACH_START(dname, sc) \
652 struct __CONCAT(dname,_softc) *sc = device_get_softc(self)
654 #define USB_GET_SC_OPEN(dname, unit, sc) \
655 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit); \
659 #define USB_GET_SC(dname, unit, sc) \
660 sc = devclass_get_softc(__CONCAT(dname,_devclass), unit)
662 #define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \
663 (device_probe_and_attach((bdev)) == 0 ? (bdev) : 0)
665 /* conversion from one type of queue to the other */
666 #define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD
667 #define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD
668 #define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL
669 #define SIMPLEQ_NEXT STAILQ_NEXT
670 #define SIMPLEQ_FIRST STAILQ_FIRST
671 #define SIMPLEQ_HEAD STAILQ_HEAD
672 #define SIMPLEQ_EMPTY STAILQ_EMPTY
673 #define SIMPLEQ_FOREACH STAILQ_FOREACH
674 #define SIMPLEQ_INIT STAILQ_INIT
675 #define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
676 #define SIMPLEQ_ENTRY STAILQ_ENTRY
678 #include <sys/syslog.h>
680 #define logprintf(args...) log(LOG_DEBUG, args)
682 #define logprintf printf
685 SYSCTL_DECL(_hw_usb);
688 #endif /* __FreeBSD__ */
690 #endif /* _USB_PORT_H */