Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi Don't attempt to read opcodes and their timeo...
details: https://anonhg.NetBSD.org/src/rev/07248bd4993b
branches: trunk
changeset: 971712:07248bd4993b
user: jdc <jdc%NetBSD.org@localhost>
date: Sat May 02 06:45:53 2020 +0000
description:
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.
diffstat:
sys/dev/scsipi/scsiconf.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r 916b3cb8004f -r 07248bd4993b sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Sat May 02 00:50:07 2020 +0000
+++ b/sys/dev/scsipi/scsiconf.c Sat May 02 06:45:53 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.286 2020/02/19 16:04:39 riastradh Exp $ */
+/* $NetBSD: scsiconf.c,v 1.287 2020/05/02 06:45:53 jdc 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.286 2020/02/19 16:04:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.287 2020/05/02 06:45:53 jdc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1018,10 +1018,14 @@
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
Home |
Main Index |
Thread Index |
Old Index