Source-Changes-HG archive

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

[src/netbsd-2-0]: src/sys/dev/scsipi Pullup rev 1.105 (requested by bouyer in...



details:   https://anonhg.NetBSD.org/src/rev/4a5569df2fa4
branches:  netbsd-2-0
changeset: 560642:4a5569df2fa4
user:      jmc <jmc%NetBSD.org@localhost>
date:      Thu Apr 29 04:24:41 2004 +0000

description:
Pullup rev 1.105 (requested by bouyer in ticket #214)

Revert part of 1.102:
Don't decrease/check xs_retries when the device report "Power On, Reset, or
Bus Device Reset" sense condition, just retry the command. The initial bus
reset would cause the first TEST_UNIT_READY to report this condition,
and as xs_retries is set to 0 when XS_CTL_DISCOVERY is set, it would report an
error instead of being retried, causing the disk probe to report "drive
offline" instead of the geometry and capacity. Checking/decreasing
xs_retries on the bus reset reported by the adapter is enouth to avoid the
problem reported by rev 1.102.

diffstat:

 sys/dev/scsipi/scsipi_base.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (32 lines):

diff -r d7a72e380938 -r 4a5569df2fa4 sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c      Thu Apr 29 04:22:49 2004 +0000
+++ b/sys/dev/scsipi/scsipi_base.c      Thu Apr 29 04:24:41 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_base.c,v 1.104 2004/03/16 19:10:43 bouyer Exp $ */
+/*     $NetBSD: scsipi_base.c,v 1.104.2.1 2004/04/29 04:24:41 jmc Exp $        */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.104 2004/03/16 19:10:43 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.104.2.1 2004/04/29 04:24:41 jmc Exp $");
 
 #include "opt_scsi.h"
 
@@ -938,12 +938,7 @@
                        if (sense->add_sense_code == 0x29 &&
                            sense->add_sense_code_qual == 0x00) {
                                /* device or bus reset */
-                               if (xs->xs_retries != 0) {
-                                       xs->xs_retries--;
-                                       error = ERESTART;
-                               } else
-                                       error = EIO;
-                               return (error);
+                               return (ERESTART);
                        }
                        if ((periph->periph_flags & PERIPH_REMOVABLE) != 0)
                                periph->periph_flags &= ~PERIPH_MEDIA_LOADED;



Home | Main Index | Thread Index | Old Index