svn commit: r217382 - head/sys/dev/re

Pyun YongHyeon yongari at FreeBSD.org
Thu Jan 13 22:52:57 UTC 2011


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);


More information about the svn-src-all mailing list