summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2012-11-03 21:05:32 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2012-11-03 21:05:32 +0000
commitdb43ed37503e76f8231e0ef628c941a057d9d16f (patch)
treebc6bf1c23415a6c7599c9b8c3da44c7e0ee8fde1
parent3c4ee57d9453563e5f318c01042a337c29b5dae8 (diff)
Notes
-rw-r--r--sys/dev/usb/controller/ehci.c16
-rw-r--r--sys/dev/usb/controller/ehci.h2
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c
index 19fdad760dcf..b301ea404229 100644
--- a/sys/dev/usb/controller/ehci.c
+++ b/sys/dev/usb/controller/ehci.c
@@ -332,14 +332,18 @@ ehci_init(ehci_softc_t *sc)
sc->sc_noport = EHCI_HCS_N_PORTS(sparams);
sc->sc_bus.usbrev = USB_REV_2_0;
- /* Reset the controller */
- DPRINTF("%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev));
+ if (!(sc->sc_flags & EHCI_SCFLG_DONTRESET)) {
+ /* Reset the controller */
+ DPRINTF("%s: resetting\n",
+ device_get_nameunit(sc->sc_bus.bdev));
- err = ehci_hcreset(sc);
- if (err) {
- device_printf(sc->sc_bus.bdev, "reset timeout\n");
- return (err);
+ err = ehci_hcreset(sc);
+ if (err) {
+ device_printf(sc->sc_bus.bdev, "reset timeout\n");
+ return (err);
+ }
}
+
/*
* use current frame-list-size selection 0: 1024*4 bytes 1: 512*4
* bytes 2: 256*4 bytes 3: unknown
diff --git a/sys/dev/usb/controller/ehci.h b/sys/dev/usb/controller/ehci.h
index b8b6985df74a..6fba4d4c7af2 100644
--- a/sys/dev/usb/controller/ehci.h
+++ b/sys/dev/usb/controller/ehci.h
@@ -345,6 +345,8 @@ typedef struct ehci_softc {
#define EHCI_SCFLG_TT 0x0020 /* transaction translator present */
#define EHCI_SCFLG_LOSTINTRBUG 0x0040 /* workaround for VIA / ATI chipsets */
#define EHCI_SCFLG_IAADBUG 0x0080 /* workaround for nVidia chipsets */
+#define EHCI_SCFLG_DONTRESET 0x0100 /* don't reset ctrl. in ehci_init() */
+#define EHCI_SCFLG_DONEINIT 0x1000 /* ehci_init() has been called. */
uint8_t sc_offs; /* offset to operational registers */
uint8_t sc_doorbell_disable; /* set on doorbell failure */