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)) 31f591a2e0SMartin Kepplinger /* ignore MEDIA CHANGE unit attention after resuming from runtime suspend */ 32f591a2e0SMartin Kepplinger #define BLIST_IGN_MEDIA_CHANGE ((__force blist_flags_t)(1ULL << 11)) 33f26aeadaSHannes Reinecke /* do not do automatic start on add */ 3414098803SMartin Wilck #define BLIST_NOSTARTONADD ((__force blist_flags_t)(1ULL << 12)) 35*4b1a2c2aSLee Duncan /* do not ask for VPD page size first on some broken targets */ 36*4b1a2c2aSLee Duncan #define BLIST_NO_VPD_SIZE ((__force blist_flags_t)(1ULL << 13)) 37358fda5fSMartin Wilck #define __BLIST_UNUSED_14 ((__force blist_flags_t)(1ULL << 14)) 38358fda5fSMartin Wilck #define __BLIST_UNUSED_15 ((__force blist_flags_t)(1ULL << 15)) 39358fda5fSMartin Wilck #define __BLIST_UNUSED_16 ((__force blist_flags_t)(1ULL << 16)) 40f26aeadaSHannes Reinecke /* try REPORT_LUNS even for SCSI-2 devs (if HBA supports more than 8 LUNs) */ 4114098803SMartin Wilck #define BLIST_REPORTLUN2 ((__force blist_flags_t)(1ULL << 17)) 42f26aeadaSHannes Reinecke /* don't try REPORT_LUNS scan (SCSI-3 devs) */ 4314098803SMartin Wilck #define BLIST_NOREPORTLUN ((__force blist_flags_t)(1ULL << 18)) 44f26aeadaSHannes Reinecke /* don't use PREVENT-ALLOW commands */ 4514098803SMartin Wilck #define BLIST_NOT_LOCKABLE ((__force blist_flags_t)(1ULL << 19)) 46f26aeadaSHannes Reinecke /* device is actually for RAID config */ 4714098803SMartin Wilck #define BLIST_NO_ULD_ATTACH ((__force blist_flags_t)(1ULL << 20)) 48f26aeadaSHannes Reinecke /* select without ATN */ 4914098803SMartin Wilck #define BLIST_SELECT_NO_ATN ((__force blist_flags_t)(1ULL << 21)) 50f26aeadaSHannes Reinecke /* retry HARDWARE_ERROR */ 5114098803SMartin Wilck #define BLIST_RETRY_HWERROR ((__force blist_flags_t)(1ULL << 22)) 52f26aeadaSHannes Reinecke /* maximum 512 sector cdb length */ 5314098803SMartin Wilck #define BLIST_MAX_512 ((__force blist_flags_t)(1ULL << 23)) 54358fda5fSMartin Wilck #define __BLIST_UNUSED_24 ((__force blist_flags_t)(1ULL << 24)) 55f26aeadaSHannes Reinecke /* Disable T10 PI (DIF) */ 5614098803SMartin Wilck #define BLIST_NO_DIF ((__force blist_flags_t)(1ULL << 25)) 57f26aeadaSHannes Reinecke /* Ignore SBC-3 VPD pages */ 5814098803SMartin Wilck #define BLIST_SKIP_VPD_PAGES ((__force blist_flags_t)(1ULL << 26)) 59358fda5fSMartin Wilck #define __BLIST_UNUSED_27 ((__force blist_flags_t)(1ULL << 27)) 60f26aeadaSHannes Reinecke /* Attempt to read VPD pages */ 6114098803SMartin Wilck #define BLIST_TRY_VPD_PAGES ((__force blist_flags_t)(1ULL << 28)) 62f26aeadaSHannes Reinecke /* don't try to issue RSOC */ 6314098803SMartin Wilck #define BLIST_NO_RSOC ((__force blist_flags_t)(1ULL << 29)) 64f26aeadaSHannes Reinecke /* maximum 1024 sector cdb length */ 6514098803SMartin Wilck #define BLIST_MAX_1024 ((__force blist_flags_t)(1ULL << 30)) 66670ffccbSLinus Torvalds /* Use UNMAP limit for WRITE SAME */ 6714098803SMartin Wilck #define BLIST_UNMAP_LIMIT_WS ((__force blist_flags_t)(1ULL << 31)) 6829cfc2abSMartin Wilck /* Always retry ABORTED_COMMAND with Internal Target Failure */ 6929cfc2abSMartin Wilck #define BLIST_RETRY_ITF ((__force blist_flags_t)(1ULL << 32)) 70c3606520SMartin Wilck /* Always retry ABORTED_COMMAND with ASC 0xc1 */ 71c3606520SMartin Wilck #define BLIST_RETRY_ASC_C1 ((__force blist_flags_t)(1ULL << 33)) 720213436aSJanusz Dziemidowicz 73c3606520SMartin Wilck #define __BLIST_LAST_USED BLIST_RETRY_ASC_C1 74358fda5fSMartin Wilck 75358fda5fSMartin Wilck #define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \ 76358fda5fSMartin Wilck (__force blist_flags_t) \ 77358fda5fSMartin Wilck ((__force __u64)__BLIST_LAST_USED - 1ULL))) 78*4b1a2c2aSLee Duncan #define __BLIST_UNUSED_MASK (__BLIST_UNUSED_14 | \ 79358fda5fSMartin Wilck __BLIST_UNUSED_15 | \ 80358fda5fSMartin Wilck __BLIST_UNUSED_16 | \ 81358fda5fSMartin Wilck __BLIST_UNUSED_24 | \ 82358fda5fSMartin Wilck __BLIST_UNUSED_27 | \ 83358fda5fSMartin Wilck __BLIST_HIGH_UNUSED) 84358fda5fSMartin Wilck 851da177e4SLinus Torvalds #endif 86