summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2010-09-24 16:40:46 +0000
committermarius <marius@FreeBSD.org>2010-09-24 16:40:46 +0000
commit76367218c7302b13875f076fb3608a8cb82935ca (patch)
treeff42d67005b464b0bdfcb2c7035c4a3c754e5f3b
parentaed96e11cd49b2b0762b3960aec611113d556f0f (diff)
downloadFreeBSD-src-76367218c7302b13875f076fb3608a8cb82935ca.zip
FreeBSD-src-76367218c7302b13875f076fb3608a8cb82935ca.tar.gz
Improve r56796; the reply handler actually may remove the request from
the chain in which case it shouldn't be removed twice. Reported by: Staale Kristoffersen MFC after: 1 week
-rw-r--r--sys/dev/mpt/mpt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/mpt/mpt.c b/sys/dev/mpt/mpt.c
index 75fa564..1ca4ef9 100644
--- a/sys/dev/mpt/mpt.c
+++ b/sys/dev/mpt/mpt.c
@@ -844,13 +844,14 @@ mpt_complete_request_chain(struct mpt_softc *mpt, struct req_queue *chain,
MSG_REQUEST_HEADER *msg_hdr;
u_int cb_index;
- TAILQ_REMOVE(chain, req, links);
msg_hdr = (MSG_REQUEST_HEADER *)req->req_vbuf;
ioc_status_frame.Function = msg_hdr->Function;
ioc_status_frame.MsgContext = msg_hdr->MsgContext;
cb_index = MPT_CONTEXT_TO_CBI(le32toh(msg_hdr->MsgContext));
mpt_reply_handlers[cb_index](mpt, req, msg_hdr->MsgContext,
&ioc_status_frame);
+ if (mpt_req_on_pending_list(mpt, req) != 0)
+ TAILQ_REMOVE(chain, req, links);
}
}
OpenPOWER on IntegriCloud