Make sure timeouts count as interrupt context too.
This commit is contained in:
parent
ac79ed84db
commit
bc5da9a8da
@ -43,6 +43,8 @@ Stylistic changes:
|
||||
declare all local definitions static
|
||||
rename s/request/xfer/
|
||||
use usb_ and usbd_ consistently
|
||||
rename s/r/err/
|
||||
use implicit test for no err
|
||||
indent continuation lines according to KNF
|
||||
rearrange the contents and names of some files (Nick)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ohci.c,v 1.44 1999/09/13 19:18:17 augustss Exp $ */
|
||||
/* $NetBSD: ohci.c,v 1.45 1999/09/13 19:49:41 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -668,7 +668,7 @@ ohci_intr(p)
|
||||
if (!eintrs)
|
||||
return (0);
|
||||
|
||||
sc->sc_bus.intr_context = 1;
|
||||
sc->sc_bus.intr_context++;
|
||||
sc->sc_bus.no_intrs++;
|
||||
DPRINTFN(7, ("ohci_intr: sc=%p intrs=%x(%x) eintr=%x\n",
|
||||
sc, (u_int)intrs, OREAD4(sc, OHCI_INTERRUPT_STATUS),
|
||||
@ -704,7 +704,7 @@ ohci_intr(p)
|
||||
ohci_rhsc_able(sc, 0);
|
||||
}
|
||||
|
||||
sc->sc_bus.intr_context = 0;
|
||||
sc->sc_bus.intr_context--;
|
||||
|
||||
/* Block unprocessed interrupts. XXX */
|
||||
OWRITE4(sc, OHCI_INTERRUPT_DISABLE, intrs);
|
||||
@ -1212,7 +1212,10 @@ ohci_timeout(addr)
|
||||
usbd_request_handle reqh = addr;
|
||||
|
||||
DPRINTF(("ohci_timeout: reqh=%p\n", reqh));
|
||||
|
||||
reqh->device->bus->intr_context++;
|
||||
ohci_abort_req(reqh, USBD_TIMEOUT);
|
||||
reqh->device->bus->intr_context--;
|
||||
}
|
||||
|
||||
#ifdef USB_DEBUG
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uhci.c,v 1.50 1999/09/13 19:18:17 augustss Exp $ */
|
||||
/* $NetBSD: uhci.c,v 1.51 1999/09/13 19:49:41 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -613,7 +613,9 @@ uhci_timo(addr)
|
||||
reqh->status = USBD_NORMAL_COMPLETION;
|
||||
s = splusb();
|
||||
reqh->hcpriv = 0;
|
||||
reqh->device->bus->intr_context++;
|
||||
usb_transfer_complete(reqh);
|
||||
reqh->device->bus->intr_context--;
|
||||
splx(s);
|
||||
}
|
||||
|
||||
@ -808,7 +810,7 @@ uhci_intr(arg)
|
||||
else /* nothing to acknowledge */
|
||||
return (0);
|
||||
|
||||
sc->sc_bus.intr_context = 1;
|
||||
sc->sc_bus.intr_context++;
|
||||
sc->sc_bus.no_intrs++;
|
||||
|
||||
/*
|
||||
@ -827,7 +829,7 @@ uhci_intr(arg)
|
||||
|
||||
DPRINTFN(10, ("uhci_intr: exit\n"));
|
||||
|
||||
sc->sc_bus.intr_context = 0;
|
||||
sc->sc_bus.intr_context--;
|
||||
|
||||
return (1);
|
||||
}
|
||||
@ -995,7 +997,10 @@ uhci_timeout(addr)
|
||||
uhci_intr_info_t *ii = addr;
|
||||
|
||||
DPRINTF(("uhci_timeout: ii=%p\n", ii));
|
||||
|
||||
ii->reqh->device->bus->intr_context++;
|
||||
uhci_abort_req(ii->reqh, USBD_TIMEOUT);
|
||||
ii->reqh->device->bus->intr_context--;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usbdivar.h,v 1.31 1999/09/13 19:18:18 augustss Exp $ */
|
||||
/* $NetBSD: usbdivar.h,v 1.32 1999/09/13 19:49:41 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -98,8 +98,8 @@ struct usbd_bus {
|
||||
char use_polling;
|
||||
struct usb_softc *usbctl;
|
||||
struct usb_device_stats stats;
|
||||
u_char intr_context;
|
||||
int no_intrs;
|
||||
int intr_context;
|
||||
u_int no_intrs;
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
bus_dma_tag_t dmatag; /* DMA tag */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user