From owner-svn-src-all@FreeBSD.ORG Mon Jan 26 17:55:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30468106579C; Mon, 26 Jan 2009 17:55:08 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C19F8FC1C; Mon, 26 Jan 2009 17:55:08 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QHt7iB057979; Mon, 26 Jan 2009 17:55:07 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QHt7YM057978; Mon, 26 Jan 2009 17:55:07 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901261755.n0QHt7YM057978@svn.freebsd.org> From: Andrew Thompson Date: Mon, 26 Jan 2009 17:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187732 - head/sys/dev/usb2/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 17:55:11 -0000 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));