diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-08-30 19:41:26 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-08-30 19:41:26 +0000 |
commit | 22e84cfd2c51ba19b559be273de713a2f7729919 (patch) | |
tree | 93b83dd10b45d13f17893febd8c91ae932df28f5 /sys/scsi | |
parent | 8a5d8c291a2cffb0a8d3e8c933452ccb5a409b12 (diff) |
Compactify SDEV_/ADEV_ flags & quirks to eliminate the gaps in bit use and thus
allow shrinking the names arrays.
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsi_base.c | 9 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 18 |
2 files changed, 10 insertions, 17 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index a1111132a87..26d1269a47a 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.271 2020/08/28 15:18:14 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.272 2020/08/30 19:41:25 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -2655,7 +2655,6 @@ const char *flagnames[] = { "DB4", "EJECTING", "ATAPI", - "", "UMASS", "VIRTUAL", "OWN_IOPL", @@ -2667,17 +2666,11 @@ const char *quirknames[] = { "NOSYNC", "NOWIDE", "NOTAGS", - "", - "", - "", - "", "NOSYNCCACHE", "NOSENSE", "LITTLETOC", "NOCAPACITY", - "", "NODOORLOCK", - "", NULL }; diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 887f308d920..6bd568e9df3 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.197 2020/08/28 15:18:14 krw Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.198 2020/08/30 19:41:25 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -296,19 +296,19 @@ struct scsi_link { #define SDEV_DBX 0x00f0 /* debugging flags (scsi_debug.h) */ #define SDEV_EJECTING 0x0100 /* eject on device close */ #define SDEV_ATAPI 0x0200 /* device is ATAPI */ -#define SDEV_UMASS 0x0800 /* device is UMASS SCSI */ -#define SDEV_VIRTUAL 0x1000 /* device is virtualised on the hba */ -#define SDEV_OWN_IOPL 0x2000 /* scsibus */ +#define SDEV_UMASS 0x0400 /* device is UMASS SCSI */ +#define SDEV_VIRTUAL 0x0800 /* device is virtualised on the hba */ +#define SDEV_OWN_IOPL 0x1000 /* scsibus */ u_int16_t quirks; /* per-device oddities */ #define SDEV_AUTOSAVE 0x0001 /* do implicit SAVEDATAPOINTER on disconnect */ #define SDEV_NOSYNC 0x0002 /* does not grok SDTR */ #define SDEV_NOWIDE 0x0004 /* does not grok WDTR */ #define SDEV_NOTAGS 0x0008 /* lies about having tagged queueing */ -#define SDEV_NOSYNCCACHE 0x0100 /* no SYNCHRONIZE_CACHE */ -#define ADEV_NOSENSE 0x0200 /* No request sense - ATAPI */ -#define ADEV_LITTLETOC 0x0400 /* little-endian TOC - ATAPI */ -#define ADEV_NOCAPACITY 0x0800 /* no READ CD CAPACITY */ -#define ADEV_NODOORLOCK 0x2000 /* can't lock door */ +#define SDEV_NOSYNCCACHE 0x0010 /* no SYNCHRONIZE_CACHE */ +#define ADEV_NOSENSE 0x0020 /* No request sense - ATAPI */ +#define ADEV_LITTLETOC 0x0040 /* little-endian TOC - ATAPI */ +#define ADEV_NOCAPACITY 0x0080 /* no READ CD CAPACITY */ +#define ADEV_NODOORLOCK 0x0100 /* can't lock door */ int (*interpret_sense)(struct scsi_xfer *); void *device_softc; /* needed for call to foo_start */ struct scsibus_softc *bus; /* link to the scsibus we're on */ |