summaryrefslogtreecommitdiffstats
path: root/sys/dev/mpt
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2002-09-23 05:16:00 +0000
committermjacob <mjacob@FreeBSD.org>2002-09-23 05:16:00 +0000
commit8d27c78b066d6ca383196e414c2ce7657b9e6095 (patch)
tree94aad873185c908f531ab2afaf3516f3393bb388 /sys/dev/mpt
parent8a5d5158acc37da349e07d32e4d55bd817979be6 (diff)
downloadFreeBSD-src-8d27c78b066d6ca383196e414c2ce7657b9e6095.zip
FreeBSD-src-8d27c78b066d6ca383196e414c2ce7657b9e6095.tar.gz
Recognize the single channel 2Gb card (FC919)- thanks to LSI Logic for
pointing this out. In mpt_intr, don't try and pop a reply queue element out *unless* the interrupt status says you might have one. MFC after: 1 week
Diffstat (limited to 'sys/dev/mpt')
-rw-r--r--sys/dev/mpt/mpt_pci.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/mpt/mpt_pci.c b/sys/dev/mpt/mpt_pci.c
index 3c356e2..d9e3ab6 100644
--- a/sys/dev/mpt/mpt_pci.c
+++ b/sys/dev/mpt/mpt_pci.c
@@ -61,6 +61,10 @@
#define PCI_PRODUCT_LSI_FC909A 0x0621
#endif
+#ifndef PCI_PRODUCT_LSI_FC919
+#define PCI_PRODUCT_LSI_FC919 0x0624
+#endif
+
#ifndef PCI_PRODUCT_LSI_FC929
#define PCI_PRODUCT_LSI_FC929 0x0622
#endif
@@ -107,11 +111,15 @@ MODULE_VERSION(mpt, 1);
int
mpt_intr(void *dummy)
{
+ int nrepl = 0;
u_int32_t reply;
mpt_softc_t *mpt = (mpt_softc_t *)dummy;
+ if ((mpt_read(mpt, MPT_OFFSET_INTR_STATUS) & MPT_INTR_REPLY_READY) == 0)
+ return (0);
reply = mpt_pop_reply_queue(mpt);
while (reply != MPT_REPLY_EMPTY) {
+ nrepl++;
if (mpt->verbose > 1) {
if ((reply & MPT_CONTEXT_REPLY) != 0) {
/* Address reply; IOC has something to say */
@@ -125,7 +133,7 @@ mpt_intr(void *dummy)
mpt_done(mpt, reply);
reply = mpt_pop_reply_queue(mpt);
}
- return 0;
+ return (nrepl != 0);
}
static int
@@ -143,6 +151,9 @@ mpt_probe(device_t dev)
case PCI_PRODUCT_LSI_FC909A:
desc = "LSILogic FC909A FC Adapter";
break;
+ case PCI_PRODUCT_LSI_FC919:
+ desc = "LSILogic FC919 FC Adapter";
+ break;
case PCI_PRODUCT_LSI_FC929:
desc = "LSILogic FC929 FC Adapter";
break;
@@ -247,6 +258,7 @@ mpt_attach(device_t dev)
switch ((pci_get_device(dev) & ~1)) {
case PCI_PRODUCT_LSI_FC909:
case PCI_PRODUCT_LSI_FC909A:
+ case PCI_PRODUCT_LSI_FC919:
case PCI_PRODUCT_LSI_FC929:
mpt->is_fc = 1;
break;
@@ -675,6 +687,6 @@ mpt_pci_intr(void *arg)
{
mpt_softc_t *mpt = arg;
MPT_LOCK(mpt);
- mpt_intr(mpt);
+ (void) mpt_intr(mpt);
MPT_UNLOCK(mpt);
}
OpenPOWER on IntegriCloud