Microchip® Advanced Software Framework

sbc_protocol.h File Reference

SCSI Block Commands.

This file contains definitions of some of the commands found in the SCSI SBC-2 standard.

Note that the SBC specification depends on several commands defined by the SCSI Primary Commands (SPC) standard. Each version of the SBC standard is meant to be used in conjunction with a specific version of the SPC standard, as follows:

  • SBC depends on SPC
  • SBC-2 depends on SPC-3
  • SBC-3 depends on SPC-4

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

Data Structures

struct  sbc_caching_mode_page
 SBC-2 Caching mode page. More...
 
struct  sbc_rdwr_error_recovery_mode_page
 SBC-2 Read-Write Error Recovery mode page. More...
 
struct  sbc_read_capacity10_data
 SBC-2 READ CAPACITY (10) parameter data. More...
 
struct  sbc_slba_block_desc
 SBC-2 Short LBA mode parameter block descriptor. More...
 

Macros

#define SBC_MP_CACHE_ABPF   (1 << 6)
 Abort Pre-Fetch. More...
 
#define SBC_MP_CACHE_CAP   (1 << 5)
 Catching Analysis Permitted. More...
 
#define SBC_MP_CACHE_DISC   (1 << 4)
 Discontinuity. More...
 
#define SBC_MP_CACHE_DRA   (1 << 5)
 Disable Read-Ahead. More...
 
#define SBC_MP_CACHE_FSW   (1 << 7)
 Force Sequential Write. More...
 
#define SBC_MP_CACHE_IC   (1 << 7)
 Initiator Control. More...
 
#define SBC_MP_CACHE_LBCSS   (1 << 6)
 Logical Blk Cache Seg Sz. More...
 
#define SBC_MP_CACHE_MF   (1 << 1)
 Multiplication Factor. More...
 
#define SBC_MP_CACHE_NV_DIS   (1 << 0)
 Non-Volatile Cache Disable. More...
 
#define SBC_MP_CACHE_RCD   (1 << 0)
 Read Cache Disable. More...
 
#define SBC_MP_CACHE_SIZE   (1 << 3)
 Size enable. More...
 
#define SBC_MP_CACHE_WCE   (1 << 2)
 Write back Cache Enable. More...
 
#define SBC_MP_RW_ERR_RECOV_ARRE   (1 << 6)
 
#define SBC_MP_RW_ERR_RECOV_AWRE   (1 << 7)
 
#define SBC_MP_RW_ERR_RECOV_DCR   (1 << 0)
 
#define SBC_MP_RW_ERR_RECOV_DTE   (1 << 1)
 
#define SBC_MP_RW_ERR_RECOV_ERR   (1 << 3)
 
#define SBC_MP_RW_ERR_RECOV_PER   (1 << 2)
 
#define SBC_MP_RW_ERR_RECOV_RC   (1 << 4)
 
#define SBC_MP_RW_ERR_RECOV_TB   (1 << 5)
 
#define SBC_SLBA_BLOCK_LEN_MASK   0x00FFFFFFU
 Mask reserved bits. More...
 
#define SPC_MP_RW_ERR_RECOV_PAGE_LENGTH   0x0A
 
SCSI commands defined by SBC-2
#define SBC_FORMAT_UNIT   0x04
 
#define SBC_READ6   0x08
 
#define SBC_WRITE6   0x0A
 
#define SBC_START_STOP_UNIT   0x1B
 
#define SBC_READ_CAPACITY10   0x25
 
#define SBC_READ10   0x28
 
#define SBC_WRITE10   0x2A
 
#define SBC_VERIFY10   0x2F
 
SBC-2 Device-Specific Parameter
#define SCSI_MS_SBC_WP   0x80
 Write Protected. More...
 
#define SCSI_MS_SBC_DPOFUA   0x10
 DPO and FUA supported. More...
 

Enumerations

SBC-2 Mode page definitions
enum  scsi_sbc_mode {
  SCSI_MS_MODE_RW_ERR_RECOV = 0x01,
  SCSI_MS_MODE_FORMAT_DEVICE = 0x03,
  SCSI_MS_MODE_FLEXIBLE_DISK = 0x05,
  SCSI_MS_MODE_CACHING = 0x08
}
 

#define SBC_MP_CACHE_ABPF   (1 << 6)

Abort Pre-Fetch.

#define SBC_MP_CACHE_CAP   (1 << 5)

Catching Analysis Permitted.

#define SBC_MP_CACHE_DISC   (1 << 4)

Discontinuity.

#define SBC_MP_CACHE_DRA   (1 << 5)

Disable Read-Ahead.

#define SBC_MP_CACHE_FSW   (1 << 7)

Force Sequential Write.

#define SBC_MP_CACHE_IC   (1 << 7)

Initiator Control.

#define SBC_MP_CACHE_LBCSS   (1 << 6)

Logical Blk Cache Seg Sz.

#define SBC_MP_CACHE_MF   (1 << 1)

Multiplication Factor.

#define SBC_MP_CACHE_NV_DIS   (1 << 0)

Non-Volatile Cache Disable.

#define SBC_MP_CACHE_RCD   (1 << 0)

Read Cache Disable.

#define SBC_MP_CACHE_SIZE   (1 << 3)

Size enable.

#define SBC_MP_CACHE_WCE   (1 << 2)

Write back Cache Enable.

#define SBC_MP_RW_ERR_RECOV_ARRE   (1 << 6)
#define SBC_MP_RW_ERR_RECOV_AWRE   (1 << 7)
#define SBC_MP_RW_ERR_RECOV_DCR   (1 << 0)
#define SBC_MP_RW_ERR_RECOV_DTE   (1 << 1)
#define SBC_MP_RW_ERR_RECOV_ERR   (1 << 3)
#define SBC_MP_RW_ERR_RECOV_PER   (1 << 2)
#define SBC_MP_RW_ERR_RECOV_RC   (1 << 4)
#define SBC_MP_RW_ERR_RECOV_TB   (1 << 5)
#define SBC_SLBA_BLOCK_LEN_MASK   0x00FFFFFFU

Mask reserved bits.

#define SPC_MP_RW_ERR_RECOV_PAGE_LENGTH   0x0A