Source-Changes-HG archive

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

[src/thorpej_scsipi]: src/sys/dev/scsipi Sync w/ trunk.



details:   https://anonhg.NetBSD.org/src/rev/9e1235d99580
branches:  thorpej_scsipi
changeset: 477299:9e1235d99580
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Oct 20 22:42:56 1999 +0000

description:
Sync w/ trunk.

diffstat:

 sys/dev/scsipi/atapiconf.h   |   3 ++-
 sys/dev/scsipi/scsi_base.c   |  21 +++++++++++++++++++--
 sys/dev/scsipi/scsiconf.h    |   3 ++-
 sys/dev/scsipi/scsipi_base.c |  14 +++++++-------
 sys/dev/scsipi/scsipiconf.h  |   3 ++-
 5 files changed, 32 insertions(+), 12 deletions(-)

diffs (123 lines):

diff -r 40fede561cc3 -r 9e1235d99580 sys/dev/scsipi/atapiconf.h
--- a/sys/dev/scsipi/atapiconf.h        Wed Oct 20 22:42:04 1999 +0000
+++ b/sys/dev/scsipi/atapiconf.h        Wed Oct 20 22:42:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atapiconf.h,v 1.7.12.1 1999/10/19 17:39:27 thorpej Exp $       */
+/*     $NetBSD: atapiconf.h,v 1.7.12.2 1999/10/20 22:42:56 thorpej Exp $       */
 
 /*
  * Copyright (c) 1996 Manuel Bouyer.  All rights reserved.
@@ -53,3 +53,4 @@
            struct atapi_mode_header *, int, int, int, int));
 int    atapi_mode_sense __P((struct scsipi_periph *, int,
            struct atapi_mode_header *, int, int, int, int));
+void   atapi_kill_pending __P((struct scsipi_periph *));
diff -r 40fede561cc3 -r 9e1235d99580 sys/dev/scsipi/scsi_base.c
--- a/sys/dev/scsipi/scsi_base.c        Wed Oct 20 22:42:04 1999 +0000
+++ b/sys/dev/scsipi/scsi_base.c        Wed Oct 20 22:42:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsi_base.c,v 1.69.2.1 1999/10/19 17:39:32 thorpej Exp $       */
+/*     $NetBSD: scsi_base.c,v 1.69.2.2 1999/10/20 22:46:17 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -132,7 +132,7 @@
  */
 
 /*
- * Print out the scsi_link structure's address info.
+ * Print out the periph's address info.
  */
 void
 scsi_print_addr(periph)
@@ -147,3 +147,20 @@
            chan->chan_channel, periph->periph_target,
            periph->periph_lun);
 }
+
+/*
+ * Kill off all pending xfers for a periph.
+ *
+ * Must be called at splbio().
+ */
+void
+scsi_kill_pending(periph)
+       struct scsipi_periph *periph;
+{
+       struct scsipi_xfer *xs;
+
+       while ((xs = TAILQ_FIRST(&periph->periph_xferq)) != NULL) {
+               xs->error = XS_DRIVER_STUFFUP;
+               scsipi_done(xs);
+       }
+}
diff -r 40fede561cc3 -r 9e1235d99580 sys/dev/scsipi/scsiconf.h
--- a/sys/dev/scsipi/scsiconf.h Wed Oct 20 22:42:04 1999 +0000
+++ b/sys/dev/scsipi/scsiconf.h Wed Oct 20 22:42:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.h,v 1.47.10.1 1999/10/19 17:39:34 thorpej Exp $       */
+/*     $NetBSD: scsiconf.h,v 1.47.10.2 1999/10/20 22:47:21 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -70,6 +70,7 @@
 extern const struct scsipi_bustype scsi_bustype;
 
 int    scsi_change_def __P((struct scsipi_periph *, int));
+void   scsi_kill_pending __P((struct scsipi_periph *));
 void   scsi_print_addr __P((struct scsipi_periph *));
 int    scsi_probe_bus __P((struct scsibus_softc *, int, int));
 int    scsi_scsipi_cmd __P((struct scsipi_periph *, struct scsipi_generic *,
diff -r 40fede561cc3 -r 9e1235d99580 sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c      Wed Oct 20 22:42:04 1999 +0000
+++ b/sys/dev/scsipi/scsipi_base.c      Wed Oct 20 22:42:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_base.c,v 1.26.2.3 1999/10/20 20:38:14 thorpej Exp $     */
+/*     $NetBSD: scsipi_base.c,v 1.26.2.4 1999/10/20 22:50:47 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -582,12 +582,12 @@
 scsipi_kill_pending(periph)
        struct scsipi_periph *periph;
 {
-       struct scsipi_xfer *xs;
 
-       while ((xs = TAILQ_FIRST(&periph->periph_xferq)) != NULL) {
-               xs->error = XS_DRIVER_STUFFUP;
-               scsipi_done(xs);
-       }
+       (*periph->periph_channel->chan_bustype->bustype_kill_pending)(periph);
+#ifdef DIAGNOSTIC
+       if (TAILQ_FIRST(&periph->periph_xferq) != NULL)
+               panic("scsipi_kill_pending");
+#endif
 }
 
 /*
@@ -938,7 +938,7 @@
 
        return (scsipi_command(periph,
            (struct scsipi_generic *) &scsipi_cmd, sizeof(scsipi_cmd),
-           0, 0, 2, (type & SSS_START) ? 30000 : 10000, NULL, flags));
+           0, 0, 2, (type & SSS_START) ? 60000 : 10000, NULL, flags));
 }
 
 /*
diff -r 40fede561cc3 -r 9e1235d99580 sys/dev/scsipi/scsipiconf.h
--- a/sys/dev/scsipi/scsipiconf.h       Wed Oct 20 22:42:04 1999 +0000
+++ b/sys/dev/scsipi/scsipiconf.h       Wed Oct 20 22:42:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipiconf.h,v 1.32.2.3 1999/10/20 20:38:15 thorpej Exp $      */
+/*     $NetBSD: scsipiconf.h,v 1.32.2.4 1999/10/20 22:52:18 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -229,6 +229,7 @@
                    int, struct buf *, int));
        int     (*bustype_interpret_sense) __P((struct scsipi_xfer *));
        void    (*bustype_printaddr) __P((struct scsipi_periph *));
+       void    (*bustype_kill_pending) __P((struct scsipi_periph *));
 };
 
 /* bustype_type */



Home | Main Index | Thread Index | Old Index