Date: Thu, 22 Jan 2009 17:09:57 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 156530 for review Message-ID: <200901221709.n0MH9vgq050810@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=156530 Change 156530 by hselasky@hselasky_laptop001 on 2009/01/22 17:09:44 Improve my UHCI SOF patch. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/controller/uhci2.c#24 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/controller/uhci2.c#24 (text+ko) ==== @@ -2396,6 +2396,24 @@ else return (USB_ERR_IOERROR); + /* + * Before we do anything, turn on SOF messages on the USB + * BUS. Some USB devices do not cope without them! + */ + if (!(UREAD2(sc, UHCI_CMD) & UHCI_CMD_RS)) { + + DPRINTF("Activating SOFs!\n"); + + UHCICMD(sc, (UHCI_CMD_MAXP | UHCI_CMD_RS)); + + /* wait a little bit */ + if (use_polling) { + DELAY(10000); + } else { + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 10); + } + } + x = URWMASK(UREAD2(sc, port)); UWRITE2(sc, port, x | UHCI_PORTSC_PR); @@ -3321,9 +3339,9 @@ flags = bus->hw_power_state; /* - * WARNING: Some FULL speed USB devices require periodic SOF messages! - * If any USB devices are connected through the UHCI, power - * save will be disabled! + * WARNING: Some FULL speed USB devices require periodic SOF + * messages! If any USB devices are connected through the + * UHCI, power save will be disabled! */ if (flags & (USB_HW_POWER_CONTROL | USB_HW_POWER_NON_ROOT_HUB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901221709.n0MH9vgq050810>