mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Merge from NetBSD:
usb.c rev 1.43, usb_port.h rev 1.26, usb_subr.c rev 1.71 Some OpenBSD portability fixes.
This commit is contained in:
parent
0f657c164b
commit
167145ddc0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=93549
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usb.c,v 1.41 2000/03/16 00:46:38 augustss Exp $ */
|
||||
/* $NetBSD: usb.c,v 1.43 2000/03/29 18:24:53 augustss Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*
|
||||
@ -268,7 +268,7 @@ USB_ATTACH(usb)
|
||||
|
||||
config_pending_incr();
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
kthread_create(usb_create_event_thread, sc);
|
||||
usb_kthread_create(usb_create_event_thread, sc);
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
@ -293,7 +293,7 @@ usb_create_event_thread(void *arg)
|
||||
{
|
||||
struct usb_softc *sc = arg;
|
||||
|
||||
if (kthread_create1(usb_event_thread, sc, &sc->sc_event_thread,
|
||||
if (usb_kthread_create1(usb_event_thread, sc, &sc->sc_event_thread,
|
||||
"%s", USBDEVNAME(sc->sc_dev))) {
|
||||
printf("%s: unable to create event thread for\n",
|
||||
USBDEVNAME(sc->sc_dev));
|
||||
|
@ -86,6 +86,9 @@ typedef struct callout usb_callout_t;
|
||||
#define usb_callout(h, t, f, d) ((h) = timeout((f), (d), (t)))
|
||||
#define usb_uncallout(h, f, d) untimeout((f), (d))
|
||||
|
||||
#define usb_kthread_create1 kthread_create1
|
||||
#define usb_kthread_create kthread_create
|
||||
|
||||
typedef int usb_malloc_type;
|
||||
|
||||
#define logprintf printf
|
||||
@ -179,8 +182,8 @@ typedef struct proc *usb_proc_ptr;
|
||||
#define memcpy(d, s, l) bcopy((s),(d),(l))
|
||||
#define memset(d, v, l) bzero((d),(l))
|
||||
#define bswap32(x) swap32(x)
|
||||
#define kthread_create1 kthread_create
|
||||
#define kthread_create kthread_create_deferred
|
||||
#define usb_kthread_create1 kthread_create
|
||||
#define usb_kthread_create kthread_create_deferred
|
||||
|
||||
#define config_pending_incr()
|
||||
#define config_pending_decr()
|
||||
@ -194,7 +197,7 @@ typedef int usb_malloc_type;
|
||||
#define PWR_RESUME 0
|
||||
#define PWR_SUSPEND 1
|
||||
|
||||
typedef struct device device_ptr_t;
|
||||
typedef struct device *device_ptr_t;
|
||||
#define USBBASEDEVICE struct device
|
||||
#define USBDEV(bdev) (&(bdev))
|
||||
#define USBDEVNAME(bdev) ((bdev).dv_xname)
|
||||
@ -322,8 +325,9 @@ typedef struct thread *usb_proc_ptr;
|
||||
/* XXX Change this when FreeBSD has memset */
|
||||
#define memcpy(d, s, l) bcopy((s),(d),(l))
|
||||
#define memset(d, v, l) bzero((d),(l))
|
||||
#define kthread_create1(f, s, p, a0, a1) \
|
||||
#define usb_kthread_create1(f, s, p, a0, a1) \
|
||||
kthread_create((f), (s), (p), RFHIGHPID, (a0), (a1))
|
||||
#define usb_kthread_create kthread_create
|
||||
|
||||
#define config_pending_incr()
|
||||
#define config_pending_decr()
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usb_subr.c,v 1.70 2000/03/29 01:45:20 augustss Exp $ */
|
||||
/* $NetBSD: usb_subr.c,v 1.71 2000/03/29 18:24:53 augustss Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user