Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/dev/scsipi Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/675a74081c65
branches:  netbsd-9
changeset: 932293:675a74081c65
user:      martin <martin%NetBSD.org@localhost>
date:      Mon May 04 13:50:07 2020 +0000

description:
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.

diffstat:

 sys/dev/scsipi/scsiconf.c |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 455085b6c45e -r 675a74081c65 sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Sat May 02 16:31:44 2020 +0000
+++ b/sys/dev/scsipi/scsiconf.c Mon May 04 13:50:07 2020 +0000
@@ -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 @@
                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