Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi If we get a Unit Attention Not Ready To Ready...



details:   https://anonhg.NetBSD.org/src/rev/ed02b695a113
branches:  trunk
changeset: 526298:ed02b695a113
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu May 02 12:36:23 2002 +0000

description:
If we get a Unit Attention Not Ready To Ready Transition (medium may have
changed) sense, and the periph was not open, then ignore the error.

diffstat:

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

diffs (34 lines):

diff -r b386d7b15bbb -r ed02b695a113 sys/dev/scsipi/st.c
--- a/sys/dev/scsipi/st.c       Tue Apr 30 16:05:13 2002 +0000
+++ b/sys/dev/scsipi/st.c       Thu May 02 12:36:23 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: st.c,v 1.152 2002/03/22 21:39:36 mjacob Exp $ */
+/*     $NetBSD: st.c,v 1.153 2002/05/02 12:36:23 bouyer Exp $ */
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.152 2002/03/22 21:39:36 mjacob Exp $");
+__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.153 2002/05/02 12:36:23 bouyer Exp $");
 
 #include "opt_scsi.h"
 
@@ -2099,9 +2099,14 @@
        }
 
        /*
-        * If the device is not open yet, let generic handle
+        * If the device is not open yet, a Not Ready To Ready Transition
+        * is acceptable. Let generic code handle other ASC/ASQ.
         */
        if ((periph->periph_flags & PERIPH_OPEN) == 0) {
+               if (key == SKEY_UNIT_ATTENTION &&
+                   st->asc == 0x28 && st->ascq == 0x0) {
+                       return (0);
+               }
                return (retval);
        }
 



Home | Main Index | Thread Index | Old Index