Apply by doing: cd /usr/src patch -p0 < 006_scsi.patch Then build and install a new kernel. Index: sys/scsi/cd.c =================================================================== RCS file: /cvs/src/sys/scsi/cd.c,v retrieving revision 1.164 retrieving revision 1.164.2.1 diff -u -r1.164 -r1.164.2.1 --- sys/scsi/cd.c 28 Feb 2010 21:17:00 -0000 1.164 +++ sys/scsi/cd.c 6 Jul 2010 08:48:50 -0000 1.164.2.1 @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.164 2010/02/28 21:17:00 krw Exp $ */ +/* $OpenBSD: cd.c,v 1.164.2.1 2010/07/06 08:48:50 stephan Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -683,6 +683,7 @@ { struct cd_softc *sc = xs->sc_link->device_softc; struct buf *bp = xs->cookie; + int error; splassert(IPL_BIO); @@ -704,7 +705,13 @@ case XS_SENSE: case XS_SHORTSENSE: - if (scsi_interpret_sense(xs) != ERESTART) + error = scsi_interpret_sense(xs); + if (error == 0) { + bp->b_error = 0; + bp->b_resid = xs->resid; + break; + } + if (error != ERESTART) xs->retries = 0; goto retry; Index: sys/scsi/sd.c =================================================================== RCS file: /cvs/src/sys/scsi/sd.c,v retrieving revision 1.182 retrieving revision 1.182.2.1 diff -u -r1.182 -r1.182.2.1 --- sys/scsi/sd.c 15 Jan 2010 05:50:31 -0000 1.182 +++ sys/scsi/sd.c 6 Jul 2010 08:48:50 -0000 1.182.2.1 @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.182 2010/01/15 05:50:31 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.182.2.1 2010/07/06 08:48:50 stephan Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -755,6 +755,7 @@ { struct sd_softc *sc = xs->sc_link->device_softc; struct buf *bp = xs->cookie; + int error; splassert(IPL_BIO); @@ -776,7 +777,13 @@ case XS_SENSE: case XS_SHORTSENSE: - if (scsi_interpret_sense(xs) != ERESTART) + error = scsi_interpret_sense(xs); + if (error == 0) { + bp->b_error = 0; + bp->b_resid = xs->resid; + break; + } + if (error != ERESTART) xs->retries = 0; goto retry; Index: sys/scsi/st.c =================================================================== RCS file: /cvs/src/sys/scsi/st.c,v retrieving revision 1.93 retrieving revision 1.93.2.1 diff -u -r1.93 -r1.93.2.1 --- sys/scsi/st.c 15 Jan 2010 05:50:31 -0000 1.93 +++ sys/scsi/st.c 6 Jul 2010 08:48:50 -0000 1.93.2.1 @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.93 2010/01/15 05:50:31 krw Exp $ */ +/* $OpenBSD: st.c,v 1.93.2.1 2010/07/06 08:48:50 stephan Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -1088,6 +1088,7 @@ { struct st_softc *st = xs->sc_link->device_softc; struct buf *bp = xs->cookie; + int error; splassert(IPL_BIO); @@ -1107,7 +1108,13 @@ case XS_SENSE: case XS_SHORTSENSE: - if (scsi_interpret_sense(xs) != ERESTART) + error = scsi_interpret_sense(xs); + if (error == 0) { + bp->b_error = 0; + bp->b_resid = xs->resid; + break; + } + if (error != ERESTART) xs->retries = 0; goto retry;