SAMV71 Xplained Ultra Software Package 1.5

SBC.h File Reference

Go to the source code of this file.

Data Structures

struct  _SBCInquiry
struct  _SBCInquiryData
struct  _SBCRead10
struct  SBCReadCapacity10
struct  SBCReadCapacity10Data
struct  SBCRequestSense
struct  SBCRequestSenseData
struct  _SBCTestUnitReady
 SBCTestUnitReady Data structure for the TEST UNIT READY command. More...
struct  SBCWrite10
struct  _SBCMediumRemoval
struct  _SBCModeSense6
struct  _SBCModeParameterHeader6
struct  _SBCInformationalExceptionsControl
struct  _SBCReadWriteErrorRecovery
union  SBCCommand

Defines

#define SBC_INQUIRY   0x12
#define SBC_READ_10   0x28
#define SBC_READ_CAPACITY_10   0x25
#define SBC_REQUEST_SENSE   0x03
#define SBC_TEST_UNIT_READY   0x00
#define SBC_WRITE_10   0x2A
#define SBC_PREVENT_ALLOW_MEDIUM_REMOVAL   0x1E
#define SBC_MODE_SENSE_6   0x1A
#define SBC_VERIFY_10   0x2F
#define SBC_READ_FORMAT_CAPACITIES   0x23
#define SBC_PERIPHERAL_DEVICE_CONNECTED   0x00
#define SBC_PERIPHERAL_DEVICE_NOT_CONNECTED   0x01
#define SBC_PERIPHERAL_DEVICE_NOT_SUPPORTED   0x03
#define SBC_DIRECT_ACCESS_BLOCK_DEVICE   0x00
#define SBC_SEQUENTIAL_ACCESS_DEVICE   0x01
#define SBC_PRINTER_DEVICE   0x02
#define SBC_PROCESSOR_DEVICE   0x03
#define SBC_WRITE_ONCE_DEVICE   0x04
#define SBC_CD_DVD_DEVICE   0x05
#define SBC_SCANNER_DEVICE   0x06
#define SBC_OPTICAL_MEMORY_DEVICE   0x07
#define SBC_MEDIA_CHANGER_DEVICE   0x08
#define SBC_COMMUNICATION_DEVICE   0x09
#define SBC_STORAGE_ARRAY_CONTROLLER_DEVICE   0x0C
#define SBC_ENCLOSURE_SERVICES_DEVICE   0x0D
#define SBC_SIMPLIFIED_DIRECT_ACCESS_DEVICE   0x0E
#define SBC_OPTICAL_CARD_READER_WRITER_DEVICE   0x0F
#define SBC_BRIDGE_CONTROLLER_COMMANDS   0x10
#define SBC_OBJECT_BASED_STORAGE_DEVICE   0x11
#define SBC_SPC_VERSION_4   0x06
 Version value for the SBC-3 specification.
#define SBC_TPGS_NONE   0x0
 Values for the TPGS field returned in INQUIRY data.
#define SBC_TPGS_ASYMMETRIC   0x1
#define SBC_TPGS_SYMMETRIC   0x2
#define SBC_TPGS_BOTH   0x3
#define SBC_VERSION_DESCRIPTOR_SBC_3   0x04C0
 Version descriptor value for the SBC-3 specification.
#define SBC_SENSE_DATA_FIXED_CURRENT   0x70
#define SBC_SENSE_DATA_FIXED_DEFERRED   0x71
#define SBC_SENSE_DATA_DESCRIPTOR_CURRENT   0x72
#define SBC_SENSE_DATA_DESCRIPTOR_DEFERRED   0x73
#define SBC_SENSE_RESPONSE_CODE_MASK   0x7F
#define SBC_SENSE_KEY_NO_SENSE   0x00
#define SBC_SENSE_KEY_RECOVERED_ERROR   0x01
#define SBC_SENSE_KEY_NOT_READY   0x02
#define SBC_SENSE_KEY_MEDIUM_ERROR   0x03
#define SBC_SENSE_KEY_HARDWARE_ERROR   0x04
#define SBC_SENSE_KEY_ILLEGAL_REQUEST   0x05
#define SBC_SENSE_KEY_UNIT_ATTENTION   0x06
#define SBC_SENSE_KEY_DATA_PROTECT   0x07
#define SBC_SENSE_KEY_BLANK_CHECK   0x08
#define SBC_SENSE_KEY_VENDOR_SPECIFIC   0x09
#define SBC_SENSE_KEY_COPY_ABORTED   0x0A
#define SBC_SENSE_KEY_ABORTED_COMMAND   0x0B
#define SBC_SENSE_KEY_VOLUME_OVERFLOW   0x0D
#define SBC_SENSE_KEY_MISCOMPARE   0x0E
#define SBC_ASC_LOGICAL_UNIT_NOT_READY   0x04
#define SBC_ASC_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE   0x21
#define SBC_ASC_INVALID_FIELD_IN_CDB   0x24
#define SBC_ASC_WRITE_PROTECTED   0x27
#define SBC_ASC_FORMAT_CORRUPTED   0x31
#define SBC_ASC_INVALID_COMMAND_OPERATION_CODE   0x20
#define SBC_ASC_TOO_MUCH_WRITE_DATA   0x26
#define SBC_ASC_NOT_READY_TO_READY_CHANGE   0x28
#define SBC_ASC_MEDIUM_NOT_PRESENT   0x3A
#define SBC_MEDIUM_TYPE_DIRECT_ACCESS_BLOCK_DEVICE   0x00
 MEDIUM TYPE field value for direct-access block devices.
#define SBC_MRIE_NO_REPORTING   0x00
 MRIE field values.
#define SBC_MRIE_ASYNCHRONOUS   0x01
#define SBC_MRIE_GENERATE_UNIT_ATTENTION   0x02
#define SBC_MRIE_COND_GENERATE_RECOVERED_ERROR   0x03
#define SBC_MRIE_UNCOND_GENERATE_RECOVERED_ERROR   0x04
#define SBC_MRIE_GENERATE_NO_SENSE   0x05
#define SBC_MRIE_ON_REQUEST   0x06
#define SBC_PAGE_READ_WRITE_ERROR_RECOVERY   0x01
 Supported mode pages.
#define SBC_PAGE_INFORMATIONAL_EXCEPTIONS_CONTROL   0x1C
#define SBC_PAGE_RETURN_ALL   0x3F
#define SBC_PAGE_VENDOR_SPECIFIC   0x00
#define WORDB(bytes)   ((unsigned short) ((bytes[0] << 8) | bytes[1]))
 Converts a byte array to a word value using the big endian format.
#define DWORDB(bytes)
 Converts a byte array to a dword value using the big endian format.
#define STORE_DWORDB(dword, bytes)
 Stores a dword value in a byte array, in big endian format.
#define STORE_WORDB(word, bytes)
 Stores a word value in a byte array, in big endian format.

Functions

struct _MSDConfigurationDescriptors __attribute__ ((__packed__)) SBCTestUnitReady
 SBCTestUnitReady Data structure for the TEST UNIT READY command.

Variables

unsigned char bOperationCode
unsigned char isEVPD
unsigned char bReserved1
unsigned char bPageCode
unsigned char pAllocationLength [2]
unsigned char bControl
unsigned char bPeripheralDeviceType
unsigned char bPeripheralQualifier
unsigned char isRMB
unsigned char bVersion
unsigned char bResponseDataFormat
unsigned char isHIGHSUP
unsigned char isNORMACA
unsigned char bObsolete1
unsigned char bAdditionalLength
unsigned char isSCCS
unsigned char isACC
unsigned char bTPGS
unsigned char is3PC
unsigned char bReserved2
unsigned char isProtect
unsigned char bObsolete2
unsigned char isEncServ
unsigned char isVS
unsigned char isMultiP
unsigned char bObsolete3
unsigned char bUnused1
unsigned char bUnused2
unsigned char isCmdQue
unsigned char isVS2
unsigned char pVendorID [8]
unsigned char pProductID [16]
unsigned char pProductRevisionLevel [4]
unsigned char pVendorSpecific [20]
unsigned char bUnused3
unsigned char bReserved3
unsigned short pVersionDescriptors [8]
unsigned char pReserved4 [22]
unsigned char isFUA_NV
unsigned char isFUA
unsigned char isDPO
unsigned char bRdProtect
unsigned char pLogicalBlockAddress [4]
unsigned char bGroupNumber
unsigned char pTransferLength [2]
unsigned char pReserved1 [4]
unsigned char bPrevent
unsigned char isDBD
unsigned char bPC
unsigned char bSubpageCode
unsigned char bAllocationLength
unsigned char bModeDataLength
unsigned char bMediumType
unsigned char isDPOFUA
unsigned char isWP
unsigned char bBlockDescriptorLength
unsigned char isSPF
unsigned char isPS
unsigned char bPageLength
unsigned char isLogErr
unsigned char isEBackErr
unsigned char isTest
unsigned char isDExcpt
unsigned char isEWasc
unsigned char isEBF
unsigned char isPerf
unsigned char bMRIE
unsigned char pIntervalTimer [4]
unsigned char pReportCount [4]
unsigned char isDCR
unsigned char isDTE
unsigned char isPER
unsigned char isEER
unsigned char isRC
unsigned char isTB
unsigned char isARRE
unsigned char isAWRE
unsigned char bReadRetryCount
unsigned char pObsolete1 [3]
unsigned char bWriteRetryCount
unsigned char pRecoveryTimeLimit [2]

Detailed Description

Purpose

SCSI definitions.

Usage

  1. After command block received, Access and decode the SCSI command block with SBCCommand structure.

Definition in file SBC.h.


Variable Documentation

unsigned char bAdditionalLength

Length of remaining INQUIRY data

Definition at line 424 of file SBC.h.

unsigned char bAllocationLength

Host buffer allocated size

Definition at line 584 of file SBC.h.

unsigned char bBlockDescriptorLength

Length of all block descriptors

Definition at line 600 of file SBC.h.

unsigned char bControl

0x00

Definition at line 377 of file SBC.h.

unsigned char bGroupNumber

Information grouping

Definition at line 445 of file SBC.h.

unsigned char bMediumType

Type of medium (SBC_MEDIUM_TYPE_DIRECT_ACCESS_BLOCK_DEVICE)

Definition at line 595 of file SBC.h.

unsigned char bModeDataLength

Length of mode data to follow

Definition at line 594 of file SBC.h.

unsigned char bMRIE

Method of reporting informational exceptions

Definition at line 632 of file SBC.h.

unsigned char bObsolete1

Obsolete bits

Obsolete bit

Definition at line 420 of file SBC.h.

unsigned char bObsolete2

Obsolete bit

Definition at line 431 of file SBC.h.

unsigned char bObsolete3

Obsolete bits

Definition at line 431 of file SBC.h.

unsigned char bOperationCode

0x12 : SBC_INQUIRY

0x28 : SBC_READ_10

0x00 : SBC_TEST_UNIT_READY

0x1E : SBC_PREVENT_ALLOW_MEDIUM_REMOVAL

0x1A : SBC_MODE_SENSE_6

Definition at line 372 of file SBC.h.

unsigned char bPageCode

Specifies the VPD to return

Mode page to return

0x1C : SBC_PAGE_INFORMATIONAL_EXCEPTIONS_CONTROL

0x01 : SBC_PAGE_READ_WRITE_ERROR_RECOVERY

Definition at line 375 of file SBC.h.

unsigned char bPageLength

Length of page data (0x0A)

Definition at line 623 of file SBC.h.

unsigned char bPC

Type of parameter values to return

Definition at line 581 of file SBC.h.

unsigned char bPeripheralDeviceType

Peripheral device type

Definition at line 415 of file SBC.h.

unsigned char bPeripheralQualifier

Peripheral qualifier

Definition at line 415 of file SBC.h.

unsigned char bPrevent

Accept/prohibit removal

Definition at line 560 of file SBC.h.

unsigned char bRdProtect

Protection information to send

Definition at line 438 of file SBC.h.

unsigned char bReadRetryCount

Number of retries when reading

Definition at line 660 of file SBC.h.

unsigned char bReserved1

Reserved bits

Reserved bit

Reserved byte

Definition at line 373 of file SBC.h.

unsigned char bReserved2

Reserved bits

Reserved byte

Definition at line 425 of file SBC.h.

unsigned char bReserved3

Reserved bits

Definition at line 445 of file SBC.h.

unsigned char bResponseDataFormat

Must be 0x2

Definition at line 420 of file SBC.h.

unsigned char bSubpageCode

Mode subpage to return

Definition at line 583 of file SBC.h.

unsigned char bTPGS

Target port support group

Definition at line 425 of file SBC.h.

unsigned char bUnused1

Unused feature

Definition at line 431 of file SBC.h.

unsigned char bUnused2

Unused features

Definition at line 437 of file SBC.h.

unsigned char bUnused3

Unused features

Definition at line 444 of file SBC.h.

unsigned char bVersion

SPC version used

Definition at line 419 of file SBC.h.

unsigned char bWriteRetryCount

Number of retries when writing

Definition at line 663 of file SBC.h.

unsigned char is3PC

Third-party copy supported ?

Definition at line 425 of file SBC.h.

unsigned char isACC

Access control coordinator ?

Definition at line 425 of file SBC.h.

unsigned char isARRE

Automatic read reallocation enabled bit

Definition at line 652 of file SBC.h.

unsigned char isAWRE

Automatic write reallocation enabled bit

Definition at line 652 of file SBC.h.

unsigned char isCmdQue

Task management model supported ?

Definition at line 437 of file SBC.h.

unsigned char isDBD

Disable block descriptors bit

Definition at line 578 of file SBC.h.

unsigned char isDCR

Disable correction bit

Definition at line 652 of file SBC.h.

unsigned char isDExcpt

Disable exception control bit

Definition at line 624 of file SBC.h.

unsigned char isDPO

Cache control bit

Definition at line 438 of file SBC.h.

unsigned char isDPOFUA

DPO/FUA bits supported ?

Definition at line 596 of file SBC.h.

unsigned char isDTE

Data terminate on error bit

Definition at line 652 of file SBC.h.

unsigned char isEBackErr

Enable background error bit

Definition at line 624 of file SBC.h.

unsigned char isEBF

Enable background function bit

Definition at line 624 of file SBC.h.

unsigned char isEER

Enable early recovery bit

Definition at line 652 of file SBC.h.

unsigned char isEncServ

Embedded enclosure service comp?

Definition at line 431 of file SBC.h.

unsigned char isEVPD

Type of requested data

Definition at line 373 of file SBC.h.

unsigned char isEWasc

Report warnings ?

Definition at line 624 of file SBC.h.

unsigned char isFUA

Cache control bit

Definition at line 438 of file SBC.h.

unsigned char isFUA_NV

Cache control bit

Definition at line 438 of file SBC.h.

unsigned char isHIGHSUP

Hierarchical addressing used ?

Definition at line 420 of file SBC.h.

unsigned char isLogErr

Should informational exceptions be logged ?

Definition at line 624 of file SBC.h.

unsigned char isMultiP

Multi-port device ?

Definition at line 431 of file SBC.h.

unsigned char isNORMACA

ACA attribute supported ?

Definition at line 420 of file SBC.h.

unsigned char isPER

Post error bit

Definition at line 652 of file SBC.h.

unsigned char isPerf

Delay acceptable when treating exceptions ?

Definition at line 624 of file SBC.h.

unsigned char isProtect

Protection info supported ?

Definition at line 425 of file SBC.h.

unsigned char isPS

Parameters savable ?

Definition at line 620 of file SBC.h.

unsigned char isRC

Read continuous bit

Definition at line 652 of file SBC.h.

unsigned char isRMB

Is media removable ?

Definition at line 417 of file SBC.h.

unsigned char isSCCS

Embedded SCC ?

Definition at line 425 of file SBC.h.

unsigned char isSPF

Page or subpage data format

Definition at line 620 of file SBC.h.

unsigned char isTB

Transfer block bit

Definition at line 652 of file SBC.h.

unsigned char isTest

Create a device test failure ?

Definition at line 624 of file SBC.h.

unsigned char isVS

???

Definition at line 431 of file SBC.h.

unsigned char isVS2

???

Definition at line 437 of file SBC.h.

unsigned char isWP

Is medium write-protected ?

Definition at line 596 of file SBC.h.

unsigned char pAllocationLength[2]

Size of host buffer

Definition at line 376 of file SBC.h.

unsigned char pIntervalTimer[4]

Error reporting period

Definition at line 634 of file SBC.h.

unsigned char pLogicalBlockAddress[4]

Index of first block to read

Definition at line 444 of file SBC.h.

unsigned char pObsolete1[3]

Obsolete bytes

Definition at line 661 of file SBC.h.

unsigned char pProductID[16]

Vendor-defined product ID

Definition at line 441 of file SBC.h.

unsigned char pProductRevisionLevel[4]

Vendor-defined product revision

Definition at line 442 of file SBC.h.

unsigned char pRecoveryTimeLimit[2]

Maximum time duration for error recovery

Definition at line 665 of file SBC.h.

unsigned char pReportCount[4]

Maximum number of time a report can be issued

Definition at line 635 of file SBC.h.

unsigned char pReserved1

Reserved bits

Reserved bytes

Definition at line 522 of file SBC.h.

unsigned char pReserved4[22]

Reserved bytes

Definition at line 447 of file SBC.h.

unsigned char pTransferLength[2]

Number of blocks to transmit

Definition at line 447 of file SBC.h.

unsigned char pVendorID[8]

T10 vendor identification

Definition at line 440 of file SBC.h.

unsigned char pVendorSpecific[20]

Vendor-specific data

Definition at line 443 of file SBC.h.

unsigned short pVersionDescriptors[8]

Standards the device complies to

Definition at line 446 of file SBC.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines