From owner-svn-src-all@FreeBSD.ORG Fri May 9 13:07:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49C4B9C9; Fri, 9 May 2014 13:07:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37909247; Fri, 9 May 2014 13:07:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s49D7eS8051442; Fri, 9 May 2014 13:07:40 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s49D7dt6051440; Fri, 9 May 2014 13:07:39 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405091307.s49D7dt6051440@svn.freebsd.org> From: Luiz Otavio O Souza Date: Fri, 9 May 2014 13:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265767 - head/sys/dev/etherswitch/ip17x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Fri, 09 May 2014 13:07:40 -0000 Author: loos Date: Fri May 9 13:07:39 2014 New Revision: 265767 URL: http://svnweb.freebsd.org/changeset/base/265767 Log: Fix a bug on ip17x switch initialization which will fail as soon as you disable the debug and diagnosis options from current. We must wait 2ms after the switch reset and not 2us. Tested on RB433UAH. Modified: head/sys/dev/etherswitch/ip17x/ip175c.c head/sys/dev/etherswitch/ip17x/ip175d.c Modified: head/sys/dev/etherswitch/ip17x/ip175c.c ============================================================================== --- head/sys/dev/etherswitch/ip17x/ip175c.c Fri May 9 12:59:38 2014 (r265766) +++ head/sys/dev/etherswitch/ip17x/ip175c.c Fri May 9 13:07:39 2014 (r265767) @@ -63,7 +63,7 @@ ip175c_reset(struct ip17x_softc *sc) if (ip17x_writephy(sc->sc_dev, IP175C_RESET_PHY, IP175C_RESET_REG, 0x175c)) return (-1); - DELAY(2); + DELAY(2000); /* Force IP175C mode. */ data = ip17x_readphy(sc->sc_dev, IP175C_MODE_PHY, IP175C_MODE_REG); Modified: head/sys/dev/etherswitch/ip17x/ip175d.c ============================================================================== --- head/sys/dev/etherswitch/ip17x/ip175d.c Fri May 9 12:59:38 2014 (r265766) +++ head/sys/dev/etherswitch/ip17x/ip175d.c Fri May 9 13:07:39 2014 (r265767) @@ -62,7 +62,7 @@ ip175d_reset(struct ip17x_softc *sc) /* Reset all the switch settings. */ ip17x_writephy(sc->sc_dev, IP175D_RESET_PHY, IP175D_RESET_REG, 0x175d); - DELAY(2); + DELAY(2000); /* Disable the special tagging mode. */ ip17x_updatephy(sc->sc_dev, 21, 22, 0x3, 0x0);