summaryrefslogtreecommitdiff
path: root/sys/dev/mpt
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2006-11-19 23:15:42 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2006-11-19 23:15:42 +0000
commit804625ee9c51a217a7c4b035f01be376550a12d2 (patch)
tree433c2366a429c27234cce6dca0edbbf0b0164572 /sys/dev/mpt
parent21167708e8bf812596076a476a9ebe0ce24a3ed3 (diff)
Notes
Diffstat (limited to 'sys/dev/mpt')
-rw-r--r--sys/dev/mpt/mpt.h3
-rw-r--r--sys/dev/mpt/mpt_pci.c16
2 files changed, 15 insertions, 4 deletions
diff --git a/sys/dev/mpt/mpt.h b/sys/dev/mpt/mpt.h
index b347a0b19d30..4671521f1285 100644
--- a/sys/dev/mpt/mpt.h
+++ b/sys/dev/mpt/mpt.h
@@ -496,7 +496,8 @@ struct mpt_softc {
uint32_t mpt_pers_mask;
uint32_t
unit : 8,
- : 3,
+ : 2,
+ msi_enable : 1,
twildcard : 1,
tenabled : 1,
do_cfg_role : 1,
diff --git a/sys/dev/mpt/mpt_pci.c b/sys/dev/mpt/mpt_pci.c
index 03b267a89cc8..58532f4f05c7 100644
--- a/sys/dev/mpt/mpt_pci.c
+++ b/sys/dev/mpt/mpt_pci.c
@@ -326,6 +326,8 @@ mpt_set_options(struct mpt_softc *mpt)
}
mpt->do_cfg_role = 1;
}
+
+ mpt->msi_enable = 0;
}
#else
static void
@@ -350,6 +352,13 @@ mpt_set_options(struct mpt_softc *mpt)
mpt->cfg_role = tval;
mpt->do_cfg_role = 1;
}
+
+ tval = 0;
+ mpt->msi_enable = 1;
+ if (resource_int_value(device_get_name(mpt->dev),
+ device_get_unit(mpt->dev), "msi_enable", &tval) == 0 && tval == 1) {
+ mpt->msi_enable = 1;
+ }
}
#endif
@@ -512,12 +521,13 @@ mpt_pci_attach(device_t dev)
/* Get a handle to the interrupt */
iqd = 0;
- if (pci_msi_count(dev) == 1) {
+ if (mpt->msi_enable && pci_msi_count(dev) == 1) {
mpt->pci_msi_count = 1;
- if (pci_alloc_msi(dev, &mpt->pci_msi_count) == 0)
+ if (pci_alloc_msi(dev, &mpt->pci_msi_count) == 0) {
iqd = 1;
- else
+ } else {
mpt->pci_msi_count = 0;
+ }
}
mpt->pci_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &iqd,
RF_ACTIVE | RF_SHAREABLE);