From: krw Date: Tue, 9 Aug 2016 15:04:34 +0000 (+0000) Subject: Check xs->status for SCSI_CHECK even in underrun situations. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d634ee0c368470ecc82178dafcab8096db032f79;p=openbsd 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@ --- 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;