summaryrefslogtreecommitdiffstats
path: root/sys/dev/mpt/mpt_pci.c
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2006-04-01 07:12:18 +0000
committermjacob <mjacob@FreeBSD.org>2006-04-01 07:12:18 +0000
commit75222e0f6749f6b8072373aa91d852c4b51e1dec (patch)
tree6706b6576b350f0087bb9df12d2de085f7a02af3 /sys/dev/mpt/mpt_pci.c
parent4769ea007ef1e21c7b55a6f6863048b973252290 (diff)
downloadFreeBSD-src-75222e0f6749f6b8072373aa91d852c4b51e1dec.zip
FreeBSD-src-75222e0f6749f6b8072373aa91d852c4b51e1dec.tar.gz
Fix some of the previus changes 'better'.
There's something strange going on with async events. They seem to be be treated differently for different Fusion implementations. Some will really tell you when it's okay to free the request that started them. Some won't. Very disconcerting. This is particularily bad when the chip (FC in this case) tells you in the reply that it's not a continuation reply, which means you can free the request that its associated with. However, if you do that, I've found that additional async event replies come back for that message context after you freed it. Very Bad Things Happen. Put in a reply register debounce. Warn about out of range context indices. Use more MPILIB defines where possible. Replace bzero with memset. Add tons more KASSERTS. Do a *lot* more request free list auditting and serial number usages. Get rid of the warning about the short IOC Facts Reply. Go back to 16 bits of context index. Do a lot more target state auditting as well. Make a tag out of not only the ioindex but the request index as well and worry less about keeping a full serial number.
Diffstat (limited to 'sys/dev/mpt/mpt_pci.c')
-rw-r--r--sys/dev/mpt/mpt_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mpt/mpt_pci.c b/sys/dev/mpt/mpt_pci.c
index e29b421..9be1bc5 100644
--- a/sys/dev/mpt/mpt_pci.c
+++ b/sys/dev/mpt/mpt_pci.c
@@ -350,7 +350,7 @@ mpt_pci_attach(device_t dev)
device_printf(dev, "cannot allocate softc\n");
return (ENOMEM);
}
- bzero(mpt, sizeof(struct mpt_softc));
+ memset(mpt, 0, sizeof(struct mpt_softc));
switch ((pci_get_device(dev) & ~1)) {
case PCI_PRODUCT_LSI_FC909:
case PCI_PRODUCT_LSI_FC909A:
@@ -663,7 +663,7 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt)
device_printf(dev, "cannot allocate request pool\n");
return (1);
}
- bzero(mpt->request_pool, len);
+ memset(mpt->request_pool, 0, len);
#else
mpt->request_pool = (request_t *)malloc(len, M_DEVBUF, M_WAITOK|M_ZERO);
if (mpt->request_pool == NULL) {
OpenPOWER on IntegriCloud