aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2019-02-13 00:10:12 +0000
committerWarner Losh <imp@FreeBSD.org>2019-02-13 00:10:12 +0000
commita73b2e25e1e2b69fb172fbb391e5bd1c3878e881 (patch)
tree597458114ed92ee811108e692b48dca00727c2be /sys/cam
parent37e3a57cc1e406d187c5203ffbac30ee18563646 (diff)
downloadsrc-a73b2e25e1e2b69fb172fbb391e5bd1c3878e881.tar.gz
src-a73b2e25e1e2b69fb172fbb391e5bd1c3878e881.zip
Fix panic message.
The panic message lead people to believe some userland CAM request had caused a problem when in reallity it was for a kernel request (eg the USER bit was cleared). Reword message. Also, improve a couple of comments to reflect that the periph shouldn't be completely torn down before we get here (so the path and sim pointers should be valid, but aren't and the code is designed to be robust enough in the face of that to give a specific panic message).
Notes
Notes: svn path=/head/; revision=344070
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam_xpt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 0679ca9cea49..2217ecc6d2ff 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -5411,8 +5411,9 @@ xpt_done_process(struct ccb_hdr *ccb_h)
}
/*
- * Insulate against a race where the periph is destroyed
- * but CCBs are still not all processed.
+ * Insulate against a race where the periph is destroyed but CCBs are
+ * still not all processed. This shouldn't happen, but allows us better
+ * bug diagnostic when it does.
*/
if (ccb_h->path->bus)
sim = ccb_h->path->bus->sim;
@@ -5434,7 +5435,7 @@ xpt_done_process(struct ccb_hdr *ccb_h)
if (sim)
devq = sim->devq;
- KASSERT(devq, ("sim missing for XPT_FC_USER_CCB request"));
+ KASSERT(devq, ("Periph disappeared with request pending."));
mtx_lock(&devq->send_mtx);
devq->send_active--;