From 15e0583c795a2bb5a92eaa85eac3e500916ad804 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Tue, 9 May 2000 04:54:10 +0000 Subject: [PATCH] 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. --- sys/cam/scsi/scsi_sa.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index f5d9f6df3eb..80847dd5e7c 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) */ @@ -250,6 +251,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 */ }