diff options
author | yongari <yongari@FreeBSD.org> | 2008-07-02 06:45:59 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2008-07-02 06:45:59 +0000 |
commit | b2a4327b82cfa0fad1e42e5e917c819c591d7fab (patch) | |
tree | 9eb423a9658c78ea078bbe2fb4aff68e5f055dd2 /sys/dev/re/if_re.c | |
parent | b32906b68fd501764f109241994fc7bb18f0739d (diff) | |
download | FreeBSD-src-b2a4327b82cfa0fad1e42e5e917c819c591d7fab.zip FreeBSD-src-b2a4327b82cfa0fad1e42e5e917c819c591d7fab.tar.gz |
If MSI is not active make sure to disable MSI in EEPROM.
Diffstat (limited to 'sys/dev/re/if_re.c')
-rw-r--r-- | sys/dev/re/if_re.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index d8420a7..6b74761 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1195,6 +1195,17 @@ re_attach(dev) } } + if ((sc->rl_flags & RL_FLAG_MSI) == 0) { + CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); + cfg = CSR_READ_1(sc, RL_CFG2); + if ((cfg & RL_CFG2_MSI) != 0) { + device_printf(dev, "turning off MSI enable bit.\n"); + cfg &= ~RL_CFG2_MSI; + CSR_WRITE_1(sc, RL_CFG2, cfg); + } + CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); + } + /* Reset the adapter. */ RL_LOCK(sc); re_reset(sc); |