summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>2008-07-17 22:40:23 +0000
committerluoqi <luoqi@FreeBSD.org>2008-07-17 22:40:23 +0000
commitdc64dfc7929a6863d4b8a69463a17e507cd80173 (patch)
treec7084adfac437308295c1ec4501132e8b9b4a021
parentea1061e2f6826360711fcca0e69e9f188506e17a (diff)
downloadFreeBSD-src-dc64dfc7929a6863d4b8a69463a17e507cd80173.zip
FreeBSD-src-dc64dfc7929a6863d4b8a69463a17e507cd80173.tar.gz
Fix a benign typo that would give out an incorrect warning message.
Change a get-or-set sequence on OHCI_COMMAND_STATUS register which is "write to set" to a simple set.
-rw-r--r--sys/dev/usb/ohci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 7afc0c2..efa6e7e 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -815,20 +815,19 @@ static usbd_status
ohci_controller_init(ohci_softc_t *sc)
{
int i;
- u_int32_t s, ctl, ival, hcr, fm, per, desca;
+ u_int32_t ctl, ival, hcr, fm, per, desca;
/* Determine in what context we are running. */
ctl = OREAD4(sc, OHCI_CONTROL);
if (ctl & OHCI_IR) {
/* SMM active, request change */
DPRINTF(("ohci_init: SMM active, request owner change\n"));
- s = OREAD4(sc, OHCI_COMMAND_STATUS);
- OWRITE4(sc, OHCI_COMMAND_STATUS, s | OHCI_OCR);
+ OWRITE4(sc, OHCI_COMMAND_STATUS, OHCI_OCR);
for (i = 0; i < 100 && (ctl & OHCI_IR); i++) {
usb_delay_ms(&sc->sc_bus, 1);
ctl = OREAD4(sc, OHCI_CONTROL);
}
- if ((ctl & OHCI_IR) == 0) {
+ if (ctl & OHCI_IR) {
printf("%s: SMM does not respond, resetting\n",
device_get_nameunit(sc->sc_bus.bdev));
OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET);
OpenPOWER on IntegriCloud