- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

# include/scsi/sbc_protocol.h

Go to the documentation of this file.

    00001
    00044 #ifndef SCSI_SBC_PROTOCOL_H_INCLUDED
    00045 #define SCSI_SBC_PROTOCOL_H_INCLUDED
    00046
    00048
    00049 #define SCSI_CMD_FORMAT_UNIT            0x04
    00050 #define SCSI_CMD_READ6                  0x08
    00051 #define SCSI_CMD_WRITE6                 0x0a
    00052 #define SCSI_CMD_START_STOP_UNIT        0x1b
    00053 #define SCSI_CMD_READ_CAPACITY10        0x25
    00054 #define SCSI_CMD_READ10                 0x28
    00055 #define SCSI_CMD_WRITE10                0x2a
    00056 #define SCSI_CMD_VERIFY10               0x2f
    00057
    00058
    00060
    00061
    00062 enum scsi_sbc_mode_page_code {
    00063         SCSI_MS_PAGE_CACHING            = 0x08,
    00064 };
    00065
    00067
    00068 #define SCSI_MS_SBC_WP                  0x80
    00069 #define SCSI_MS_SBC_DPOFUA              0x10
    00070
    00071
    00072
    00075 struct sbc_slba_block_desc {
    00076         be32_t  nr_blocks;
    00077         be32_t  block_len;
    00078 #define SBC_SLBA_BLOCK_LEN_MASK 0x00ffffffU
    00079 };
    00080
    00084 struct sbc_caching_mode_page {
    00085         uint8_t page_code;
    00086         uint8_t page_length;
    00087         uint8_t flags2;
    00088 #define SBC_MP_CACHE_IC         (1 << 7)
    00089 #define SBC_MP_CACHE_ABPF       (1 << 6)
    00090 #define SBC_MP_CACHE_CAP        (1 << 5)
    00091 #define SBC_MP_CACHE_DISC       (1 << 4)
    00092 #define SBC_MP_CACHE_SIZE       (1 << 3)
    00093 #define SBC_MP_CACHE_WCE        (1 << 2)
    00094 #define SBC_MP_CACHE_MF         (1 << 1)
    00095 #define SBC_MP_CACHE_RCD        (1 << 0)
    00096         uint8_t retention;
    00097         be16_t  dis_pf_transfer_len;
    00098         be16_t  min_prefetch;
    00099         be16_t  max_prefetch;
    00100         be16_t  max_prefetch_ceil;
    00101         uint8_t flags12;
    00102 #define SBC_MP_CACHE_FSW        (1 << 7)
    00103 #define SBC_MP_CACHE_LBCSS      (1 << 6)
    00104 #define SBC_MP_CACHE_DRA        (1 << 5)
    00105 #define SBC_MP_CACHE_NV_DIS     (1 << 0)
    00106         uint8_t nr_cache_segments;
    00107         be16_t  cache_segment_size;
    00108         uint8_t reserved[4];
    00109 };
    00110
    00112
    00116 struct sbc_read_capacity10_data {
    00117         be32_t  max_lba;
    00118         be32_t  block_len;
    00119 };
    00120
    00121 #endif /* SCSI_SBC_PROTOCOL_H_INCLUDED */