summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2015-12-07 04:14:29 +0000
committerimp <imp@FreeBSD.org>2015-12-07 04:14:29 +0000
commit638e3ce71c4d4aa007fa9df03ba1e47dce3e2f70 (patch)
treee21803a18b92c35c8fd2f9e7f4b824da2db6bde3 /sys/cam
parent2e48022141771f570b6289c27280fab6ab94ae52 (diff)
downloadFreeBSD-src-638e3ce71c4d4aa007fa9df03ba1e47dce3e2f70.zip
FreeBSD-src-638e3ce71c4d4aa007fa9df03ba1e47dce3e2f70.tar.gz
Improve cam tracing a little by including the function code in the
traces for xpt_action. Note up-calls (down-calls?) to the SIM as well. Differential Review: https://reviews.freebsd.org/D4382
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam_xpt.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 89736f2..c2dd6a5 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -2450,7 +2450,8 @@ void
xpt_action(union ccb *start_ccb)
{
- CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_action\n"));
+ CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE,
+ ("xpt_action: func=%#x\n", start_ccb->ccb_h.func_code));
start_ccb->ccb_h.status = CAM_REQ_INPROG;
(*(start_ccb->ccb_h.path->bus->xport->action))(start_ccb);
@@ -2464,7 +2465,8 @@ xpt_action_default(union ccb *start_ccb)
int lock;
path = start_ccb->ccb_h.path;
- CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_action_default\n"));
+ CAM_DEBUG(path, CAM_DEBUG_TRACE,
+ ("xpt_action_default: func=%#x\n", start_ccb->ccb_h.func_code));
switch (start_ccb->ccb_h.func_code) {
case XPT_SCSI_IO:
@@ -2618,7 +2620,11 @@ call_sim:
lock = (mtx_owned(sim->mtx) == 0);
if (lock)
CAM_SIM_LOCK(sim);
+ CAM_DEBUG(path, CAM_DEBUG_TRACE,
+ ("sim->sim_action: func=%#x\n", start_ccb->ccb_h.func_code));
(*(sim->sim_action))(sim, start_ccb);
+ CAM_DEBUG(path, CAM_DEBUG_TRACE,
+ ("sim->sim_action: status=%#x\n", start_ccb->ccb_h.status));
if (lock)
CAM_SIM_UNLOCK(sim);
break;
OpenPOWER on IntegriCloud