diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2009-04-04 03:22:31 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2009-04-04 03:22:31 +0000 |
commit | 8c5a437e4dba334889cddf65721b00377faa5c6f (patch) | |
tree | ad2f77173764426fe2ed8038551f850b23ad855b /sys/dev/ic/mfi.c | |
parent | 05e4c6a74f1baa7ba4666e98f7324c1e6235021f (diff) |
scrub more fields in the ccb when returning them to the free list after
theyve been used, in particular the mfi header flags which has a bit
that specifies if a command should be completed via the interrupt path.
if we use a ccb during boot we set that bit, but it isnt necessarily
cleared by things that use it later on. this means a ccb we expected to
complete via an interrupt never actually generates an interrupt or appears
in the reply queue. this obviously stalls the io.
Diffstat (limited to 'sys/dev/ic/mfi.c')
-rw-r--r-- | sys/dev/ic/mfi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index 26dd7de8adb..7bacb830c9e 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.92 2009/03/29 15:03:17 marco Exp $ */ +/* $OpenBSD: mfi.c,v 1.93 2009/04/04 03:22:30 dlg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -171,11 +171,13 @@ void mfi_put_ccb(struct mfi_ccb *ccb) { struct mfi_softc *sc = ccb->ccb_sc; + struct mfi_frame_header *hdr = &ccb->ccb_frame->mfr_header; int s; DNPRINTF(MFI_D_CCB, "%s: mfi_put_ccb: %p\n", DEVNAME(sc), ccb); - s = splbio(); + hdr->mfh_cmd_status = 0x0; + hdr->mfh_flags = 0x0; ccb->ccb_state = MFI_CCB_FREE; ccb->ccb_xs = NULL; ccb->ccb_flags = 0; @@ -186,6 +188,8 @@ mfi_put_ccb(struct mfi_ccb *ccb) ccb->ccb_sgl = NULL; ccb->ccb_data = NULL; ccb->ccb_len = 0; + + s = splbio(); TAILQ_INSERT_TAIL(&sc->sc_ccb_freeq, ccb, ccb_link); splx(s); } |