svn commit: r248228 - in user/attilio/vmcontention/sys/dev: bge re
Attilio Rao
attilio at FreeBSD.org
Wed Mar 13 03:25:05 UTC 2013
Author: attilio
Date: Wed Mar 13 03:25:04 2013
New Revision: 248228
URL: http://svnweb.freebsd.org/changeset/base/248228
Log:
MFC
Modified:
user/attilio/vmcontention/sys/dev/bge/if_bge.c
user/attilio/vmcontention/sys/dev/re/if_re.c
Directory Properties:
user/attilio/vmcontention/ (props changed)
user/attilio/vmcontention/sys/ (props changed)
Modified: user/attilio/vmcontention/sys/dev/bge/if_bge.c
==============================================================================
--- user/attilio/vmcontention/sys/dev/bge/if_bge.c Wed Mar 13 02:11:45 2013 (r248227)
+++ user/attilio/vmcontention/sys/dev/bge/if_bge.c Wed Mar 13 03:25:04 2013 (r248228)
@@ -3594,15 +3594,15 @@ bge_attach(device_t dev)
}
bge_stop_fw(sc);
- bge_sig_pre_reset(sc, BGE_RESET_START);
+ bge_sig_pre_reset(sc, BGE_RESET_SHUTDOWN);
if (bge_reset(sc)) {
device_printf(sc->bge_dev, "chip reset failed\n");
error = ENXIO;
goto fail;
}
- bge_sig_legacy(sc, BGE_RESET_START);
- bge_sig_post_reset(sc, BGE_RESET_START);
+ bge_sig_legacy(sc, BGE_RESET_SHUTDOWN);
+ bge_sig_post_reset(sc, BGE_RESET_SHUTDOWN);
if (bge_chipinit(sc)) {
device_printf(sc->bge_dev, "chip initialization failed\n");
@@ -3960,6 +3960,20 @@ bge_reset(struct bge_softc *sc)
} else
write_op = bge_writereg_ind;
+ if (sc->bge_asicrev != BGE_ASICREV_BCM5700 &&
+ sc->bge_asicrev != BGE_ASICREV_BCM5701) {
+ CSR_WRITE_4(sc, BGE_NVRAM_SWARB, BGE_NVRAMSWARB_SET1);
+ for (i = 0; i < 8000; i++) {
+ if (CSR_READ_4(sc, BGE_NVRAM_SWARB) &
+ BGE_NVRAMSWARB_GNT1)
+ break;
+ DELAY(20);
+ }
+ if (i == 8000) {
+ if (bootverbose)
+ device_printf(dev, "NVRAM lock timedout!\n");
+ }
+ }
/* Take APE lock when performing reset. */
bge_ape_lock(sc, BGE_APE_LOCK_GRC);
Modified: user/attilio/vmcontention/sys/dev/re/if_re.c
==============================================================================
--- user/attilio/vmcontention/sys/dev/re/if_re.c Wed Mar 13 02:11:45 2013 (r248227)
+++ user/attilio/vmcontention/sys/dev/re/if_re.c Wed Mar 13 03:25:04 2013 (r248228)
@@ -1587,7 +1587,8 @@ re_attach(device_t dev)
* packet has IP options so disable TX IP checksum offloading.
*/
if (sc->rl_hwrev->rl_rev == RL_HWREV_8168C ||
- sc->rl_hwrev->rl_rev == RL_HWREV_8168C_SPIN2)
+ sc->rl_hwrev->rl_rev == RL_HWREV_8168C_SPIN2 ||
+ sc->rl_hwrev->rl_rev == RL_HWREV_8168CP)
ifp->if_hwassist = CSUM_TCP | CSUM_UDP;
else
ifp->if_hwassist = CSUM_IP | CSUM_TCP | CSUM_UDP;
@@ -3419,7 +3420,8 @@ re_ioctl(struct ifnet *ifp, u_long comma
if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) {
rev = sc->rl_hwrev->rl_rev;
if (rev == RL_HWREV_8168C ||
- rev == RL_HWREV_8168C_SPIN2)
+ rev == RL_HWREV_8168C_SPIN2 ||
+ rev == RL_HWREV_8168CP)
ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
else
ifp->if_hwassist |= RE_CSUM_FEATURES;
More information about the svn-src-user
mailing list