Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi Report SPC-2 features (DT clocking, quick arb...
details: https://anonhg.NetBSD.org/src/rev/5d06d95b840f
branches: trunk
changeset: 526005:5d06d95b840f
user: bouyer <bouyer%NetBSD.org@localhost>
date: Tue Apr 23 09:09:55 2002 +0000
description:
Report SPC-2 features (DT clocking, quick arbitration and selection,
information unit transfers) though periph_cap.
diffstat:
sys/dev/scsipi/scsiconf.c | 28 ++++++++++++++++++++++++++--
sys/dev/scsipi/scsipiconf.h | 5 ++++-
2 files changed, 30 insertions(+), 3 deletions(-)
diffs (68 lines):
diff -r e06d88e2fcf5 -r 5d06d95b840f sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Tue Apr 23 08:19:15 2002 +0000
+++ b/sys/dev/scsipi/scsiconf.c Tue Apr 23 09:09:55 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.180 2002/04/15 12:40:28 joda Exp $ */
+/* $NetBSD: scsiconf.c,v 1.181 2002/04/23 09:09:55 bouyer Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.180 2002/04/15 12:40:28 joda Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.181 2002/04/23 09:09:55 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -843,6 +843,30 @@
periph->periph_cap |= PERIPH_CAP_SFTRESET;
if ((inqbuf.flags3 & SID_RelAdr) != 0)
periph->periph_cap |= PERIPH_CAP_RELADR;
+ if (periph->periph_version >= 4) { /* SPC-2 */
+ /*
+ * Report ST clocking though CAP_WIDExx/CAP_SYNC.
+ * If the device only supports DT, clear these
+ * flags (DT implies SYNC and WIDE)
+ */
+ switch (inqbuf.flags4 & SID_Clocking) {
+ case SID_CLOCKING_DT_ONLY:
+ periph->periph_cap &=
+ ~(PERIPH_CAP_SYNC |
+ PERIPH_CAP_WIDE16 |
+ PERIPH_CAP_WIDE32);
+ /* FALLTHOUGH */
+ case SID_CLOCKING_SD_DT:
+ periph->periph_cap |= PERIPH_CAP_DT;
+ break;
+ default: /* ST only or invalid */
+ /* nothing to do */
+ }
+ if (inqbuf.flags4 & SID_IUS)
+ periph->periph_cap |= PERIPH_CAP_IUS;
+ if (inqbuf.flags4 & SID_QAS)
+ periph->periph_cap |= PERIPH_CAP_QAS;
+ }
} else {
if (quirks & PQUIRK_CAP_SYNC)
periph->periph_cap |= PERIPH_CAP_SYNC;
diff -r e06d88e2fcf5 -r 5d06d95b840f sys/dev/scsipi/scsipiconf.h
--- a/sys/dev/scsipi/scsipiconf.h Tue Apr 23 08:19:15 2002 +0000
+++ b/sys/dev/scsipi/scsipiconf.h Tue Apr 23 09:09:55 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipiconf.h,v 1.66 2002/04/01 20:37:42 bouyer Exp $ */
+/* $NetBSD: scsipiconf.h,v 1.67 2002/04/23 09:09:55 bouyer Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -410,6 +410,9 @@
#define PERIPH_CAP_TQING 0x0200 /* tagged queueing */
#define PERIPH_CAP_SFTRESET 0x0400 /* soft RESET condition response */
#define PERIPH_CAP_CMD16 0x0800 /* 16 byte commands (ATAPI) */
+#define PERIPH_CAP_DT 0x1000 /* supports DT clock */
+#define PERIPH_CAP_QAS 0x2000 /* supports quick arbit. and select. */
+#define PERIPH_CAP_IUS 0x4000 /* supports information unit xfers */
/* periph_flags */
#define PERIPH_REMOVABLE 0x0001 /* media is removable */
Home |
Main Index |
Thread Index |
Old Index