Date: Mon, 26 Jan 2009 17:55:07 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r187732 - head/sys/dev/usb2/controller Message-ID: <200901261755.n0QHt7YM057978@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: thompsa Date: Mon Jan 26 17:55:07 2009 New Revision: 187732 URL: http://svn.freebsd.org/changeset/base/187732 Log: MFp4 //depot/projects/usb/ @156706 Adjust an UHCI portreset delay. Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb2/controller/uhci2.c Modified: head/sys/dev/usb2/controller/uhci2.c ============================================================================== --- head/sys/dev/usb2/controller/uhci2.c Mon Jan 26 17:50:20 2009 (r187731) +++ head/sys/dev/usb2/controller/uhci2.c Mon Jan 26 17:55:07 2009 (r187732) @@ -2431,12 +2431,16 @@ uhci_portreset(uhci_softc_t *sc, uint16_ x = URWMASK(UREAD2(sc, port)); UWRITE2(sc, port, x & ~UHCI_PORTSC_PR); - if (use_polling) { - /* polling */ - DELAY(1000); - } else { - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); - } + + mtx_unlock(&sc->sc_bus.bus_mtx); + + /* + * This delay needs to be exactly 100us, else some USB devices + * fail to attach! + */ + DELAY(100); + + mtx_lock(&sc->sc_bus.bus_mtx); DPRINTFN(4, "uhci port %d reset, status1 = 0x%04x\n", index, UREAD2(sc, port));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901261755.n0QHt7YM057978>