summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2016-08-09 15:04:35 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2016-08-09 15:04:35 +0000
commitcc4351733ea0d248fb82dc73129e8be6f138a9c7 (patch)
tree99e7c89fd4411e5c0ec29d5fc0823f0f15315906 /sys/dev
parent1713a850b96ea390b2f50a3fc47fda459348ab6a (diff)
Check xs->status for SCSI_CHECK even in underrun situations.
Lets Bacula find the end of medium on LTO5 drive. Reported & fix tested by Kor son of Rynar. ok mikeb@ deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/mpii.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index f0b2e200e60..b6d010dfe88 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.102 2016/03/07 18:43:59 naddy Exp $ */
+/* $OpenBSD: mpii.c,v 1.103 2016/08/09 15:04:34 krw Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
@@ -2926,6 +2926,11 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb)
xs->resid = xs->datalen -
lemtoh32(&sie->transfer_count);
break;
+
+ case SCSI_CHECK:
+ xs->error = XS_SENSE;
+ break;
+
default:
xs->error = XS_DRIVER_STUFFUP;
break;