Let usbd_set_polling() work on a usbd_device_handle instead of
a usbd_interface_handle.
This commit is contained in:
parent
9647c5b871
commit
c664f35fc5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ukbd.c,v 1.51 1999/12/06 21:07:00 augustss Exp $ */
|
||||
/* $NetBSD: ukbd.c,v 1.52 2000/01/16 09:37:18 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -681,10 +681,12 @@ ukbd_cnpollc(v, on)
|
||||
int on;
|
||||
{
|
||||
struct ukbd_softc *sc = v;
|
||||
usbd_device_handle dev;
|
||||
|
||||
DPRINTFN(2,("ukbd_cnpollc: sc=%p on=%d\n", v, on));
|
||||
|
||||
usbd_set_polling(sc->sc_iface, on);
|
||||
(void)usbd_interface2device_handle(sc->sc_iface,&dev);
|
||||
usbd_set_polling(dev, on);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usbdi.c,v 1.53 1999/11/28 22:49:53 augustss Exp $ */
|
||||
/* $NetBSD: usbdi.c,v 1.54 2000/01/16 09:37:18 augustss Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */
|
||||
|
||||
/*
|
||||
@ -1048,14 +1048,14 @@ usbd_dopoll(iface)
|
||||
}
|
||||
|
||||
void
|
||||
usbd_set_polling(iface, on)
|
||||
usbd_interface_handle iface;
|
||||
usbd_set_polling(dev, on)
|
||||
usbd_device_handle dev;
|
||||
int on;
|
||||
{
|
||||
if (on)
|
||||
iface->device->bus->use_polling++;
|
||||
dev->bus->use_polling++;
|
||||
else
|
||||
iface->device->bus->use_polling--;
|
||||
dev->bus->use_polling--;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usbdi.h,v 1.34 1999/11/18 23:32:34 augustss Exp $ */
|
||||
/* $NetBSD: usbdi.h,v 1.35 2000/01/16 09:37:18 augustss Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */
|
||||
|
||||
/*
|
||||
@ -166,7 +166,7 @@ usb_endpoint_descriptor_t *usbd_find_edesc
|
||||
int endptidx));
|
||||
|
||||
void usbd_dopoll __P((usbd_interface_handle));
|
||||
void usbd_set_polling __P((usbd_interface_handle iface, int on));
|
||||
void usbd_set_polling __P((usbd_device_handle iface, int on));
|
||||
|
||||
const char *usbd_errstr __P((usbd_status err));
|
||||
|
||||
@ -240,8 +240,13 @@ usb_endpoint_descriptor_t *usbd_get_endpoint_descriptor
|
||||
int usbd_driver_load __P((module_t mod, int what, void *arg));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* splusb MUST be the lowest level interrupt so that within USB callbacks
|
||||
* the level can be raised the appropriate level.
|
||||
* XXX Should probably use a softsplusb.
|
||||
*/
|
||||
/* XXX */
|
||||
#define splusb splbio
|
||||
#define IPL_USB IPL_BIO
|
||||
/* XXX */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user