Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi Add a new quirk, PQUIRK_NOBIGMODESENSE, for d...
details: https://anonhg.NetBSD.org/src/rev/004b0cf29e9d
branches: trunk
changeset: 514375:004b0cf29e9d
user: augustss <augustss%NetBSD.org@localhost>
date: Fri Aug 31 07:09:41 2001 +0000
description:
Add a new quirk, PQUIRK_NOBIGMODESENSE, for devices that need big
SCSI ops, but still fails on big mode sense.
Makes M-Sys DiskOnKey work.
diffstat:
sys/dev/scsipi/scsiconf.c | 4 ++--
sys/dev/scsipi/scsipiconf.h | 3 ++-
sys/dev/scsipi/sd_scsi.c | 5 +++--
3 files changed, 7 insertions(+), 5 deletions(-)
diffs (54 lines):
diff -r 835fc92cf1ea -r 004b0cf29e9d sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Fri Aug 31 06:54:42 2001 +0000
+++ b/sys/dev/scsipi/scsiconf.c Fri Aug 31 07:09:41 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.160 2001/08/31 06:54:42 augustss Exp $ */
+/* $NetBSD: scsiconf.c,v 1.161 2001/08/31 07:09:41 augustss Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -575,7 +575,7 @@
"TEAC", "FD-05PUB", "1026"}, PQUIRK_NOMODESENSE},
{{T_DIRECT, T_REMOV,
"M-Sys", "DiskOnKey", "2.01"}, PQUIRK_NOMODESENSE
- | PQUIRK_NODOORLOCK | PQUIRK_ONLYBIG},
+ | PQUIRK_NODOORLOCK | PQUIRK_ONLYBIG | PQUIRK_NOBIGMODESENSE},
/* XXX: QIC-36 tape behind Emulex adapter. Very broken. */
{{T_SEQUENTIAL, T_REMOV,
diff -r 835fc92cf1ea -r 004b0cf29e9d sys/dev/scsipi/scsipiconf.h
--- a/sys/dev/scsipi/scsipiconf.h Fri Aug 31 06:54:42 2001 +0000
+++ b/sys/dev/scsipi/scsipiconf.h Fri Aug 31 07:09:41 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipiconf.h,v 1.55 2001/07/18 20:19:24 bouyer Exp $ */
+/* $NetBSD: scsipiconf.h,v 1.56 2001/08/31 07:09:42 augustss Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -440,6 +440,7 @@
#define PQUIRK_ONLYBIG 0x00008000 /* only use SCSI_{R,W}_BIG */
#define PQUIRK_BYTE5_ZERO 0x00010000 /* byte5 in capacity is wrong */
#define PQUIRK_NO_FLEX_PAGE 0x00020000 /* does not support flex geom page */
+#define PQUIRK_NOBIGMODESENSE 0x00040000 /* has no big mode-sense op */
/*
diff -r 835fc92cf1ea -r 004b0cf29e9d sys/dev/scsipi/sd_scsi.c
--- a/sys/dev/scsipi/sd_scsi.c Fri Aug 31 06:54:42 2001 +0000
+++ b/sys/dev/scsipi/sd_scsi.c Fri Aug 31 07:09:41 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sd_scsi.c,v 1.18 2001/07/18 18:21:06 thorpej Exp $ */
+/* $NetBSD: sd_scsi.c,v 1.19 2001/08/31 07:09:42 augustss Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -167,7 +167,8 @@
*/
memset(scsipi_sense, 0, sizeof(*scsipi_sense));
- if (sd->sc_periph->periph_quirks & PQUIRK_ONLYBIG) {
+ if ((sd->sc_periph->periph_quirks & PQUIRK_ONLYBIG) &&
+ !(sd->sc_periph->periph_quirks & PQUIRK_NOBIGMODESENSE)) {
return scsipi_mode_sense_big(sd->sc_periph, 0, page,
(struct scsipi_mode_header_big*)&scsipi_sense->header,
sizeof(*scsipi_sense),
Home |
Main Index |
Thread Index |
Old Index