aboutsummaryrefslogtreecommitdiff
path: root/share/examples/scsi_target
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2003-01-16 00:24:29 +0000
committerNate Lawson <njl@FreeBSD.org>2003-01-16 00:24:29 +0000
commit031bacf85956364ca3c752a44e198380aeae908c (patch)
tree348332012790bc682f84344efc77eaef7fd9782d /share/examples/scsi_target
parent18bf5d2ba68316d51ff1c558f485b34290e8647a (diff)
kernel:
* Fix a bug where devices weren't cleaned up on close(): CAM_REQ_CMP != 0 user: * Increase timeout in usermode to CAM_TIME_INFINITY. The initiator is in charge of timeouts and the value was in ms, not seconds. * Bring two debugging printfs under the debug flag * Clean up man page to show increased testing on isp(4) Submitted by: gibbs (bugfixes)
Notes
Notes: svn path=/head/; revision=109345
Diffstat (limited to 'share/examples/scsi_target')
-rw-r--r--share/examples/scsi_target/scsi_cmds.c6
-rw-r--r--share/examples/scsi_target/scsi_target.c7
2 files changed, 9 insertions, 4 deletions
diff --git a/share/examples/scsi_target/scsi_cmds.c b/share/examples/scsi_target/scsi_cmds.c
index d624cfb6b1cb..1cbe6d8f0c09 100644
--- a/share/examples/scsi_target/scsi_cmds.c
+++ b/share/examples/scsi_target/scsi_cmds.c
@@ -125,8 +125,10 @@ tcmd_handle(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio, io_ops event)
struct atio_descr *a_descr;
int ret;
- warnx("tcmd_handle atio %p ctio %p atioflags %#x", atio, ctio,
- atio->ccb_h.flags);
+ if (debug) {
+ warnx("tcmd_handle atio %p ctio %p atioflags %#x", atio, ctio,
+ atio->ccb_h.flags);
+ }
ret = 0;
a_descr = (struct atio_descr *)atio->ccb_h.targ_descr;
diff --git a/share/examples/scsi_target/scsi_target.c b/share/examples/scsi_target/scsi_target.c
index 0f0d6b8ae28b..09f6610b6fde 100644
--- a/share/examples/scsi_target/scsi_target.c
+++ b/share/examples/scsi_target/scsi_target.c
@@ -453,7 +453,10 @@ request_loop()
/* Assume work function handled the exception */
if ((ccb_h->status & CAM_DEV_QFRZN) != 0) {
- warnx("Queue frozen receiving CCB, releasing");
+ if (debug) {
+ warnx("Queue frozen receiving CCB, "
+ "releasing");
+ }
rel_simq();
}
@@ -819,7 +822,7 @@ get_ctio()
/* Initialize CTIO, CTIO descr, and AIO */
ctio->ccb_h.func_code = XPT_CONT_TARGET_IO;
ctio->ccb_h.retry_count = 2;
- ctio->ccb_h.timeout = 5;
+ ctio->ccb_h.timeout = CAM_TIME_INFINITY;
ctio->data_ptr = c_descr->buf;
ctio->ccb_h.targ_descr = c_descr;
c_descr->aiocb.aio_buf = c_descr->buf;