-/* $OpenBSD: uhci.c,v 1.8 2000/03/26 15:53:07 aaron Exp $ */
+/* $OpenBSD: uhci.c,v 1.9 2000/03/26 21:47:51 aaron Exp $ */
/* $NetBSD: uhci.c,v 1.87 2000/02/29 21:37:01 augustss Exp $ */
/*
#include <sys/module.h>
#include <sys/bus.h>
#include <machine/bus_pio.h>
-#if defined(DIAGNOSTIC) && defined(__i386)
+#if defined(DIAGNOSTIC) && defined(__i386__)
#include <machine/cpu.h>
#endif
#endif
{
uhci_dump_qh(sqh);
- /* uhci_dump_sqh displays all the QHs and TDs from the given QH onwards
+ /* uhci_dump_qhs displays all the QHs and TDs from the given QH onwards
* Traverses sideways first, then down.
*
* QH1
err = usb_allocmem(&sc->sc_bus, UHCI_SQH_SIZE * UHCI_SQH_CHUNK,
UHCI_QH_ALIGN, &dma);
if (err)
- return 0;
+ return (0);
for(i = 0; i < UHCI_SQH_CHUNK; i++) {
offs = i * UHCI_SQH_SIZE;
sqh = (uhci_soft_qh_t *)((char *)KERNADDR(&dma) +offs);
-/* $OpenBSD: usb.c,v 1.8 2000/03/26 08:39:46 aaron Exp $ */
+/* $OpenBSD: usb.c,v 1.9 2000/03/26 21:47:51 aaron Exp $ */
/* $NetBSD: usb.c,v 1.41 2000/03/16 00:46:38 augustss Exp $ */
/*
* until the USB event thread is running, which means that
* the keyboard will not work until after cold boot.
*/
- if (cold && (sc->sc_dev.dv_cfdata->cf_flags & 1)
+ if (cold && (sc->sc_dev.dv_cfdata->cf_flags & 1))
dev->hub->explore(sc->sc_bus->root_hub);
#endif
} else {
{
int revents, mask, s;
- if (minor(dev) != USB_DEV_MINOR) {
+ if (minor(dev) == USB_DEV_MINOR) {
revents = 0;
mask = POLLIN | POLLRDNORM;
selrecord(p, &usb_selevent);
splx(s);
- return(revents);
+ return (revents);
} else {
#if defined(__FreeBSD__)
/* This part should be deleted when kthreads is available */
#if defined(__FreeBSD__)
splx(s);
#endif
+
return (USBD_NORMAL_COMPLETION);
}