summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMartin Wilck <mwilck@suse.com>2018-04-17 19:35:09 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-20 19:14:35 -0400
commit358fda5ff4c441dfa6e66fd3b1f7d8f882ecba8f (patch)
treeca98c94036d81fb7d6c5a6210819a2a52b63bb3d /include/scsi
parent1409880357ed33dc1c23eed080d88ea4410ed9a3 (diff)
scsi: devinfo: warn on undefined blist flags
Warn if a device (or the user) sets blist flags which are unknown or have been removed. This should enable us to reuse freed blist bits in later releases. Signed-off-by: Martin Wilck <mwilck@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_devinfo.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
index e206d299f137..3434e143feff 100644
--- a/include/scsi/scsi_devinfo.h
+++ b/include/scsi/scsi_devinfo.h
@@ -28,8 +28,13 @@
28#define BLIST_LARGELUN ((__force blist_flags_t)(1ULL << 9)) 28#define BLIST_LARGELUN ((__force blist_flags_t)(1ULL << 9))
29/* override additional length field */ 29/* override additional length field */
30#define BLIST_INQUIRY_36 ((__force blist_flags_t)(1ULL << 10)) 30#define BLIST_INQUIRY_36 ((__force blist_flags_t)(1ULL << 10))
31#define __BLIST_UNUSED_11 ((__force blist_flags_t)(1ULL << 11))
31/* do not do automatic start on add */ 32/* do not do automatic start on add */
32#define BLIST_NOSTARTONADD ((__force blist_flags_t)(1ULL << 12)) 33#define BLIST_NOSTARTONADD ((__force blist_flags_t)(1ULL << 12))
34#define __BLIST_UNUSED_13 ((__force blist_flags_t)(1ULL << 13))
35#define __BLIST_UNUSED_14 ((__force blist_flags_t)(1ULL << 14))
36#define __BLIST_UNUSED_15 ((__force blist_flags_t)(1ULL << 15))
37#define __BLIST_UNUSED_16 ((__force blist_flags_t)(1ULL << 16))
33/* try REPORT_LUNS even for SCSI-2 devs (if HBA supports more than 8 LUNs) */ 38/* try REPORT_LUNS even for SCSI-2 devs (if HBA supports more than 8 LUNs) */
34#define BLIST_REPORTLUN2 ((__force blist_flags_t)(1ULL << 17)) 39#define BLIST_REPORTLUN2 ((__force blist_flags_t)(1ULL << 17))
35/* don't try REPORT_LUNS scan (SCSI-3 devs) */ 40/* don't try REPORT_LUNS scan (SCSI-3 devs) */
@@ -44,10 +49,12 @@
44#define BLIST_RETRY_HWERROR ((__force blist_flags_t)(1ULL << 22)) 49#define BLIST_RETRY_HWERROR ((__force blist_flags_t)(1ULL << 22))
45/* maximum 512 sector cdb length */ 50/* maximum 512 sector cdb length */
46#define BLIST_MAX_512 ((__force blist_flags_t)(1ULL << 23)) 51#define BLIST_MAX_512 ((__force blist_flags_t)(1ULL << 23))
52#define __BLIST_UNUSED_24 ((__force blist_flags_t)(1ULL << 24))
47/* Disable T10 PI (DIF) */ 53/* Disable T10 PI (DIF) */
48#define BLIST_NO_DIF ((__force blist_flags_t)(1ULL << 25)) 54#define BLIST_NO_DIF ((__force blist_flags_t)(1ULL << 25))
49/* Ignore SBC-3 VPD pages */ 55/* Ignore SBC-3 VPD pages */
50#define BLIST_SKIP_VPD_PAGES ((__force blist_flags_t)(1ULL << 26)) 56#define BLIST_SKIP_VPD_PAGES ((__force blist_flags_t)(1ULL << 26))
57#define __BLIST_UNUSED_27 ((__force blist_flags_t)(1ULL << 27))
51/* Attempt to read VPD pages */ 58/* Attempt to read VPD pages */
52#define BLIST_TRY_VPD_PAGES ((__force blist_flags_t)(1ULL << 28)) 59#define BLIST_TRY_VPD_PAGES ((__force blist_flags_t)(1ULL << 28))
53/* don't try to issue RSOC */ 60/* don't try to issue RSOC */
@@ -57,4 +64,18 @@
57/* Use UNMAP limit for WRITE SAME */ 64/* Use UNMAP limit for WRITE SAME */
58#define BLIST_UNMAP_LIMIT_WS ((__force blist_flags_t)(1ULL << 31)) 65#define BLIST_UNMAP_LIMIT_WS ((__force blist_flags_t)(1ULL << 31))
59 66
67#define __BLIST_LAST_USED BLIST_UNMAP_LIMIT_WS
68
69#define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \
70 (__force blist_flags_t) \
71 ((__force __u64)__BLIST_LAST_USED - 1ULL)))
72#define __BLIST_UNUSED_MASK (__BLIST_UNUSED_11 | \
73 __BLIST_UNUSED_13 | \
74 __BLIST_UNUSED_14 | \
75 __BLIST_UNUSED_15 | \
76 __BLIST_UNUSED_16 | \
77 __BLIST_UNUSED_24 | \
78 __BLIST_UNUSED_27 | \
79 __BLIST_HIGH_UNUSED)
80
60#endif 81#endif