summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-07-15 17:17:52 +0000
committermav <mav@FreeBSD.org>2014-07-15 17:17:52 +0000
commit05919e7e4cffea5cd8c10e7f2ed425b974e1d095 (patch)
treeb3edb599eb059cb52ff9112f6ecfaabb3c8d3747
parent870d4a24fe84abd8c5b7f7e1bd7d3f127889ae6e (diff)
downloadFreeBSD-src-05919e7e4cffea5cd8c10e7f2ed425b974e1d095.zip
FreeBSD-src-05919e7e4cffea5cd8c10e7f2ed425b974e1d095.tar.gz
MFC r268387:
Fix task management functions status: task not found is not an error, while not implemented function is.
-rw-r--r--sys/cam/ctl/ctl.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 55138b6..b99cef1 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -11946,7 +11946,7 @@ ctl_abort_task(union ctl_io *io)
lun = ctl_softc->ctl_luns[targ_lun];
else {
mtx_unlock(&ctl_softc->ctl_lock);
- goto bailout;
+ return (1);
}
#if 0
@@ -12049,8 +12049,6 @@ ctl_abort_task(union ctl_io *io)
}
mtx_unlock(&lun->lun_lock);
-bailout:
-
if (found == 0) {
/*
* This isn't really an error. It's entirely possible for
@@ -12066,23 +12064,19 @@ bailout:
io->io_hdr.nexus.targ_lun, io->taskio.tag_num,
io->taskio.tag_type);
#endif
- return (1);
- } else
- return (0);
+ }
+ return (0);
}
static void
ctl_run_task(union ctl_io *io)
{
- struct ctl_softc *ctl_softc;
- int retval;
+ struct ctl_softc *ctl_softc = control_softc;
+ int retval = 1;
const char *task_desc;
CTL_DEBUG_PRINT(("ctl_run_task\n"));
- ctl_softc = control_softc;
- retval = 0;
-
KASSERT(io->io_hdr.io_type == CTL_IO_TASK,
("ctl_run_task: Unextected io_type %d\n",
io->io_hdr.io_type));
@@ -12131,7 +12125,6 @@ ctl_run_task(union ctl_io *io)
case CTL_TASK_LUN_RESET: {
struct ctl_lun *lun;
uint32_t targ_lun;
- int retval;
targ_lun = io->io_hdr.nexus.targ_mapped_lun;
mtx_lock(&ctl_softc->ctl_lock);
@@ -12188,12 +12181,6 @@ ctl_run_task(union ctl_io *io)
io->io_hdr.status = CTL_SUCCESS;
else
io->io_hdr.status = CTL_ERROR;
-
- /*
- * This will queue this I/O to the done queue, but the
- * work thread won't be able to process it until we
- * return and the lock is released.
- */
ctl_done(io);
}
OpenPOWER on IntegriCloud