summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2010-10-04 20:13:19 +0000
committerMarius Strobl <marius@FreeBSD.org>2010-10-04 20:13:19 +0000
commit4cefac73e60aa301e177b702c97f9fa1523c166e (patch)
tree86c1e2566f2774b97bd4531c63029ea9f8570a5f
parentfd557403ee39645b5f5f43d2edc4b4ef0e4c7349 (diff)
Notes
-rw-r--r--sys/dev/mpt/mpt.c3
-rw-r--r--sys/dev/mpt/mpt.h14
2 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/mpt/mpt.c b/sys/dev/mpt/mpt.c
index 75fa564cd414..1ca4ef92cd05 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);
}
}
diff --git a/sys/dev/mpt/mpt.h b/sys/dev/mpt/mpt.h
index 9026142b9a1e..f095bbf73545 100644
--- a/sys/dev/mpt/mpt.h
+++ b/sys/dev/mpt/mpt.h
@@ -1157,19 +1157,13 @@ mpt_tag_2_req(struct mpt_softc *mpt, uint32_t tag)
KASSERT(mpt->tgt_cmd_ptrs[rtg], ("no cmd backpointer"));
return (mpt->tgt_cmd_ptrs[rtg]);
}
-
+#endif
static __inline int
mpt_req_on_free_list(struct mpt_softc *, request_t *);
static __inline int
mpt_req_on_pending_list(struct mpt_softc *, request_t *);
-static __inline void
-mpt_req_spcl(struct mpt_softc *, request_t *, const char *, int);
-static __inline void
-mpt_req_not_spcl(struct mpt_softc *, request_t *, const char *, int);
-
-
/*
* Is request on freelist?
*/
@@ -1202,6 +1196,12 @@ mpt_req_on_pending_list(struct mpt_softc *mpt, request_t *req)
return (0);
}
+#ifdef INVARIANTS
+static __inline void
+mpt_req_spcl(struct mpt_softc *, request_t *, const char *, int);
+static __inline void
+mpt_req_not_spcl(struct mpt_softc *, request_t *, const char *, int);
+
/*
* Make sure that req *is* part of one of the special lists
*/