diff options
| author | augustss <augustss@NetBSD.org> | 2001-08-31 07:09:41 +0000 |
|---|---|---|
| committer | augustss <augustss@NetBSD.org> | 2001-08-31 07:09:41 +0000 |
| commit | 60ffafe273f6e3aa1785f6fe776ef79ad2d9c064 (patch) | |
| tree | 3fe01f036abea31f50a144eaa9e8d9f7544e8845 /sys/dev | |
| parent | 033a7fa40d1fab4986d53583639fc791fa798138 (diff) | |
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 (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/scsipi/scsiconf.c | 4 | ||||
| -rw-r--r-- | sys/dev/scsipi/scsipiconf.h | 3 | ||||
| -rw-r--r-- | sys/dev/scsipi/sd_scsi.c | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/scsipi/scsiconf.c b/sys/dev/scsipi/scsiconf.c index 91c69f404a7..8df0aa95600 100644 --- a/sys/dev/scsipi/scsiconf.c +++ b/sys/dev/scsipi/scsiconf.c @@ -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 @@ const struct scsi_quirk_inquiry_pattern scsi_quirk_patterns[] = { "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 --git a/sys/dev/scsipi/scsipiconf.h b/sys/dev/scsipi/scsipiconf.h index c62d68e9633..c2111a8948e 100644 --- a/sys/dev/scsipi/scsipiconf.h +++ b/sys/dev/scsipi/scsipiconf.h @@ -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 @@ struct scsipi_periph { #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 --git a/sys/dev/scsipi/sd_scsi.c b/sys/dev/scsipi/sd_scsi.c index c488764c13a..58560c64e3b 100644 --- a/sys/dev/scsipi/sd_scsi.c +++ b/sys/dev/scsipi/sd_scsi.c @@ -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 @@ sd_scsibus_mode_sense(sd, scsipi_sense, page, flags) */ 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), |
