Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi scsipi_print_xfer_mode(): PERIPH_CAP_DT is an...



details:   https://anonhg.NetBSD.org/src/rev/0a7198332611
branches:  trunk
changeset: 526986:0a7198332611
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed May 15 11:19:38 2002 +0000

description:
scsipi_print_xfer_mode(): PERIPH_CAP_DT is an equivalent of
(PERIPH_CAP_SYNC | PERIPH_CAP_WIDE16) here.

diffstat:

 sys/dev/scsipi/scsipi_base.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (49 lines):

diff -r f9b241c788d0 -r 0a7198332611 sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c      Wed May 15 11:17:32 2002 +0000
+++ b/sys/dev/scsipi/scsipi_base.c      Wed May 15 11:19:38 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_base.c,v 1.72 2002/05/05 15:16:32 bouyer Exp $  */
+/*     $NetBSD: scsipi_base.c,v 1.73 2002/05/15 11:19:38 bouyer Exp $  */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.72 2002/05/05 15:16:32 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.73 2002/05/15 11:19:38 bouyer Exp $");
 
 #include "opt_scsi.h"
 
@@ -2225,7 +2225,7 @@
                return;
 
        printf("%s: ", periph->periph_dev->dv_xname);
-       if (periph->periph_mode & PERIPH_CAP_SYNC) {
+       if (periph->periph_mode & (PERIPH_CAP_SYNC | PERIPH_CAP_DT)) {
                period = scsipi_sync_factor_to_period(periph->periph_period);
                printf("sync (%d.%dns offset %d)",
                    period / 10, period % 10, periph->periph_offset);
@@ -2234,17 +2234,18 @@
 
        if (periph->periph_mode & PERIPH_CAP_WIDE32)
                printf(", 32-bit");
-       else if (periph->periph_mode & PERIPH_CAP_WIDE16)
+       else if (periph->periph_mode & (PERIPH_CAP_WIDE16 | PERIPH_CAP_DT))
                printf(", 16-bit");
        else
                printf(", 8-bit");
 
-       if (periph->periph_mode & PERIPH_CAP_SYNC) {
+       if (periph->periph_mode & (PERIPH_CAP_SYNC | PERIPH_CAP_DT)) {
                freq = scsipi_sync_factor_to_freq(periph->periph_period);
                speed = freq;
                if (periph->periph_mode & PERIPH_CAP_WIDE32)
                        speed *= 4;
-               else if (periph->periph_mode & PERIPH_CAP_WIDE16)
+               else if (periph->periph_mode &
+                   (PERIPH_CAP_WIDE16 | PERIPH_CAP_DT)) 
                        speed *= 2;
                mbs = speed / 1000;
                if (mbs > 0)



Home | Main Index | Thread Index | Old Index