A little portability stuff.
This commit is contained in:
parent
e93cdd6905
commit
176f75ee37
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ehci.c,v 1.75 2004/10/21 16:18:42 xtraeme Exp $ */
|
||||
/* $NetBSD: ehci.c,v 1.76 2004/10/21 18:14:40 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -65,7 +65,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.75 2004/10/21 16:18:42 xtraeme Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.76 2004/10/21 18:14:40 augustss Exp $");
|
||||
|
||||
#include "ohci.h"
|
||||
#include "uhci.h"
|
||||
|
@ -1400,7 +1400,7 @@ ehci_sync_hc(ehci_softc_t *sc)
|
|||
return;
|
||||
}
|
||||
DPRINTFN(2,("ehci_sync_hc: enter\n"));
|
||||
lockmgr(&sc->sc_doorbell_lock, LK_EXCLUSIVE, NULL); /* get doorbell */
|
||||
usb_lockmgr(&sc->sc_doorbell_lock, LK_EXCLUSIVE, NULL); /* get doorbell */
|
||||
s = splhardusb();
|
||||
/* ask for doorbell */
|
||||
EOWRITE4(sc, EHCI_USBCMD, EOREAD4(sc, EHCI_USBCMD) | EHCI_CMD_IAAD);
|
||||
|
@ -1410,7 +1410,7 @@ ehci_sync_hc(ehci_softc_t *sc)
|
|||
DPRINTFN(1,("ehci_sync_hc: cmd=0x%08x sts=0x%08x\n",
|
||||
EOREAD4(sc, EHCI_USBCMD), EOREAD4(sc, EHCI_USBSTS)));
|
||||
splx(s);
|
||||
lockmgr(&sc->sc_doorbell_lock, LK_RELEASE, NULL); /* release doorbell */
|
||||
usb_lockmgr(&sc->sc_doorbell_lock, LK_RELEASE, NULL); /* release doorbell */
|
||||
#ifdef DIAGNOSTIC
|
||||
if (error)
|
||||
printf("ehci_sync_hc: tsleep() = %d\n", error);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* $OpenBSD: usb_port.h,v 1.18 2000/09/06 22:42:10 rahnds Exp $ */
|
||||
/* $NetBSD: usb_port.h,v 1.63 2004/09/13 12:55:49 drochner Exp $ */
|
||||
/* $NetBSD: usb_port.h,v 1.64 2004/10/21 18:14:40 augustss Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -126,6 +126,8 @@ typedef struct callout usb_callout_t;
|
|||
#define usb_callout(h, t, f, d) callout_reset(&(h), (t), (f), (d))
|
||||
#define usb_uncallout(h, f, d) callout_stop(&(h))
|
||||
|
||||
#define usb_lockmgr lockmgr
|
||||
|
||||
#define usb_kthread_create1 kthread_create1
|
||||
#define usb_kthread_create kthread_create
|
||||
|
||||
|
@ -262,6 +264,8 @@ typedef struct proc *usb_proc_ptr;
|
|||
#define usb_kthread_create1 kthread_create
|
||||
#define usb_kthread_create kthread_create_deferred
|
||||
|
||||
#define usb_lockmgr(lk, mode, ptr) lockmgr(lk, mode, ptr, curproc)
|
||||
|
||||
#define config_pending_incr()
|
||||
#define config_pending_decr()
|
||||
|
||||
|
|
Loading…
Reference in New Issue