aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2015-09-17 12:52:18 +0000
committerAlexander Motin <mav@FreeBSD.org>2015-09-17 12:52:18 +0000
commit7f7bb97a0f9b8d1726f2fb7db3895068f2e128ea (patch)
treefbc22d0a3a17dcfbcab46cbe367a3da6895e855f /sys/cam/ctl/ctl.c
parent5f3a15445d02d97e7ca0aa8101e9fa615ef93014 (diff)
downloadsrc-7f7bb97a0f9b8d1726f2fb7db3895068f2e128ea.tar.gz
src-7f7bb97a0f9b8d1726f2fb7db3895068f2e128ea.zip
Report proper medium error code for VERIFY commands.
Notes
Notes: svn path=/head/; revision=287912
Diffstat (limited to 'sys/cam/ctl/ctl.c')
-rw-r--r--sys/cam/ctl/ctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 20877065ccc0..4e6fcb7ef778 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -12046,7 +12046,9 @@ ctl_inject_error(struct ctl_lun *lun, union ctl_io *io)
ctl_set_aborted(&io->scsiio);
break;
case CTL_LUN_INJ_MEDIUM_ERR:
- ctl_set_medium_error(&io->scsiio);
+ ctl_set_medium_error(&io->scsiio,
+ (io->io_hdr.flags & CTL_FLAG_DATA_MASK) !=
+ CTL_FLAG_DATA_OUT);
break;
case CTL_LUN_INJ_UA:
/* 29h/00h POWER ON, RESET, OR BUS DEVICE RESET