blob: ea67c32e870e9c330d3d89b1a9a1366077869809 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef _SCSI_SCSI_DEVINFO_H
3#define _SCSI_SCSI_DEVINFO_H
4/*
5 * Flags for SCSI devices that need special treatment
6 */
Hannes Reineckef26aead2017-10-02 16:26:35 +02007
8/* Only scan LUN 0 */
Hannes Reinecke5ebde462017-11-15 12:07:30 +01009#define BLIST_NOLUN ((__force blist_flags_t)(1 << 0))
Hannes Reineckef26aead2017-10-02 16:26:35 +020010/* Known to have LUNs, force scanning.
11 * DEPRECATED: Use max_luns=N */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010012#define BLIST_FORCELUN ((__force blist_flags_t)(1 << 1))
Hannes Reineckef26aead2017-10-02 16:26:35 +020013/* Flag for broken handshaking */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010014#define BLIST_BORKEN ((__force blist_flags_t)(1 << 2))
Hannes Reineckef26aead2017-10-02 16:26:35 +020015/* unlock by special command */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010016#define BLIST_KEY ((__force blist_flags_t)(1 << 3))
Hannes Reineckef26aead2017-10-02 16:26:35 +020017/* Do not use LUNs in parallel */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010018#define BLIST_SINGLELUN ((__force blist_flags_t)(1 << 4))
Hannes Reineckef26aead2017-10-02 16:26:35 +020019/* Buggy Tagged Command Queuing */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010020#define BLIST_NOTQ ((__force blist_flags_t)(1 << 5))
Hannes Reineckef26aead2017-10-02 16:26:35 +020021/* Non consecutive LUN numbering */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010022#define BLIST_SPARSELUN ((__force blist_flags_t)(1 << 6))
Hannes Reineckef26aead2017-10-02 16:26:35 +020023/* Avoid LUNS >= 5 */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010024#define BLIST_MAX5LUN ((__force blist_flags_t)(1 << 7))
Hannes Reineckef26aead2017-10-02 16:26:35 +020025/* Treat as (removable) CD-ROM */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010026#define BLIST_ISROM ((__force blist_flags_t)(1 << 8))
Hannes Reineckef26aead2017-10-02 16:26:35 +020027/* LUNs past 7 on a SCSI-2 device */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010028#define BLIST_LARGELUN ((__force blist_flags_t)(1 << 9))
Hannes Reineckef26aead2017-10-02 16:26:35 +020029/* override additional length field */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010030#define BLIST_INQUIRY_36 ((__force blist_flags_t)(1 << 10))
Hannes Reineckef26aead2017-10-02 16:26:35 +020031/* do not do automatic start on add */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010032#define BLIST_NOSTARTONADD ((__force blist_flags_t)(1 << 12))
Hannes Reineckef26aead2017-10-02 16:26:35 +020033/* try REPORT_LUNS even for SCSI-2 devs (if HBA supports more than 8 LUNs) */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010034#define BLIST_REPORTLUN2 ((__force blist_flags_t)(1 << 17))
Hannes Reineckef26aead2017-10-02 16:26:35 +020035/* don't try REPORT_LUNS scan (SCSI-3 devs) */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010036#define BLIST_NOREPORTLUN ((__force blist_flags_t)(1 << 18))
Hannes Reineckef26aead2017-10-02 16:26:35 +020037/* don't use PREVENT-ALLOW commands */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010038#define BLIST_NOT_LOCKABLE ((__force blist_flags_t)(1 << 19))
Hannes Reineckef26aead2017-10-02 16:26:35 +020039/* device is actually for RAID config */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010040#define BLIST_NO_ULD_ATTACH ((__force blist_flags_t)(1 << 20))
Hannes Reineckef26aead2017-10-02 16:26:35 +020041/* select without ATN */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010042#define BLIST_SELECT_NO_ATN ((__force blist_flags_t)(1 << 21))
Hannes Reineckef26aead2017-10-02 16:26:35 +020043/* retry HARDWARE_ERROR */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010044#define BLIST_RETRY_HWERROR ((__force blist_flags_t)(1 << 22))
Hannes Reineckef26aead2017-10-02 16:26:35 +020045/* maximum 512 sector cdb length */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010046#define BLIST_MAX_512 ((__force blist_flags_t)(1 << 23))
Hannes Reineckef26aead2017-10-02 16:26:35 +020047/* Disable T10 PI (DIF) */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010048#define BLIST_NO_DIF ((__force blist_flags_t)(1 << 25))
Hannes Reineckef26aead2017-10-02 16:26:35 +020049/* Ignore SBC-3 VPD pages */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010050#define BLIST_SKIP_VPD_PAGES ((__force blist_flags_t)(1 << 26))
Hannes Reineckef26aead2017-10-02 16:26:35 +020051/* Attempt to read VPD pages */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010052#define BLIST_TRY_VPD_PAGES ((__force blist_flags_t)(1 << 28))
Hannes Reineckef26aead2017-10-02 16:26:35 +020053/* don't try to issue RSOC */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010054#define BLIST_NO_RSOC ((__force blist_flags_t)(1 << 29))
Hannes Reineckef26aead2017-10-02 16:26:35 +020055/* maximum 1024 sector cdb length */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010056#define BLIST_MAX_1024 ((__force blist_flags_t)(1 << 30))
Linus Torvalds670ffcc2017-11-14 16:23:44 -080057/* Use UNMAP limit for WRITE SAME */
Hannes Reinecke5ebde462017-11-15 12:07:30 +010058#define BLIST_UNMAP_LIMIT_WS ((__force blist_flags_t)(1 << 31))
Janusz Dziemidowicz02134362014-07-24 15:48:46 +020059
Linus Torvalds1da177e2005-04-16 15:20:36 -070060#endif