18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _SCSI_SCSI_DEVINFO_H 38c2ecf20Sopenharmony_ci#define _SCSI_SCSI_DEVINFO_H 48c2ecf20Sopenharmony_ci/* 58c2ecf20Sopenharmony_ci * Flags for SCSI devices that need special treatment 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci/* Only scan LUN 0 */ 98c2ecf20Sopenharmony_ci#define BLIST_NOLUN ((__force blist_flags_t)(1ULL << 0)) 108c2ecf20Sopenharmony_ci/* Known to have LUNs, force scanning. 118c2ecf20Sopenharmony_ci * DEPRECATED: Use max_luns=N */ 128c2ecf20Sopenharmony_ci#define BLIST_FORCELUN ((__force blist_flags_t)(1ULL << 1)) 138c2ecf20Sopenharmony_ci/* Flag for broken handshaking */ 148c2ecf20Sopenharmony_ci#define BLIST_BORKEN ((__force blist_flags_t)(1ULL << 2)) 158c2ecf20Sopenharmony_ci/* unlock by special command */ 168c2ecf20Sopenharmony_ci#define BLIST_KEY ((__force blist_flags_t)(1ULL << 3)) 178c2ecf20Sopenharmony_ci/* Do not use LUNs in parallel */ 188c2ecf20Sopenharmony_ci#define BLIST_SINGLELUN ((__force blist_flags_t)(1ULL << 4)) 198c2ecf20Sopenharmony_ci/* Buggy Tagged Command Queuing */ 208c2ecf20Sopenharmony_ci#define BLIST_NOTQ ((__force blist_flags_t)(1ULL << 5)) 218c2ecf20Sopenharmony_ci/* Non consecutive LUN numbering */ 228c2ecf20Sopenharmony_ci#define BLIST_SPARSELUN ((__force blist_flags_t)(1ULL << 6)) 238c2ecf20Sopenharmony_ci/* Avoid LUNS >= 5 */ 248c2ecf20Sopenharmony_ci#define BLIST_MAX5LUN ((__force blist_flags_t)(1ULL << 7)) 258c2ecf20Sopenharmony_ci/* Treat as (removable) CD-ROM */ 268c2ecf20Sopenharmony_ci#define BLIST_ISROM ((__force blist_flags_t)(1ULL << 8)) 278c2ecf20Sopenharmony_ci/* LUNs past 7 on a SCSI-2 device */ 288c2ecf20Sopenharmony_ci#define BLIST_LARGELUN ((__force blist_flags_t)(1ULL << 9)) 298c2ecf20Sopenharmony_ci/* override additional length field */ 308c2ecf20Sopenharmony_ci#define BLIST_INQUIRY_36 ((__force blist_flags_t)(1ULL << 10)) 318c2ecf20Sopenharmony_ci#define __BLIST_UNUSED_11 ((__force blist_flags_t)(1ULL << 11)) 328c2ecf20Sopenharmony_ci/* do not do automatic start on add */ 338c2ecf20Sopenharmony_ci#define BLIST_NOSTARTONADD ((__force blist_flags_t)(1ULL << 12)) 348c2ecf20Sopenharmony_ci#define __BLIST_UNUSED_13 ((__force blist_flags_t)(1ULL << 13)) 358c2ecf20Sopenharmony_ci#define __BLIST_UNUSED_14 ((__force blist_flags_t)(1ULL << 14)) 368c2ecf20Sopenharmony_ci#define __BLIST_UNUSED_15 ((__force blist_flags_t)(1ULL << 15)) 378c2ecf20Sopenharmony_ci#define __BLIST_UNUSED_16 ((__force blist_flags_t)(1ULL << 16)) 388c2ecf20Sopenharmony_ci/* try REPORT_LUNS even for SCSI-2 devs (if HBA supports more than 8 LUNs) */ 398c2ecf20Sopenharmony_ci#define BLIST_REPORTLUN2 ((__force blist_flags_t)(1ULL << 17)) 408c2ecf20Sopenharmony_ci/* don't try REPORT_LUNS scan (SCSI-3 devs) */ 418c2ecf20Sopenharmony_ci#define BLIST_NOREPORTLUN ((__force blist_flags_t)(1ULL << 18)) 428c2ecf20Sopenharmony_ci/* don't use PREVENT-ALLOW commands */ 438c2ecf20Sopenharmony_ci#define BLIST_NOT_LOCKABLE ((__force blist_flags_t)(1ULL << 19)) 448c2ecf20Sopenharmony_ci/* device is actually for RAID config */ 458c2ecf20Sopenharmony_ci#define BLIST_NO_ULD_ATTACH ((__force blist_flags_t)(1ULL << 20)) 468c2ecf20Sopenharmony_ci/* select without ATN */ 478c2ecf20Sopenharmony_ci#define BLIST_SELECT_NO_ATN ((__force blist_flags_t)(1ULL << 21)) 488c2ecf20Sopenharmony_ci/* retry HARDWARE_ERROR */ 498c2ecf20Sopenharmony_ci#define BLIST_RETRY_HWERROR ((__force blist_flags_t)(1ULL << 22)) 508c2ecf20Sopenharmony_ci/* maximum 512 sector cdb length */ 518c2ecf20Sopenharmony_ci#define BLIST_MAX_512 ((__force blist_flags_t)(1ULL << 23)) 528c2ecf20Sopenharmony_ci#define __BLIST_UNUSED_24 ((__force blist_flags_t)(1ULL << 24)) 538c2ecf20Sopenharmony_ci/* Disable T10 PI (DIF) */ 548c2ecf20Sopenharmony_ci#define BLIST_NO_DIF ((__force blist_flags_t)(1ULL << 25)) 558c2ecf20Sopenharmony_ci/* Ignore SBC-3 VPD pages */ 568c2ecf20Sopenharmony_ci#define BLIST_SKIP_VPD_PAGES ((__force blist_flags_t)(1ULL << 26)) 578c2ecf20Sopenharmony_ci#define __BLIST_UNUSED_27 ((__force blist_flags_t)(1ULL << 27)) 588c2ecf20Sopenharmony_ci/* Attempt to read VPD pages */ 598c2ecf20Sopenharmony_ci#define BLIST_TRY_VPD_PAGES ((__force blist_flags_t)(1ULL << 28)) 608c2ecf20Sopenharmony_ci/* don't try to issue RSOC */ 618c2ecf20Sopenharmony_ci#define BLIST_NO_RSOC ((__force blist_flags_t)(1ULL << 29)) 628c2ecf20Sopenharmony_ci/* maximum 1024 sector cdb length */ 638c2ecf20Sopenharmony_ci#define BLIST_MAX_1024 ((__force blist_flags_t)(1ULL << 30)) 648c2ecf20Sopenharmony_ci/* Use UNMAP limit for WRITE SAME */ 658c2ecf20Sopenharmony_ci#define BLIST_UNMAP_LIMIT_WS ((__force blist_flags_t)(1ULL << 31)) 668c2ecf20Sopenharmony_ci/* Always retry ABORTED_COMMAND with Internal Target Failure */ 678c2ecf20Sopenharmony_ci#define BLIST_RETRY_ITF ((__force blist_flags_t)(1ULL << 32)) 688c2ecf20Sopenharmony_ci/* Always retry ABORTED_COMMAND with ASC 0xc1 */ 698c2ecf20Sopenharmony_ci#define BLIST_RETRY_ASC_C1 ((__force blist_flags_t)(1ULL << 33)) 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci#define __BLIST_LAST_USED BLIST_RETRY_ASC_C1 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci#define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \ 748c2ecf20Sopenharmony_ci (__force blist_flags_t) \ 758c2ecf20Sopenharmony_ci ((__force __u64)__BLIST_LAST_USED - 1ULL))) 768c2ecf20Sopenharmony_ci#define __BLIST_UNUSED_MASK (__BLIST_UNUSED_11 | \ 778c2ecf20Sopenharmony_ci __BLIST_UNUSED_13 | \ 788c2ecf20Sopenharmony_ci __BLIST_UNUSED_14 | \ 798c2ecf20Sopenharmony_ci __BLIST_UNUSED_15 | \ 808c2ecf20Sopenharmony_ci __BLIST_UNUSED_16 | \ 818c2ecf20Sopenharmony_ci __BLIST_UNUSED_24 | \ 828c2ecf20Sopenharmony_ci __BLIST_UNUSED_27 | \ 838c2ecf20Sopenharmony_ci __BLIST_HIGH_UNUSED) 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci#endif 86