summaryrefslogtreecommitdiffstats
path: root/sys/dev/re
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2011-01-13 22:52:57 +0000
committeryongari <yongari@FreeBSD.org>2011-01-13 22:52:57 +0000
commitc2742441f1a5faba43f6603e0300d1e69dbe9d36 (patch)
tree499ae23e943f4b91d176568f93e49c753a4b460d /sys/dev/re
parent24ec74fe0491dff2d2536c128461ad4060a7b4bc (diff)
downloadFreeBSD-src-c2742441f1a5faba43f6603e0300d1e69dbe9d36.zip
FreeBSD-src-c2742441f1a5faba43f6603e0300d1e69dbe9d36.tar.gz
re_reset() should be called only after setting device specific
features.
Diffstat (limited to 'sys/dev/re')
-rw-r--r--sys/dev/re/if_re.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 30d9df5..f9c72b0 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -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);
OpenPOWER on IntegriCloud