aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2000-05-09 04:54:10 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2000-05-09 04:54:10 +0000
commit15e0583c795a2bb5a92eaa85eac3e500916ad804 (patch)
treed536a507672883faa62b63071de653ba9452af50 /sys
parent5bbd5cc8f4a26bc11bde46678b5b7e61fe70c35b (diff)
downloadsrc-15e0583c795a2bb5a92eaa85eac3e500916ad804.tar.gz
src-15e0583c795a2bb5a92eaa85eac3e500916ad804.zip
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.
Notes
Notes: svn path=/head/; revision=60235
Diffstat (limited to 'sys')
-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 f5d9f6df3ebc..80847dd5e7cf 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 */
}