From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 22:52:57 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F9D2106566C; Thu, 13 Jan 2011 22:52:57 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EEAD8FC13; Thu, 13 Jan 2011 22:52:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0DMqv43066215; Thu, 13 Jan 2011 22:52:57 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0DMqvtg066212; Thu, 13 Jan 2011 22:52:57 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101132252.p0DMqvtg066212@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 13 Jan 2011 22:52:57 +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: r217382 - head/sys/dev/re X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 22:52:57 -0000 Author: yongari Date: Thu Jan 13 22:52:57 2011 New Revision: 217382 URL: http://svn.freebsd.org/changeset/base/217382 Log: re_reset() should be called only after setting device specific features. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Thu Jan 13 22:49:10 2011 (r217381) +++ head/sys/dev/re/if_re.c Thu Jan 13 22:52:57 2011 (r217382) @@ -1258,11 +1258,6 @@ re_attach(device_t dev) CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); } - /* Reset the adapter. */ - RL_LOCK(sc); - re_reset(sc); - RL_UNLOCK(sc); - hw_rev = re_hwrevs; hwrev = CSR_READ_4(sc, RL_TXCFG); switch (hwrev & 0x70000000) { @@ -1366,6 +1361,11 @@ re_attach(device_t dev) break; } + /* Reset the adapter. */ + RL_LOCK(sc); + re_reset(sc); + RL_UNLOCK(sc); + /* Enable PME. */ CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); cfg = CSR_READ_1(sc, RL_CFG1);