summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2008-06-10 02:41:36 +0000
committerkevlo <kevlo@FreeBSD.org>2008-06-10 02:41:36 +0000
commit2d0c8314a0e9d8b6ca91238f4695112bbc183298 (patch)
tree84a979c1adffa42097beba1ab9b89f02f9876275 /sys
parent1a7f0803e4fbcc7296bbe6ec98d87438ca50abc4 (diff)
downloadFreeBSD-src-2d0c8314a0e9d8b6ca91238f4695112bbc183298.zip
FreeBSD-src-2d0c8314a0e9d8b6ca91238f4695112bbc183298.tar.gz
>From NetBSD:
Remove the code which disables port status change interrupts for 1s when one occured -- this makes that events get lost or delayed until the next change. Obtained from: NetBSD
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/ehci.c45
-rw-r--r--sys/dev/usb/ehcivar.h1
2 files changed, 0 insertions, 46 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index d15ccb4..0d0eee0 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -191,8 +191,6 @@ static void ehci_noop(usbd_pipe_handle pipe);
static int ehci_str(usb_string_descriptor_t *, int, char *);
static void ehci_pcd(ehci_softc_t *, usbd_xfer_handle);
-static void ehci_pcd_able(ehci_softc_t *, int);
-static void ehci_pcd_enable(void *);
static void ehci_disown(ehci_softc_t *, int, int);
static ehci_soft_qh_t *ehci_alloc_sqh(ehci_softc_t *);
@@ -499,7 +497,6 @@ ehci_init(ehci_softc_t *sc)
sc->sc_async_head = sqh;
EOWRITE4(sc, EHCI_ASYNCLISTADDR, sqh->physaddr | EHCI_LINK_QH);
- callout_init(&sc->sc_tmo_pcd, 0);
callout_init(&sc->sc_tmo_intrlist, 0);
lockinit(&sc->sc_doorbell_lock, PZERO, "ehcidb", 0, 0);
@@ -611,13 +608,6 @@ ehci_intr1(ehci_softc_t *sc)
}
if (eintrs & EHCI_STS_PCD) {
ehci_pcd(sc, sc->sc_intrxfer);
- /*
- * Disable PCD interrupt for now, because it will be
- * on until the port has been reset.
- */
- ehci_pcd_able(sc, 0);
- /* Do not allow RHSC interrupts > 1 per second */
- callout_reset(&sc->sc_tmo_pcd, hz, ehci_pcd_enable, sc);
eintrs &= ~EHCI_STS_PCD;
}
@@ -634,25 +624,6 @@ ehci_intr1(ehci_softc_t *sc)
return (1);
}
-void
-ehci_pcd_able(ehci_softc_t *sc, int on)
-{
- DPRINTFN(4, ("ehci_pcd_able: on=%d\n", on));
- if (on)
- sc->sc_eintrs |= EHCI_STS_PCD;
- else
- sc->sc_eintrs &= ~EHCI_STS_PCD;
- EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs);
-}
-
-void
-ehci_pcd_enable(void *v_sc)
-{
- ehci_softc_t *sc = v_sc;
-
- ehci_pcd_able(sc, 1);
-}
-
/*
* XXX write back xfer data for architectures with a write-back
* data cache; this is a hack because usb is mis-architected
@@ -971,7 +942,6 @@ ehci_detach(struct ehci_softc *sc, int flags)
EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs);
(void) ehci_hcreset(sc);
callout_stop(&sc->sc_tmo_intrlist);
- callout_stop(&sc->sc_tmo_pcd);
#if defined(__NetBSD__) || defined(__OpenBSD__)
if (sc->sc_powerhook != NULL)
@@ -1922,21 +1892,6 @@ ehci_root_ctrl_start(usbd_xfer_handle xfer)
err = USBD_IOERROR;
goto ret;
}
-#if 0
- switch(value) {
- case UHF_C_PORT_CONNECTION:
- case UHF_C_PORT_ENABLE:
- case UHF_C_PORT_SUSPEND:
- case UHF_C_PORT_OVER_CURRENT:
- case UHF_C_PORT_RESET:
- /* Enable RHSC interrupt if condition is cleared. */
- if ((OREAD4(sc, port) >> 16) == 0)
- ehci_pcd_able(sc, 1);
- break;
- default:
- break;
- }
-#endif
break;
case C(UR_GET_DESCRIPTOR, UT_READ_CLASS_DEVICE):
if ((value & 0xff) != 0) {
diff --git a/sys/dev/usb/ehcivar.h b/sys/dev/usb/ehcivar.h
index 7b22845..68417bb 100644
--- a/sys/dev/usb/ehcivar.h
+++ b/sys/dev/usb/ehcivar.h
@@ -154,7 +154,6 @@ typedef struct ehci_softc {
struct lock sc_doorbell_lock;
- struct callout sc_tmo_pcd;
struct callout sc_tmo_intrlist;
char sc_dying;
OpenPOWER on IntegriCloud