diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2011-03-25 10:11:21 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2011-03-25 10:11:21 +0000 |
commit | 46873d15b130b7b9097ab5c6d9564dfc88d87f94 (patch) | |
tree | 7d95efe066ab866d404e99dea4d3118055468af0 /sys/dev/usb/controller/ehci.c | |
parent | bf9d222b8839fc1206bc9abbfac592b5e6647528 (diff) | |
download | src-46873d15b130b7b9097ab5c6d9564dfc88d87f94.tar.gz src-46873d15b130b7b9097ab5c6d9564dfc88d87f94.zip |
Fix initialisation order with regard to debug prints.
Reported by: Luiz Otavio O Souza
MFC after: 14 days
Approved by: thompsa (mentor)
Notes
Notes:
svn path=/head/; revision=219983
Diffstat (limited to 'sys/dev/usb/controller/ehci.c')
-rw-r--r-- | sys/dev/usb/controller/ehci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c index 073a844acf62..8dcffa219797 100644 --- a/sys/dev/usb/controller/ehci.c +++ b/sys/dev/usb/controller/ehci.c @@ -259,6 +259,8 @@ ehci_init(ehci_softc_t *sc) usb_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.bus_mtx, 0); usb_callout_init_mtx(&sc->sc_tmo_poll, &sc->sc_bus.bus_mtx, 0); + sc->sc_offs = EHCI_CAPLENGTH(EREAD4(sc, EHCI_CAPLEN_HCIVERSION)); + #ifdef USB_DEBUG if (ehciiaadbug) sc->sc_flags |= EHCI_SCFLG_IAADBUG; @@ -269,8 +271,6 @@ ehci_init(ehci_softc_t *sc) } #endif - sc->sc_offs = EHCI_CAPLENGTH(EREAD4(sc, EHCI_CAPLEN_HCIVERSION)); - version = EHCI_HCIVERSION(EREAD4(sc, EHCI_CAPLEN_HCIVERSION)); device_printf(sc->sc_bus.bdev, "EHCI version %x.%x\n", version >> 8, version & 0xff); |