Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys Add support for accelleration SCSI ioctls (that all...
details: https://anonhg.NetBSD.org/src/rev/0a263a9ccdc2
branches: netbsd-1-5
changeset: 489293:0a263a9ccdc2
user: mjacob <mjacob%NetBSD.org@localhost>
date: Mon Aug 28 05:39:43 2000 +0000
description:
Add support for accelleration SCSI ioctls (that allow for the
midlayer to enable sync/wide/tagged).
Approved for pullup to netbsd-1-5 by thorpej%netbsd.org@localhost.
diffstat:
sys/dev/scsipi/scsiconf.c | 28 +++++++++++++++++++++++-----
sys/sys/scsiio.h | 13 ++++++++++++-
2 files changed, 35 insertions(+), 6 deletions(-)
diffs (85 lines):
diff -r 671f52260e40 -r 0a263a9ccdc2 sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Mon Aug 28 04:25:44 2000 +0000
+++ b/sys/dev/scsipi/scsiconf.c Mon Aug 28 05:39:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.147.2.1 2000/08/03 17:17:48 bouyer Exp $ */
+/* $NetBSD: scsiconf.c,v 1.147.2.2 2000/08/28 05:39:44 mjacob Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -655,13 +655,12 @@
"UMAX ", "UMAX S-12 ", "V2.1"}, SDEV_NOLUNS},
{{T_SCANNER, T_FIXED,
"ULTIMA ", "A6000C ", ""}, SDEV_NOLUNS},
-
+ {{T_PROCESSOR, T_FIXED,
+ "SYMBIOS", "", ""}, SDEV_NOLUNS},
{{T_PROCESSOR, T_FIXED,
"LITRONIC", "PCMCIA ", ""}, SDEV_NOLUNS},
-
{{T_CHANGER, T_REMOV,
"SONY ", "CDL1100 ", ""}, SDEV_NOLUNS},
-
{{T_ENCLOSURE, T_FIXED,
"SUN ", "SENA ", ""}, SDEV_NOLUNS},
};
@@ -817,7 +816,7 @@
default:
break;
}
- if (checkdtype)
+ if (checkdtype) {
switch (inqbuf.device & SID_TYPE) {
case T_DIRECT:
case T_SEQUENTIAL:
@@ -841,6 +840,25 @@
case T_NODEVICE:
goto bad;
}
+ /*
+ * At this point we can also tell the adapter that it
+ * may negotiate things as appropriate.
+ */
+ if (sc_link->adapter->scsipi_ioctl) {
+ struct scbusaccel_args s;
+ s.sa_target = target;
+ s.sa_lun = lun;
+ s.sa_flags = 0;
+ if ((sc_link->quirks & SDEV_NOTAG) == 0)
+ s.sa_flags |= SC_ACCEL_TAGS;
+ if ((sc_link->quirks & SDEV_NOSYNC) == 0)
+ s.sa_flags |= SC_ACCEL_SYNC;
+ if ((sc_link->quirks & SDEV_NOWIDE) == 0)
+ s.sa_flags |= SC_ACCEL_WIDE;
+ (void) (*sc_link->adapter->scsipi_ioctl)
+ (sc_link, SCBUSACCEL, (caddr_t)&s, FWRITE, curproc);
+ }
+ }
if ((cf = config_search(scsibussubmatch, (struct device *)scsi,
&sa)) != NULL) {
diff -r 671f52260e40 -r 0a263a9ccdc2 sys/sys/scsiio.h
--- a/sys/sys/scsiio.h Mon Aug 28 04:25:44 2000 +0000
+++ b/sys/sys/scsiio.h Mon Aug 28 05:39:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiio.h,v 1.7 1998/10/10 03:18:51 thorpej Exp $ */
+/* $NetBSD: scsiio.h,v 1.7.22.1 2000/08/28 05:39:43 mjacob Exp $ */
#ifndef _SYS_SCSIIO_H_
#define _SYS_SCSIIO_H_
@@ -90,4 +90,15 @@
#define SCBUSIORESET _IO('U', 1) /* reset SCSI bus */
+/* enable/disable device properties */
+struct scbusaccel_args {
+ int sa_target; /* target to set property on */
+ int sa_lun; /* lun to set property on */
+ int sa_flags; /* flags to set or clear */
+};
+#define SC_ACCEL_SYNC 0x01 /* enable sync mode */
+#define SC_ACCEL_WIDE 0x02 /* enable wide transfers */
+#define SC_ACCEL_TAGS 0x04 /* enable tagged queuing */
+#define SCBUSACCEL _IOW('U', 2, struct scbusaccel_args)
+
#endif /* _SYS_SCSIIO_H_ */
Home |
Main Index |
Thread Index |
Old Index