summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2000-05-09 04:54:10 +0000
committermjacob <mjacob@FreeBSD.org>2000-05-09 04:54:10 +0000
commit6687f76d6d9129704d2775b069073aa965e1100e (patch)
tree3faa72cbdb22d3902d936006708b1a4a055b2616 /sys/cam
parentc34d787503b864f62cc8cc320b9558878d27fe56 (diff)
downloadFreeBSD-src-6687f76d6d9129704d2775b069073aa965e1100e.zip
FreeBSD-src-6687f76d6d9129704d2775b069073aa965e1100e.tar.gz
Some prettifying for the quirk comments.
Add a SA_QUIRK_NO_MODESEL type and use it for the OnStream real SCSI device (not the broken one). This one is still broken in that it can't be set to the same fixed block size it reports [ unflattering comments about this company elided ]. If we're unable to set buffered mode on, complain, but drive on. It's not a fatal error to not be in buffered mode.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_sa.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index f5d9f6d..80847dd 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -145,12 +145,13 @@ typedef enum {
typedef enum {
SA_QUIRK_NONE = 0x00,
- SA_QUIRK_NOCOMP = 0x01, /* can't deal with compression at all */
- SA_QUIRK_FIXED = 0x02, /* force fixed mode */
- SA_QUIRK_VARIABLE = 0x04, /* force variable mode */
+ SA_QUIRK_NOCOMP = 0x01, /* Can't deal with compression at all */
+ SA_QUIRK_FIXED = 0x02, /* Force fixed mode */
+ SA_QUIRK_VARIABLE = 0x04, /* Force variable mode */
SA_QUIRK_2FM = 0x08, /* Needs Two File Marks at EOD */
SA_QUIRK_1FM = 0x10, /* No more than 1 File Mark at EOD */
- SA_QUIRK_NODREAD = 0x20 /* Don't try and dummy read density */
+ SA_QUIRK_NODREAD = 0x20, /* Don't try and dummy read density */
+ SA_QUIRK_NO_MODESEL = 0x40 /* Don't do mode select at all */
} sa_quirks;
/* units are bits 4-7, 16-21 (1024 units) */
@@ -251,6 +252,11 @@ struct sa_quirk_entry {
static struct sa_quirk_entry sa_quirk_table[] =
{
{
+ { T_SEQUENTIAL, SIP_MEDIA_REMOVABLE, "OnStream",
+ "ADR*", "*"}, SA_QUIRK_FIXED|SA_QUIRK_NODREAD |
+ SA_QUIRK_1FM|SA_QUIRK_NO_MODESEL, 32768
+ },
+ {
{ T_SEQUENTIAL, SIP_MEDIA_REMOVABLE, "ARCHIVE",
"Python 25601*", "*"}, SA_QUIRK_NOCOMP|SA_QUIRK_NODREAD, 0
},
@@ -2031,6 +2037,7 @@ tryagain:
* or min_blk if that's larger.
*/
if ((softc->quirks & SA_QUIRK_FIXED) &&
+ (softc->quirks & SA_QUIRK_NO_MODESEL) == 0 &&
(softc->media_blksize != softc->last_media_blksize)) {
softc->media_blksize = softc->last_media_blksize;
if (softc->media_blksize == 0) {
@@ -2120,11 +2127,15 @@ tryagain:
} else
softc->flags |= SA_FLAG_COMP_UNSUPP;
- if (softc->buffer_mode == SMH_SA_BUF_MODE_NOBUF) {
+ if ((softc->buffer_mode == SMH_SA_BUF_MODE_NOBUF) &&
+ (softc->quirks & SA_QUIRK_NO_MODESEL) == 0) {
error = sasetparams(periph, SA_PARAM_BUFF_MODE, 0,
0, 0, SF_NO_PRINT);
if (error == 0)
softc->buffer_mode = SMH_SA_BUF_MODE_SIBUF;
+ xpt_print_path(ccb->ccb_h.path);
+ printf("unable to set buffered mode\n");
+ error = 0; /* not an error */
}
OpenPOWER on IntegriCloud