1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 21da177e4SLinus Torvalds #ifndef _SCSI_SCSI_DEVINFO_H 31da177e4SLinus Torvalds #define _SCSI_SCSI_DEVINFO_H 41da177e4SLinus Torvalds /* 51da177e4SLinus Torvalds * Flags for SCSI devices that need special treatment 61da177e4SLinus Torvalds */ 7f26aeadaSHannes Reinecke 8f26aeadaSHannes Reinecke /* Only scan LUN 0 */ 914098803SMartin Wilck #define BLIST_NOLUN ((__force blist_flags_t)(1ULL << 0)) 10f26aeadaSHannes Reinecke /* Known to have LUNs, force scanning. 11f26aeadaSHannes Reinecke * DEPRECATED: Use max_luns=N */ 1214098803SMartin Wilck #define BLIST_FORCELUN ((__force blist_flags_t)(1ULL << 1)) 13f26aeadaSHannes Reinecke /* Flag for broken handshaking */ 1414098803SMartin Wilck #define BLIST_BORKEN ((__force blist_flags_t)(1ULL << 2)) 15f26aeadaSHannes Reinecke /* unlock by special command */ 1614098803SMartin Wilck #define BLIST_KEY ((__force blist_flags_t)(1ULL << 3)) 17f26aeadaSHannes Reinecke /* Do not use LUNs in parallel */ 1814098803SMartin Wilck #define BLIST_SINGLELUN ((__force blist_flags_t)(1ULL << 4)) 19f26aeadaSHannes Reinecke /* Buggy Tagged Command Queuing */ 2014098803SMartin Wilck #define BLIST_NOTQ ((__force blist_flags_t)(1ULL << 5)) 21f26aeadaSHannes Reinecke /* Non consecutive LUN numbering */ 2214098803SMartin Wilck #define BLIST_SPARSELUN ((__force blist_flags_t)(1ULL << 6)) 23f26aeadaSHannes Reinecke /* Avoid LUNS >= 5 */ 2414098803SMartin Wilck #define BLIST_MAX5LUN ((__force blist_flags_t)(1ULL << 7)) 25f26aeadaSHannes Reinecke /* Treat as (removable) CD-ROM */ 2614098803SMartin Wilck #define BLIST_ISROM ((__force blist_flags_t)(1ULL << 8)) 27f26aeadaSHannes Reinecke /* LUNs past 7 on a SCSI-2 device */ 2814098803SMartin Wilck #define BLIST_LARGELUN ((__force blist_flags_t)(1ULL << 9)) 29f26aeadaSHannes Reinecke /* override additional length field */ 3014098803SMartin Wilck #define BLIST_INQUIRY_36 ((__force blist_flags_t)(1ULL << 10)) 31358fda5fSMartin Wilck #define __BLIST_UNUSED_11 ((__force blist_flags_t)(1ULL << 11)) 32f26aeadaSHannes Reinecke /* do not do automatic start on add */ 3314098803SMartin Wilck #define BLIST_NOSTARTONADD ((__force blist_flags_t)(1ULL << 12)) 34358fda5fSMartin Wilck #define __BLIST_UNUSED_13 ((__force blist_flags_t)(1ULL << 13)) 35358fda5fSMartin Wilck #define __BLIST_UNUSED_14 ((__force blist_flags_t)(1ULL << 14)) 36358fda5fSMartin Wilck #define __BLIST_UNUSED_15 ((__force blist_flags_t)(1ULL << 15)) 37358fda5fSMartin Wilck #define __BLIST_UNUSED_16 ((__force blist_flags_t)(1ULL << 16)) 38f26aeadaSHannes Reinecke /* try REPORT_LUNS even for SCSI-2 devs (if HBA supports more than 8 LUNs) */ 3914098803SMartin Wilck #define BLIST_REPORTLUN2 ((__force blist_flags_t)(1ULL << 17)) 40f26aeadaSHannes Reinecke /* don't try REPORT_LUNS scan (SCSI-3 devs) */ 4114098803SMartin Wilck #define BLIST_NOREPORTLUN ((__force blist_flags_t)(1ULL << 18)) 42f26aeadaSHannes Reinecke /* don't use PREVENT-ALLOW commands */ 4314098803SMartin Wilck #define BLIST_NOT_LOCKABLE ((__force blist_flags_t)(1ULL << 19)) 44f26aeadaSHannes Reinecke /* device is actually for RAID config */ 4514098803SMartin Wilck #define BLIST_NO_ULD_ATTACH ((__force blist_flags_t)(1ULL << 20)) 46f26aeadaSHannes Reinecke /* select without ATN */ 4714098803SMartin Wilck #define BLIST_SELECT_NO_ATN ((__force blist_flags_t)(1ULL << 21)) 48f26aeadaSHannes Reinecke /* retry HARDWARE_ERROR */ 4914098803SMartin Wilck #define BLIST_RETRY_HWERROR ((__force blist_flags_t)(1ULL << 22)) 50f26aeadaSHannes Reinecke /* maximum 512 sector cdb length */ 5114098803SMartin Wilck #define BLIST_MAX_512 ((__force blist_flags_t)(1ULL << 23)) 52358fda5fSMartin Wilck #define __BLIST_UNUSED_24 ((__force blist_flags_t)(1ULL << 24)) 53f26aeadaSHannes Reinecke /* Disable T10 PI (DIF) */ 5414098803SMartin Wilck #define BLIST_NO_DIF ((__force blist_flags_t)(1ULL << 25)) 55f26aeadaSHannes Reinecke /* Ignore SBC-3 VPD pages */ 5614098803SMartin Wilck #define BLIST_SKIP_VPD_PAGES ((__force blist_flags_t)(1ULL << 26)) 57358fda5fSMartin Wilck #define __BLIST_UNUSED_27 ((__force blist_flags_t)(1ULL << 27)) 58f26aeadaSHannes Reinecke /* Attempt to read VPD pages */ 5914098803SMartin Wilck #define BLIST_TRY_VPD_PAGES ((__force blist_flags_t)(1ULL << 28)) 60f26aeadaSHannes Reinecke /* don't try to issue RSOC */ 6114098803SMartin Wilck #define BLIST_NO_RSOC ((__force blist_flags_t)(1ULL << 29)) 62f26aeadaSHannes Reinecke /* maximum 1024 sector cdb length */ 6314098803SMartin Wilck #define BLIST_MAX_1024 ((__force blist_flags_t)(1ULL << 30)) 64670ffccbSLinus Torvalds /* Use UNMAP limit for WRITE SAME */ 6514098803SMartin Wilck #define BLIST_UNMAP_LIMIT_WS ((__force blist_flags_t)(1ULL << 31)) 66*29cfc2abSMartin Wilck /* Always retry ABORTED_COMMAND with Internal Target Failure */ 67*29cfc2abSMartin Wilck #define BLIST_RETRY_ITF ((__force blist_flags_t)(1ULL << 32)) 680213436aSJanusz Dziemidowicz 69*29cfc2abSMartin Wilck #define __BLIST_LAST_USED BLIST_RETRY_ITF 70358fda5fSMartin Wilck 71358fda5fSMartin Wilck #define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \ 72358fda5fSMartin Wilck (__force blist_flags_t) \ 73358fda5fSMartin Wilck ((__force __u64)__BLIST_LAST_USED - 1ULL))) 74358fda5fSMartin Wilck #define __BLIST_UNUSED_MASK (__BLIST_UNUSED_11 | \ 75358fda5fSMartin Wilck __BLIST_UNUSED_13 | \ 76358fda5fSMartin Wilck __BLIST_UNUSED_14 | \ 77358fda5fSMartin Wilck __BLIST_UNUSED_15 | \ 78358fda5fSMartin Wilck __BLIST_UNUSED_16 | \ 79358fda5fSMartin Wilck __BLIST_UNUSED_24 | \ 80358fda5fSMartin Wilck __BLIST_UNUSED_27 | \ 81358fda5fSMartin Wilck __BLIST_HIGH_UNUSED) 82358fda5fSMartin Wilck 831da177e4SLinus Torvalds #endif 84