Module Name: src
Committed By: martin
Date: Mon May 4 13:50:07 UTC 2020
Modified Files:
src/sys/dev/scsipi [netbsd-9]: scsiconf.c
Log Message:
Pull up following revision(s) (requested by jdc in ticket #885):
sys/dev/scsipi/scsiconf.c: revision 1.287
Don't attempt to read opcodes and their timeouts at attach time for
old devices. The MAINTENANCE IN command was introduced with SCSI-3
and sending it to older peripherals can cause timeouts or them not
to respond to further requests.
To generate a diff of this commit:
cvs rdiff -u -r1.284 -r1.284.4.1 src/sys/dev/scsipi/scsiconf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/scsipi/scsiconf.c
diff -u src/sys/dev/scsipi/scsiconf.c:1.284 src/sys/dev/scsipi/scsiconf.c:1.284.4.1
--- src/sys/dev/scsipi/scsiconf.c:1.284 Thu Mar 28 10:44:29 2019
+++ src/sys/dev/scsipi/scsiconf.c Mon May 4 13:50:07 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.284 2019/03/28 10:44:29 kardel Exp $ */
+/* $NetBSD: scsiconf.c,v 1.284.4.1 2020/05/04 13:50:07 martin Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.284 2019/03/28 10:44:29 kardel Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.284.4.1 2020/05/04 13:50:07 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1022,10 +1022,14 @@ scsi_probe_device(struct scsibus_softc *
scsipi_insert_periph(chan, periph);
/*
- * determine supported opcodes and
- * timeouts if available
+ * Determine supported opcodes and timeouts if available.
+ * Only do this on peripherals reporting SCSI version 3
+ * or greater - this command isn't in the SCSI-2 spec. and
+ * it causes either timeouts or peripherals disappearing
+ * when sent to some SCSI-1 or SCSI-2 peripherals.
*/
- scsipi_get_opcodeinfo(periph);
+ if (periph->periph_version >= 3)
+ scsipi_get_opcodeinfo(periph);
/*
* XXX Can't assign periph_dev here, because we'll