aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/re/if_re.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index d81e4d664437..2b0ef3a46503 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -1185,23 +1185,17 @@ re_attach(dev)
device_printf(dev, "Using %d MSI messages\n",
msic);
sc->rl_msi = 1;
+ /* Explicitly set MSI enable bit. */
+ CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE);
+ cfg = CSR_READ_1(sc, RL_CFG2);
+ cfg |= RL_CFG2_MSI;
+ CSR_WRITE_1(sc, RL_CFG2, cfg);
+ CSR_WRITE_1(sc, RL_EECMD, 0);
} else
pci_release_msi(dev);
}
}
- /* For MSI capable hardwares, explicitily set/clear MSI enable bit. */
- if (msic != 0) {
- CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE);
- cfg = CSR_READ_1(sc, RL_CFG2);
- if (sc->rl_msi != 0)
- cfg |= RL_CFG2_MSI;
- else
- cfg &= ~RL_CFG2_MSI;
- CSR_WRITE_1(sc, RL_CFG2, cfg);
- CSR_WRITE_1(sc, RL_EECMD, 0);
- }
-
/* Allocate interrupt */
if (sc->rl_msi == 0) {
rid = 0;