scsi

package
v0.0.0-...-5fb8a3f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

INCITS 502 Revision 19 / SPC-5 R19

Index

Constants

View Source
const (
	SPC1 = 0x03
	SPC2 = 0x04
	SPC3 = 0x05
	SPC4 = 0x06
	SPC5 = 0x07
)
View Source
const (
	SG_IO                = 0x2285
	SG_DXFER_NONE        = -0x1
	SG_DXFER_TO_DEV      = -0x2
	SG_DXFER_FROM_DEV    = -0x3
	SG_DXFER_TO_FROM_DEV = -0x4
)
View Source
const (
	// AllSectors is a magic sector number indicating that it applies to all
	// sectors on the track.
	AllSectors = math.MaxUint16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalSenseCode

type AdditionalSenseCode uint16

AdditionalSenseCode contains the additional sense key and qualifier in one 16-bit value. The high 8 bits are the sense key, the bottom 8 bits the qualifier.

const (
	NoAdditionalSenseInformation                            AdditionalSenseCode = 0x0000
	FilemarkDetected                                        AdditionalSenseCode = 0x0001
	EndOfPartitionmediumDetected                            AdditionalSenseCode = 0x0002
	SetmarkDetected                                         AdditionalSenseCode = 0x0003
	BeginningOfPartitionmediumDetected                      AdditionalSenseCode = 0x0004
	EndOfDataDetected                                       AdditionalSenseCode = 0x0005
	IoProcessTerminated                                     AdditionalSenseCode = 0x0006
	ProgrammableEarlyWarningDetected                        AdditionalSenseCode = 0x0007
	AudioPlayOperationInProgress                            AdditionalSenseCode = 0x0011
	AudioPlayOperationPaused                                AdditionalSenseCode = 0x0012
	AudioPlayOperationSuccessfullyCompleted                 AdditionalSenseCode = 0x0013
	AudioPlayOperationStoppedDueToError                     AdditionalSenseCode = 0x0014
	NoCurrentAudioStatusToReturn                            AdditionalSenseCode = 0x0015
	OperationInProgress                                     AdditionalSenseCode = 0x0016
	CleaningRequested                                       AdditionalSenseCode = 0x0017
	EraseOperationInProgress                                AdditionalSenseCode = 0x0018
	LocateOperationInProgress                               AdditionalSenseCode = 0x0019
	RewindOperationInProgress                               AdditionalSenseCode = 0x001a
	SetCapacityOperationInProgress                          AdditionalSenseCode = 0x001b
	VerifyOperationInProgress                               AdditionalSenseCode = 0x001c
	AtaPassThroughInformationAvailable                      AdditionalSenseCode = 0x001d
	ConflictingSaCreationRequest                            AdditionalSenseCode = 0x001e
	LogicalUnitTransitioningToAnotherPowerCondition         AdditionalSenseCode = 0x001f
	ExtendedCopyInformationAvailable                        AdditionalSenseCode = 0x0020
	AtomicCommandAbortedDueToAca                            AdditionalSenseCode = 0x0021
	DeferredMicrocodeIsPending                              AdditionalSenseCode = 0x0022
	NoIndexsectorSignal                                     AdditionalSenseCode = 0x0100
	NoSeekComplete                                          AdditionalSenseCode = 0x0200
	PeripheralDeviceWriteFault                              AdditionalSenseCode = 0x0300
	NoWriteCurrent                                          AdditionalSenseCode = 0x0301
	ExcessiveWriteErrors                                    AdditionalSenseCode = 0x0302
	LogicalUnitNotReadyCauseNotReportable                   AdditionalSenseCode = 0x0400
	LogicalUnitIsInProcessOfBecomingReady                   AdditionalSenseCode = 0x0401
	LogicalUnitNotReadyInitializingCommandRequired          AdditionalSenseCode = 0x0402
	LogicalUnitNotReadyManualInterventionRequired           AdditionalSenseCode = 0x0403
	LogicalUnitNotReadyFormatInProgress                     AdditionalSenseCode = 0x0404
	LogicalUnitNotReadyRebuildInProgress                    AdditionalSenseCode = 0x0405
	LogicalUnitNotReadyRecalculationInProgress              AdditionalSenseCode = 0x0406
	LogicalUnitNotReadyOperationInProgress                  AdditionalSenseCode = 0x0407
	LogicalUnitNotReadyLongWriteInProgress                  AdditionalSenseCode = 0x0408
	LogicalUnitNotReadySelfTestInProgress                   AdditionalSenseCode = 0x0409
	LogicalUnitNotAccessibleAsymmetricAccessStateTransition AdditionalSenseCode = 0x040a
	LogicalUnitNotAccessibleTargetPortInStandbyState        AdditionalSenseCode = 0x040b
	LogicalUnitNotAccessibleTargetPortInUnavailableState    AdditionalSenseCode = 0x040c
	LogicalUnitNotReadyStructureCheckRequired               AdditionalSenseCode = 0x040d
	LogicalUnitNotReadySecuritySessionInProgress            AdditionalSenseCode = 0x040e
	LogicalUnitNotReadyAuxiliaryMemoryNotAccessible         AdditionalSenseCode = 0x0410
	LogicalUnitNotReadyNotifyenableSpinupRequired           AdditionalSenseCode = 0x0411
	LogicalUnitNotReadyOffline                              AdditionalSenseCode = 0x0412
	LogicalUnitNotReadySaCreationInProgress                 AdditionalSenseCode = 0x0413
	LogicalUnitNotReadySpaceAllocationInProgress            AdditionalSenseCode = 0x0414
	LogicalUnitNotReadyRoboticsDisabled                     AdditionalSenseCode = 0x0415
	LogicalUnitNotReadyConfigurationRequired                AdditionalSenseCode = 0x0416
	LogicalUnitNotReadyCalibrationRequired                  AdditionalSenseCode = 0x0417
	LogicalUnitNotReadyADoorIsOpen                          AdditionalSenseCode = 0x0418
	LogicalUnitNotReadyOperatingInSequentialMode            AdditionalSenseCode = 0x0419
	LogicalUnitNotReadyStartStopUnitCommandInProgress       AdditionalSenseCode = 0x041a
	LogicalUnitNotReadySanitizeInProgress                   AdditionalSenseCode = 0x041b
	LogicalUnitNotReadyAdditionalPowerUseNotYetGranted      AdditionalSenseCode = 0x041c
	LogicalUnitNotReadyConfigurationInProgress              AdditionalSenseCode = 0x041d
	LogicalUnitNotReadyMicrocodeActivationRequired          AdditionalSenseCode = 0x041e
	LogicalUnitNotReadyMicrocodeDownloadRequired            AdditionalSenseCode = 0x041f
	LogicalUnitNotReadyLogicalUnitResetRequired             AdditionalSenseCode = 0x0420
	LogicalUnitNotReadyHardResetRequired                    AdditionalSenseCode = 0x0421
	LogicalUnitNotReadyPowerCycleRequired                   AdditionalSenseCode = 0x0422
	LogicalUnitNotReadyAffiliationRequired                  AdditionalSenseCode = 0x0423
	DepopulationInProgress                                  AdditionalSenseCode = 0x0424
	LogicalUnitDoesNotRespondToSelection                    AdditionalSenseCode = 0x0500
	NoReferencePositionFound                                AdditionalSenseCode = 0x0600
	MultiplePeripheralDevicesSelected                       AdditionalSenseCode = 0x0700
	LogicalUnitCommunicationFailure                         AdditionalSenseCode = 0x0800
	LogicalUnitCommunicationTimeOut                         AdditionalSenseCode = 0x0801
	LogicalUnitCommunicationParityError                     AdditionalSenseCode = 0x0802
	LogicalUnitCommunicationCrcErrorultraDma32              AdditionalSenseCode = 0x0803
	UnreachableCopyTarget                                   AdditionalSenseCode = 0x0804
	TrackFollowingError                                     AdditionalSenseCode = 0x0900
	TrackingServoFailure                                    AdditionalSenseCode = 0x0901
	FocusServoFailure                                       AdditionalSenseCode = 0x0902
	SpindleServoFailure                                     AdditionalSenseCode = 0x0903
	HeadSelectFault                                         AdditionalSenseCode = 0x0904
	VibrationInducedTrackingError                           AdditionalSenseCode = 0x0905
	ErrorLogOverflow                                        AdditionalSenseCode = 0x0a00
	Warning                                                 AdditionalSenseCode = 0x0b00
	WarningSpecifiedTemperatureExceeded                     AdditionalSenseCode = 0x0b01
	WarningEnclosureDegraded                                AdditionalSenseCode = 0x0b02
	WarningBackgroundSelfTestFailed                         AdditionalSenseCode = 0x0b03
	WarningBackgroundPreScanDetectedMediumError             AdditionalSenseCode = 0x0b04
	WarningBackgroundMediumScanDetectedMediumError          AdditionalSenseCode = 0x0b05
	WarningNonVolatileCacheNowVolatile                      AdditionalSenseCode = 0x0b06
	WarningDegradedPowerToNonVolatileCache                  AdditionalSenseCode = 0x0b07
	WarningPowerLossExpected                                AdditionalSenseCode = 0x0b08
	WarningDeviceStatisticsNotificationActive               AdditionalSenseCode = 0x0b09
	WarningHighCriticalTemperatureLimitExceeded             AdditionalSenseCode = 0x0b0a
	WarningLowCriticalTemperatureLimitExceeded              AdditionalSenseCode = 0x0b0b
	WarningHighOperatingTemperatureLimitExceeded            AdditionalSenseCode = 0x0b0c
	WarningLowOperatingTemperatureLimitExceeded             AdditionalSenseCode = 0x0b0d
	WarningHighCriticalHumidityLimitExceeded                AdditionalSenseCode = 0x0b0e
	WarningLowCriticalHumidityLimitExceeded                 AdditionalSenseCode = 0x0b0f
	WarningHighOperatingHumidityLimitExceeded               AdditionalSenseCode = 0x0b10
	WarningLowOperatingHumidityLimitExceeded                AdditionalSenseCode = 0x0b11
	WarningMicrocodeSecurityAtRisk                          AdditionalSenseCode = 0x0b12
	WarningMicrocodeDigitalSignatureValidationFailure       AdditionalSenseCode = 0x0b13
	WarningPhysicalElementStatusChange                      AdditionalSenseCode = 0x0b14
	WriteError                                              AdditionalSenseCode = 0x0c00
	WriteErrorRecoveredWithAutoReallocation                 AdditionalSenseCode = 0x0c01
	WriteErrorAutoReallocationFailed                        AdditionalSenseCode = 0x0c02
	WriteErrorRecommendReassignment                         AdditionalSenseCode = 0x0c03
	CompressionCheckMiscompareError                         AdditionalSenseCode = 0x0c04
	DataExpansionOccurredDuringCompression                  AdditionalSenseCode = 0x0c05
	BlockNotCompressible                                    AdditionalSenseCode = 0x0c06
	WriteErrorRecoveryNeeded                                AdditionalSenseCode = 0x0c07
	WriteErrorRecoveryFailed                                AdditionalSenseCode = 0x0c08
	WriteErrorLossOfStreaming                               AdditionalSenseCode = 0x0c09
	WriteErrorPaddingBlocksAdded                            AdditionalSenseCode = 0x0c0a
	AuxiliaryMemoryWriteError                               AdditionalSenseCode = 0x0c0b
	WriteErrorUnexpectedUnsolicitedData                     AdditionalSenseCode = 0x0c0c
	WriteErrorNotEnoughUnsolicitedData                      AdditionalSenseCode = 0x0c0d
	MultipleWriteErrors                                     AdditionalSenseCode = 0x0c0e
	DefectsInErrorWindow                                    AdditionalSenseCode = 0x0c0f
	IncompleteMultipleAtomicWriteOperations                 AdditionalSenseCode = 0x0c10
	WriteErrorRecoveryScanNeeded                            AdditionalSenseCode = 0x0c11
	WriteErrorInsufficientZoneResources                     AdditionalSenseCode = 0x0c12
	ErrorDetectedByThirdPartyTemporaryInitiator             AdditionalSenseCode = 0x0d00
	ThirdPartyDeviceFailure                                 AdditionalSenseCode = 0x0d01
	CopyTargetDeviceNotReachable                            AdditionalSenseCode = 0x0d02
	IncorrectCopyTargetDeviceType                           AdditionalSenseCode = 0x0d03
	CopyTargetDeviceDataUnderrun                            AdditionalSenseCode = 0x0d04
	CopyTargetDeviceDataOverrun                             AdditionalSenseCode = 0x0d05
	InvalidInformationUnit                                  AdditionalSenseCode = 0x0e00
	InformationUnitTooShort                                 AdditionalSenseCode = 0x0e01
	InformationUnitTooLong                                  AdditionalSenseCode = 0x0e02
	InvalidFieldInCommandInformationUnit                    AdditionalSenseCode = 0x0e03
	IdCrcOrEccError                                         AdditionalSenseCode = 0x1000
	LogicalBlockGuardCheckFailed                            AdditionalSenseCode = 0x1001
	LogicalBlockApplicationTagCheckFailed                   AdditionalSenseCode = 0x1002
	LogicalBlockReferenceTagCheckFailed                     AdditionalSenseCode = 0x1003
	LogicalBlockProtectionErrorOnRecoverBufferedData        AdditionalSenseCode = 0x1004
	LogicalBlockProtectionMethodError                       AdditionalSenseCode = 0x1005
	UnrecoveredReadError                                    AdditionalSenseCode = 0x1100
	ReadRetriesExhausted                                    AdditionalSenseCode = 0x1101
	ErrorTooLongToCorrect                                   AdditionalSenseCode = 0x1102
	MultipleReadErrors                                      AdditionalSenseCode = 0x1103
	UnrecoveredReadErrorAutoReallocateFailed                AdditionalSenseCode = 0x1104
	LEcUncorrectableError                                   AdditionalSenseCode = 0x1105
	CircUnrecoveredError                                    AdditionalSenseCode = 0x1106
	DataReSynchronizationError                              AdditionalSenseCode = 0x1107
	IncompleteBlockRead                                     AdditionalSenseCode = 0x1108
	NoGapFound                                              AdditionalSenseCode = 0x1109
	MiscorrectedError                                       AdditionalSenseCode = 0x110a
	UnrecoveredReadErrorRecommendReassignment               AdditionalSenseCode = 0x110b
	UnrecoveredReadErrorRecommendRewriteTheData             AdditionalSenseCode = 0x110c
	DeCompressionCrcError                                   AdditionalSenseCode = 0x110d
	CannotDecompressUsingDeclaredAlgorithm                  AdditionalSenseCode = 0x110e
	ErrorReadingUpceanNumber                                AdditionalSenseCode = 0x110f
	ErrorReadingIsrcNumber                                  AdditionalSenseCode = 0x1110
	ReadErrorLossOfStreaming                                AdditionalSenseCode = 0x1111
	AuxiliaryMemoryReadError                                AdditionalSenseCode = 0x1112
	ReadErrorFailedRetransmissionRequest                    AdditionalSenseCode = 0x1113
	ReadErrorLbaMarkedBadByApplicationClient                AdditionalSenseCode = 0x1114
	WriteAfterSanitizeRequired                              AdditionalSenseCode = 0x1115
	AddressMarkNotFoundForIdField                           AdditionalSenseCode = 0x1200
	AddressMarkNotFoundForDataField                         AdditionalSenseCode = 0x1300
	RecordedEntityNotFound                                  AdditionalSenseCode = 0x1400
	RecordNotFound                                          AdditionalSenseCode = 0x1401
	FilemarkOrSetmarkNotFound                               AdditionalSenseCode = 0x1402
	EndOfDataNotFound                                       AdditionalSenseCode = 0x1403
	BlockSequenceError                                      AdditionalSenseCode = 0x1404
	RecordNotFoundRecommendReassignment                     AdditionalSenseCode = 0x1405
	RecordNotFoundDataAutoReallocated                       AdditionalSenseCode = 0x1406
	LocateOperationFailure                                  AdditionalSenseCode = 0x1407
	RandomPositioningError                                  AdditionalSenseCode = 0x1500
	MechanicalPositioningError                              AdditionalSenseCode = 0x1501
	PositioningErrorDetectedByReadOfMedium                  AdditionalSenseCode = 0x1502
	DataSynchronizationMarkError                            AdditionalSenseCode = 0x1600
	DataSyncErrorDataRewritten                              AdditionalSenseCode = 0x1601
	DataSyncErrorRecommendRewrite                           AdditionalSenseCode = 0x1602
	DataSyncErrorDataAutoReallocated                        AdditionalSenseCode = 0x1603
	DataSyncErrorRecommendReassignment                      AdditionalSenseCode = 0x1604
	RecoveredDataWithNoErrorCorrectionApplied               AdditionalSenseCode = 0x1700
	RecoveredDataWithRetries                                AdditionalSenseCode = 0x1701
	RecoveredDataWithPositiveHeadOffset                     AdditionalSenseCode = 0x1702
	RecoveredDataWithNegativeHeadOffset                     AdditionalSenseCode = 0x1703
	RecoveredDataWithRetriesAndorCircApplied                AdditionalSenseCode = 0x1704
	RecoveredDataUsingPreviousSectorId                      AdditionalSenseCode = 0x1705
	RecoveredDataWithoutEccDataAutoReallocated              AdditionalSenseCode = 0x1706
	RecoveredDataWithoutEccRecommendReassignment            AdditionalSenseCode = 0x1707
	RecoveredDataWithoutEccRecommendRewrite                 AdditionalSenseCode = 0x1708
	RecoveredDataWithoutEccDataRewritten                    AdditionalSenseCode = 0x1709
	RecoveredDataWithErrorCorrectionApplied                 AdditionalSenseCode = 0x1800
	RecoveredDataWithErrorCorrRetriesApplied                AdditionalSenseCode = 0x1801
	RecoveredDataDataAutoReallocated                        AdditionalSenseCode = 0x1802
	RecoveredDataWithCirc                                   AdditionalSenseCode = 0x1803
	RecoveredDataWithLEc                                    AdditionalSenseCode = 0x1804
	RecoveredDataRecommendReassignment                      AdditionalSenseCode = 0x1805
	RecoveredDataRecommendRewrite                           AdditionalSenseCode = 0x1806
	RecoveredDataWithEccDataRewritten                       AdditionalSenseCode = 0x1807
	RecoveredDataWithLinking                                AdditionalSenseCode = 0x1808
	DefectListError                                         AdditionalSenseCode = 0x1900
	DefectListNotAvailable                                  AdditionalSenseCode = 0x1901
	DefectListErrorInPrimaryList                            AdditionalSenseCode = 0x1902
	DefectListErrorInGrownList                              AdditionalSenseCode = 0x1903
	ParameterListLengthError                                AdditionalSenseCode = 0x1a00
	SynchronousDataTransferError                            AdditionalSenseCode = 0x1b00
	DefectListNotFound                                      AdditionalSenseCode = 0x1c00
	PrimaryDefectListNotFound                               AdditionalSenseCode = 0x1c01
	GrownDefectListNotFound                                 AdditionalSenseCode = 0x1c02
	MiscompareDuringVerifyOperation                         AdditionalSenseCode = 0x1d00
	MiscompareVerifyOfUnmappedLba                           AdditionalSenseCode = 0x1d01
	RecoveredIdWithEccCorrection                            AdditionalSenseCode = 0x1e00
	PartialDefectListTransfer                               AdditionalSenseCode = 0x1f00
	InvalidCommandOperationCode                             AdditionalSenseCode = 0x2000
	AccessDeniedInitiatorPendingEnrolled                    AdditionalSenseCode = 0x2001
	AccessDeniedNoAccessRights                              AdditionalSenseCode = 0x2002
	AccessDeniedInvalidMgmtIdKey                            AdditionalSenseCode = 0x2003
	IllegalCommandWhileInWriteCapableState                  AdditionalSenseCode = 0x2004
	IllegalCommandWhileInExplicitAddressMode                AdditionalSenseCode = 0x2006
	IllegalCommandWhileInImplicitAddressMode                AdditionalSenseCode = 0x2007
	AccessDeniedEnrollmentConflict                          AdditionalSenseCode = 0x2008
	AccessDeniedInvalidLuIdentifier                         AdditionalSenseCode = 0x2009
	AccessDeniedInvalidProxyToken                           AdditionalSenseCode = 0x200a
	AccessDeniedAclLunConflict                              AdditionalSenseCode = 0x200b
	IllegalCommandWhenNotInAppendOnlyMode                   AdditionalSenseCode = 0x200c
	NotAnAdministrativeLogicalUnit                          AdditionalSenseCode = 0x200d
	NotASubsidiaryLogicalUnit                               AdditionalSenseCode = 0x200e
	NotAConglomerateLogicalUnit                             AdditionalSenseCode = 0x200f
	LogicalBlockAddressOutOfRange                           AdditionalSenseCode = 0x2100
	InvalidElementAddress                                   AdditionalSenseCode = 0x2101
	InvalidAddressForWrite                                  AdditionalSenseCode = 0x2102
	InvalidWriteCrossingLayerJump                           AdditionalSenseCode = 0x2103
	UnalignedWriteCommand                                   AdditionalSenseCode = 0x2104
	WriteBoundaryViolation                                  AdditionalSenseCode = 0x2105
	AttemptToReadInvalidData                                AdditionalSenseCode = 0x2106
	ReadBoundaryViolation                                   AdditionalSenseCode = 0x2107
	MisalignedWriteCommand                                  AdditionalSenseCode = 0x2108
	IllegalFunctionuse20002400Or2600                        AdditionalSenseCode = 0x2200
	InvalidTokenOperationCauseNotReportable                 AdditionalSenseCode = 0x2300
	InvalidTokenOperationUnsupportedTokenType               AdditionalSenseCode = 0x2301
	InvalidTokenOperationRemoteTokenUsageNotSupported       AdditionalSenseCode = 0x2302
	InvalidTokenOperationRemoteRodTokenCreationNotSupported AdditionalSenseCode = 0x2303
	InvalidTokenOperationTokenUnknown                       AdditionalSenseCode = 0x2304
	InvalidTokenOperationTokenCorrupt                       AdditionalSenseCode = 0x2305
	InvalidTokenOperationTokenRevoked                       AdditionalSenseCode = 0x2306
	InvalidTokenOperationTokenExpired                       AdditionalSenseCode = 0x2307
	InvalidTokenOperationTokenCancelled                     AdditionalSenseCode = 0x2308
	InvalidTokenOperationTokenDeleted                       AdditionalSenseCode = 0x2309
	InvalidTokenOperationInvalidTokenLength                 AdditionalSenseCode = 0x230a
	InvalidFieldInCdb                                       AdditionalSenseCode = 0x2400
	CdbDecryptionError                                      AdditionalSenseCode = 0x2401
	SecurityAuditValueFrozen                                AdditionalSenseCode = 0x2404
	SecurityWorkingKeyFrozen                                AdditionalSenseCode = 0x2405
	NonceNotUnique                                          AdditionalSenseCode = 0x2406
	NonceTimestampOutOfRange                                AdditionalSenseCode = 0x2407
	InvalidXcdb                                             AdditionalSenseCode = 0x2408
	InvalidFastFormat                                       AdditionalSenseCode = 0x2409
	LogicalUnitNotSupported                                 AdditionalSenseCode = 0x2500
	InvalidFieldInParameterList                             AdditionalSenseCode = 0x2600
	ParameterNotSupported                                   AdditionalSenseCode = 0x2601
	ParameterValueInvalid                                   AdditionalSenseCode = 0x2602
	ThresholdParametersNotSupported                         AdditionalSenseCode = 0x2603
	InvalidReleaseOfPersistentReservation                   AdditionalSenseCode = 0x2604
	DataDecryptionError                                     AdditionalSenseCode = 0x2605
	TooManyTargetDescriptors                                AdditionalSenseCode = 0x2606
	UnsupportedTargetDescriptorTypeCode                     AdditionalSenseCode = 0x2607
	TooManySegmentDescriptors                               AdditionalSenseCode = 0x2608
	UnsupportedSegmentDescriptorTypeCode                    AdditionalSenseCode = 0x2609
	UnexpectedInexactSegment                                AdditionalSenseCode = 0x260a
	InlineDataLengthExceeded                                AdditionalSenseCode = 0x260b
	InvalidOperationForCopySourceOrDestination              AdditionalSenseCode = 0x260c
	CopySegmentGranularityViolation                         AdditionalSenseCode = 0x260d
	InvalidParameterWhilePortIsEnabled                      AdditionalSenseCode = 0x260e
	InvalidDataOutBufferIntegrityCheckValue                 AdditionalSenseCode = 0x260f
	DataDecryptionKeyFailLimitReached                       AdditionalSenseCode = 0x2610
	IncompleteKeyAssociatedDataSet                          AdditionalSenseCode = 0x2611
	VendorSpecificKeyReferenceNotFound                      AdditionalSenseCode = 0x2612
	ApplicationTagModePageIsInvalid                         AdditionalSenseCode = 0x2613
	TapeStreamMirroringPrevented                            AdditionalSenseCode = 0x2614
	CopySourceOrCopyDestinationNotAuthorized                AdditionalSenseCode = 0x2615
	WriteProtected                                          AdditionalSenseCode = 0x2700
	HardwareWriteProtected                                  AdditionalSenseCode = 0x2701
	LogicalUnitSoftwareWriteProtected                       AdditionalSenseCode = 0x2702
	AssociatedWriteProtect                                  AdditionalSenseCode = 0x2703
	PersistentWriteProtect                                  AdditionalSenseCode = 0x2704
	PermanentWriteProtect                                   AdditionalSenseCode = 0x2705
	ConditionalWriteProtect                                 AdditionalSenseCode = 0x2706
	SpaceAllocationFailedWriteProtect                       AdditionalSenseCode = 0x2707
	ZoneIsReadOnly                                          AdditionalSenseCode = 0x2708
	NotReadyToReadyChangeMediumMayHaveChanged               AdditionalSenseCode = 0x2800
	ImportOrExportElementAccessed                           AdditionalSenseCode = 0x2801
	FormatLayerMayHaveChanged                               AdditionalSenseCode = 0x2802
	ImportexportElementAccessedMediumChanged                AdditionalSenseCode = 0x2803
	PowerOnResetOrBusDeviceResetOccurred                    AdditionalSenseCode = 0x2900
	PowerOnOccurred                                         AdditionalSenseCode = 0x2901
	ScsiBusResetOccurred                                    AdditionalSenseCode = 0x2902
	BusDeviceResetFunctionOccurred                          AdditionalSenseCode = 0x2903
	DeviceInternalReset                                     AdditionalSenseCode = 0x2904
	TransceiverModeChangedToSingleEnded                     AdditionalSenseCode = 0x2905
	TransceiverModeChangedToLvd                             AdditionalSenseCode = 0x2906
	ITNexusLossOccurred                                     AdditionalSenseCode = 0x2907
	ParametersChanged                                       AdditionalSenseCode = 0x2a00
	ModeParametersChanged                                   AdditionalSenseCode = 0x2a01
	LogParametersChanged                                    AdditionalSenseCode = 0x2a02
	ReservationsPreempted                                   AdditionalSenseCode = 0x2a03
	ReservationsReleased                                    AdditionalSenseCode = 0x2a04
	RegistrationsPreempted                                  AdditionalSenseCode = 0x2a05
	AsymmetricAccessStateChanged                            AdditionalSenseCode = 0x2a06
	ImplicitAsymmetricAccessStateTransitionFailed           AdditionalSenseCode = 0x2a07
	PriorityChanged                                         AdditionalSenseCode = 0x2a08
	CapacityDataHasChanged                                  AdditionalSenseCode = 0x2a09
	ErrorHistoryITNexusCleared                              AdditionalSenseCode = 0x2a0a
	ErrorHistorySnapshotReleased                            AdditionalSenseCode = 0x2a0b
	ErrorRecoveryAttributesHaveChanged                      AdditionalSenseCode = 0x2a0c
	DataEncryptionCapabilitiesChanged                       AdditionalSenseCode = 0x2a0d
	TimestampChanged                                        AdditionalSenseCode = 0x2a10
	DataEncryptionParametersChangedByAnotherITNexus         AdditionalSenseCode = 0x2a11
	DataEncryptionParametersChangedByVendorSpecificEvent    AdditionalSenseCode = 0x2a12
	DataEncryptionKeyInstanceCounterHasChanged              AdditionalSenseCode = 0x2a13
	SaCreationCapabilitiesDataHasChanged                    AdditionalSenseCode = 0x2a14
	MediumRemovalPreventionPreempted                        AdditionalSenseCode = 0x2a15
	ZoneResetWritePointerRecommended                        AdditionalSenseCode = 0x2a16
	CopyCannotExecuteSinceHostCannotDisconnect              AdditionalSenseCode = 0x2b00
	CommandSequenceError                                    AdditionalSenseCode = 0x2c00
	TooManyWindowsSpecified                                 AdditionalSenseCode = 0x2c01
	InvalidCombinationOfWindowsSpecified                    AdditionalSenseCode = 0x2c02
	CurrentProgramAreaIsNotEmpty                            AdditionalSenseCode = 0x2c03
	CurrentProgramAreaIsEmpty                               AdditionalSenseCode = 0x2c04
	IllegalPowerConditionRequest                            AdditionalSenseCode = 0x2c05
	PersistentPreventConflict                               AdditionalSenseCode = 0x2c06
	PreviousBusyStatus                                      AdditionalSenseCode = 0x2c07
	PreviousTaskSetFullStatus                               AdditionalSenseCode = 0x2c08
	PreviousReservationConflictStatus                       AdditionalSenseCode = 0x2c09
	PartitionOrCollectionContainsUserObjects                AdditionalSenseCode = 0x2c0a
	NotReserved                                             AdditionalSenseCode = 0x2c0b
	OrwriteGenerationDoesNotMatch                           AdditionalSenseCode = 0x2c0c
	ResetWritePointerNotAllowed                             AdditionalSenseCode = 0x2c0d
	ZoneIsOffline                                           AdditionalSenseCode = 0x2c0e
	StreamNotOpen                                           AdditionalSenseCode = 0x2c0f
	UnwrittenDataInZone                                     AdditionalSenseCode = 0x2c10
	DescriptorFormatSenseDataRequired                       AdditionalSenseCode = 0x2c11
	OverwriteErrorOnUpdateInPlace                           AdditionalSenseCode = 0x2d00
	InsufficientTimeForOperation                            AdditionalSenseCode = 0x2e00
	CommandTimeoutBeforeProcessing                          AdditionalSenseCode = 0x2e01
	CommandTimeoutDuringProcessing                          AdditionalSenseCode = 0x2e02
	CommandTimeoutDuringProcessingDueToErrorRecovery        AdditionalSenseCode = 0x2e03
	CommandsClearedByAnotherInitiator                       AdditionalSenseCode = 0x2f00
	CommandsClearedByPowerLossNotification                  AdditionalSenseCode = 0x2f01
	CommandsClearedByDeviceServer                           AdditionalSenseCode = 0x2f02
	SomeCommandsClearedByQueuingLayerEvent                  AdditionalSenseCode = 0x2f03
	IncompatibleMediumInstalled                             AdditionalSenseCode = 0x3000
	CannotReadMediumUnknownFormat                           AdditionalSenseCode = 0x3001
	CannotReadMediumIncompatibleFormat                      AdditionalSenseCode = 0x3002
	CleaningCartridgeInstalled                              AdditionalSenseCode = 0x3003
	CannotWriteMediumUnknownFormat                          AdditionalSenseCode = 0x3004
	CannotWriteMediumIncompatibleFormat                     AdditionalSenseCode = 0x3005
	CannotFormatMediumIncompatibleMedium                    AdditionalSenseCode = 0x3006
	CleaningFailure                                         AdditionalSenseCode = 0x3007
	CannotWriteApplicationCodeMismatch                      AdditionalSenseCode = 0x3008
	CurrentSessionNotFixatedForAppend                       AdditionalSenseCode = 0x3009
	CleaningRequestRejected                                 AdditionalSenseCode = 0x300a
	WormMediumOverwriteAttempted                            AdditionalSenseCode = 0x300c
	WormMediumIntegrityCheck                                AdditionalSenseCode = 0x300d
	MediumNotFormatted                                      AdditionalSenseCode = 0x3010
	IncompatibleVolumeType                                  AdditionalSenseCode = 0x3011
	IncompatibleVolumeQualifier                             AdditionalSenseCode = 0x3012
	CleaningVolumeExpired                                   AdditionalSenseCode = 0x3013
	MediumFormatCorrupted                                   AdditionalSenseCode = 0x3100
	FormatCommandFailed                                     AdditionalSenseCode = 0x3101
	ZonedFormattingFailedDueToSpareLinking                  AdditionalSenseCode = 0x3102
	SanitizeCommandFailed                                   AdditionalSenseCode = 0x3103
	DepopulationFailed                                      AdditionalSenseCode = 0x3104
	NoDefectSpareLocationAvailable                          AdditionalSenseCode = 0x3200
	DefectListUpdateFailure                                 AdditionalSenseCode = 0x3201
	TapeLengthError                                         AdditionalSenseCode = 0x3300
	EnclosureFailure                                        AdditionalSenseCode = 0x3400
	EnclosureServicesFailure                                AdditionalSenseCode = 0x3500
	UnsupportedEnclosureFunction                            AdditionalSenseCode = 0x3501
	EnclosureServicesUnavailable                            AdditionalSenseCode = 0x3502
	EnclosureServicesTransferFailure                        AdditionalSenseCode = 0x3503
	EnclosureServicesTransferRefused                        AdditionalSenseCode = 0x3504
	EnclosureServicesChecksumError                          AdditionalSenseCode = 0x3505
	RibbonInkOrTonerFailure                                 AdditionalSenseCode = 0x3600
	RoundedParameter                                        AdditionalSenseCode = 0x3700
	EventStatusNotification                                 AdditionalSenseCode = 0x3800
	EsnPowerManagementClassEvent                            AdditionalSenseCode = 0x3802
	EsnMediaClassEvent                                      AdditionalSenseCode = 0x3804
	EsnDeviceBusyClassEvent                                 AdditionalSenseCode = 0x3806
	ThinProvisioningSoftThresholdReached                    AdditionalSenseCode = 0x3807
	SavingParametersNotSupported                            AdditionalSenseCode = 0x3900
	MediumNotPresent                                        AdditionalSenseCode = 0x3a00
	MediumNotPresentTrayClosed                              AdditionalSenseCode = 0x3a01
	MediumNotPresentTrayOpen                                AdditionalSenseCode = 0x3a02
	MediumNotPresentLoadable                                AdditionalSenseCode = 0x3a03
	MediumNotPresentMediumAuxiliaryMemoryAccessible         AdditionalSenseCode = 0x3a04
	SequentialPositioningError                              AdditionalSenseCode = 0x3b00
	TapePositionErrorAtBeginningOfMedium                    AdditionalSenseCode = 0x3b01
	TapePositionErrorAtEndOfMedium                          AdditionalSenseCode = 0x3b02
	TapeOrElectronicVerticalFormsUnitNotReady               AdditionalSenseCode = 0x3b03
	SlewFailure                                             AdditionalSenseCode = 0x3b04
	PaperJam                                                AdditionalSenseCode = 0x3b05
	FailedToSenseTopOfForm                                  AdditionalSenseCode = 0x3b06
	FailedToSenseBottomOfForm                               AdditionalSenseCode = 0x3b07
	RepositionError                                         AdditionalSenseCode = 0x3b08
	ReadPastEndOfMedium                                     AdditionalSenseCode = 0x3b09
	ReadPastBeginningOfMedium                               AdditionalSenseCode = 0x3b0a
	PositionPastEndOfMedium                                 AdditionalSenseCode = 0x3b0b
	PositionPastBeginningOfMedium                           AdditionalSenseCode = 0x3b0c
	MediumDestinationElementFull                            AdditionalSenseCode = 0x3b0d
	MediumSourceElementEmpty                                AdditionalSenseCode = 0x3b0e
	EndOfMediumReached                                      AdditionalSenseCode = 0x3b0f
	MediumMagazineNotAccessible                             AdditionalSenseCode = 0x3b11
	MediumMagazineRemoved                                   AdditionalSenseCode = 0x3b12
	MediumMagazineInserted                                  AdditionalSenseCode = 0x3b13
	MediumMagazineLocked                                    AdditionalSenseCode = 0x3b14
	MediumMagazineUnlocked                                  AdditionalSenseCode = 0x3b15
	MechanicalPositioningOrChangerError                     AdditionalSenseCode = 0x3b16
	ReadPastEndOfUserObject                                 AdditionalSenseCode = 0x3b17
	ElementDisabled                                         AdditionalSenseCode = 0x3b18
	ElementEnabled                                          AdditionalSenseCode = 0x3b19
	DataTransferDeviceRemoved                               AdditionalSenseCode = 0x3b1a
	DataTransferDeviceInserted                              AdditionalSenseCode = 0x3b1b
	TooManyLogicalObjectsOnPartitionToSupportOperation      AdditionalSenseCode = 0x3b1c
	InvalidBitsInIdentifyMessage                            AdditionalSenseCode = 0x3d00
	LogicalUnitHasNotSelfConfiguredYet                      AdditionalSenseCode = 0x3e00
	LogicalUnitFailure                                      AdditionalSenseCode = 0x3e01
	TimeoutOnLogicalUnit                                    AdditionalSenseCode = 0x3e02
	LogicalUnitFailedSelfTest                               AdditionalSenseCode = 0x3e03
	LogicalUnitUnableToUpdateSelfTestLog                    AdditionalSenseCode = 0x3e04
	TargetOperatingConditionsHaveChanged                    AdditionalSenseCode = 0x3f00
	MicrocodeHasBeenChanged                                 AdditionalSenseCode = 0x3f01
	ChangedOperatingDefinition                              AdditionalSenseCode = 0x3f02
	InquiryDataHasChanged                                   AdditionalSenseCode = 0x3f03
	ComponentDeviceAttached                                 AdditionalSenseCode = 0x3f04
	DeviceIdentifierChanged                                 AdditionalSenseCode = 0x3f05
	RedundancyGroupCreatedOrModified                        AdditionalSenseCode = 0x3f06
	RedundancyGroupDeleted                                  AdditionalSenseCode = 0x3f07
	SpareCreatedOrModified                                  AdditionalSenseCode = 0x3f08
	SpareDeleted                                            AdditionalSenseCode = 0x3f09
	VolumeSetCreatedOrModified                              AdditionalSenseCode = 0x3f0a
	VolumeSetDeleted                                        AdditionalSenseCode = 0x3f0b
	VolumeSetDeassigned                                     AdditionalSenseCode = 0x3f0c
	VolumeSetReassigned                                     AdditionalSenseCode = 0x3f0d
	ReportedLunsDataHasChanged                              AdditionalSenseCode = 0x3f0e
	EchoBufferOverwritten                                   AdditionalSenseCode = 0x3f0f
	MediumLoadable                                          AdditionalSenseCode = 0x3f10
	MediumAuxiliaryMemoryAccessible                         AdditionalSenseCode = 0x3f11
	IscsiIpAddressAdded                                     AdditionalSenseCode = 0x3f12
	IscsiIpAddressRemoved                                   AdditionalSenseCode = 0x3f13
	IscsiIpAddressChanged                                   AdditionalSenseCode = 0x3f14
	InspectReferralsSenseDescriptors                        AdditionalSenseCode = 0x3f15
	MicrocodeHasBeenChangedWithoutReset                     AdditionalSenseCode = 0x3f16
	ZoneTransitionToFull                                    AdditionalSenseCode = 0x3f17
	BindCompleted                                           AdditionalSenseCode = 0x3f18
	BindRedirected                                          AdditionalSenseCode = 0x3f19
	SubsidiaryBindingChanged                                AdditionalSenseCode = 0x3f1a
	RamFailureshouldUse40Nn                                 AdditionalSenseCode = 0x4000
	DataPathFailureshouldUse40Nn                            AdditionalSenseCode = 0x4100
	PowerOnOrSelfTestFailureshouldUse40Nn                   AdditionalSenseCode = 0x4200
	MessageError                                            AdditionalSenseCode = 0x4300
	InternalTargetFailure                                   AdditionalSenseCode = 0x4400
	PersistentReservationInformationLost                    AdditionalSenseCode = 0x4401
	AtaDeviceFailedSetFeatures                              AdditionalSenseCode = 0x4471
	SelectOrReselectFailure                                 AdditionalSenseCode = 0x4500
	UnsuccessfulSoftReset                                   AdditionalSenseCode = 0x4600
	ScsiParityError                                         AdditionalSenseCode = 0x4700
	DataPhaseCrcErrorDetected                               AdditionalSenseCode = 0x4701
	ScsiParityErrorDetectedDuringStDataPhase                AdditionalSenseCode = 0x4702
	InformationUnitIucrcErrorDetected                       AdditionalSenseCode = 0x4703
	AsynchronousInformationProtectionErrorDetected          AdditionalSenseCode = 0x4704
	ProtocolServiceCrcError                                 AdditionalSenseCode = 0x4705
	PhyTestFunctionInProgress                               AdditionalSenseCode = 0x4706
	SomeCommandsClearedByIscsiProtocolEvent                 AdditionalSenseCode = 0x477f
	InitiatorDetectedErrorMessageReceived                   AdditionalSenseCode = 0x4800
	InvalidMessageError                                     AdditionalSenseCode = 0x4900
	CommandPhaseError                                       AdditionalSenseCode = 0x4a00
	DataPhaseError                                          AdditionalSenseCode = 0x4b00
	InvalidTargetPortTransferTagReceived                    AdditionalSenseCode = 0x4b01
	TooMuchWriteData                                        AdditionalSenseCode = 0x4b02
	AcknakTimeout                                           AdditionalSenseCode = 0x4b03
	NakReceived                                             AdditionalSenseCode = 0x4b04
	DataOffsetError                                         AdditionalSenseCode = 0x4b05
	InitiatorResponseTimeout                                AdditionalSenseCode = 0x4b06
	ConnectionLost                                          AdditionalSenseCode = 0x4b07
	DataInBufferOverflowDataBufferSize                      AdditionalSenseCode = 0x4b08
	DataInBufferOverflowDataBufferDescriptorArea            AdditionalSenseCode = 0x4b09
	DataInBufferError                                       AdditionalSenseCode = 0x4b0a
	DataOutBufferOverflowDataBufferSize                     AdditionalSenseCode = 0x4b0b
	DataOutBufferOverflowDataBufferDescriptorArea           AdditionalSenseCode = 0x4b0c
	DataOutBufferError                                      AdditionalSenseCode = 0x4b0d
	PcieFabricError                                         AdditionalSenseCode = 0x4b0e
	PcieCompletionTimeout                                   AdditionalSenseCode = 0x4b0f
	PcieCompleterAbort                                      AdditionalSenseCode = 0x4b10
	PciePoisonedTlpReceived                                 AdditionalSenseCode = 0x4b11
	PcieEcrcCheckFailed                                     AdditionalSenseCode = 0x4b12
	PcieUnsupportedRequest                                  AdditionalSenseCode = 0x4b13
	PcieAcsViolation                                        AdditionalSenseCode = 0x4b14
	PcieTlpPrefixBlocked                                    AdditionalSenseCode = 0x4b15
	LogicalUnitFailedSelfConfiguration                      AdditionalSenseCode = 0x4c00
	OverlappedCommandsAttempted                             AdditionalSenseCode = 0x4e00
	WriteAppendError                                        AdditionalSenseCode = 0x5000
	WriteAppendPositionError                                AdditionalSenseCode = 0x5001
	PositionErrorRelatedToTiming                            AdditionalSenseCode = 0x5002
	EraseFailure                                            AdditionalSenseCode = 0x5100
	EraseFailureIncompleteEraseOperationDetected            AdditionalSenseCode = 0x5101
	CartridgeFault                                          AdditionalSenseCode = 0x5200
	MediaLoadOrEjectFailed                                  AdditionalSenseCode = 0x5300
	UnloadTapeFailure                                       AdditionalSenseCode = 0x5301
	MediumRemovalPrevented                                  AdditionalSenseCode = 0x5302
	MediumRemovalPreventedByDataTransferElement             AdditionalSenseCode = 0x5303
	MediumThreadOrUnthreadFailure                           AdditionalSenseCode = 0x5304
	VolumeIdentifierInvalid                                 AdditionalSenseCode = 0x5305
	VolumeIdentifierMissing                                 AdditionalSenseCode = 0x5306
	DuplicateVolumeIdentifier                               AdditionalSenseCode = 0x5307
	ElementStatusUnknown                                    AdditionalSenseCode = 0x5308
	DataTransferDeviceErrorLoadFailed                       AdditionalSenseCode = 0x5309
	DataTransferDeviceErrorUnloadFailed                     AdditionalSenseCode = 0x530a
	DataTransferDeviceErrorUnloadMissing                    AdditionalSenseCode = 0x530b
	DataTransferDeviceErrorEjectFailed                      AdditionalSenseCode = 0x530c
	DataTransferDeviceErrorLibraryCommunicationFailed       AdditionalSenseCode = 0x530d
	ScsiToHostSystemInterfaceFailure                        AdditionalSenseCode = 0x5400
	SystemResourceFailure                                   AdditionalSenseCode = 0x5500
	SystemBufferFull                                        AdditionalSenseCode = 0x5501
	InsufficientReservationResources                        AdditionalSenseCode = 0x5502
	InsufficientResources                                   AdditionalSenseCode = 0x5503
	InsufficientRegistrationResources                       AdditionalSenseCode = 0x5504
	InsufficientAccessControlResources                      AdditionalSenseCode = 0x5505
	AuxiliaryMemoryOutOfSpace                               AdditionalSenseCode = 0x5506
	QuotaError                                              AdditionalSenseCode = 0x5507
	MaximumNumberOfSupplementalDecryptionKeysExceeded       AdditionalSenseCode = 0x5508
	MediumAuxiliaryMemoryNotAccessible                      AdditionalSenseCode = 0x5509
	DataCurrentlyUnavailable                                AdditionalSenseCode = 0x550a
	InsufficientPowerForOperation                           AdditionalSenseCode = 0x550b
	InsufficientResourcesToCreateRod                        AdditionalSenseCode = 0x550c
	InsufficientResourcesToCreateRodToken                   AdditionalSenseCode = 0x550d
	InsufficientZoneResources                               AdditionalSenseCode = 0x550e
	InsufficientZoneResourcesToCompleteWrite                AdditionalSenseCode = 0x550f
	MaximumNumberOfStreamsOpen                              AdditionalSenseCode = 0x5510
	InsufficientResourcesToBind                             AdditionalSenseCode = 0x5511
	UnableToRecoverTableOfContents                          AdditionalSenseCode = 0x5700
	GenerationDoesNotExist                                  AdditionalSenseCode = 0x5800
	UpdatedBlockRead                                        AdditionalSenseCode = 0x5900
	OperatorRequestOrStateChangeInput                       AdditionalSenseCode = 0x5a00
	OperatorMediumRemovalRequest                            AdditionalSenseCode = 0x5a01
	OperatorSelectedWriteProtect                            AdditionalSenseCode = 0x5a02
	OperatorSelectedWritePermit                             AdditionalSenseCode = 0x5a03
	LogException                                            AdditionalSenseCode = 0x5b00
	ThresholdConditionMet                                   AdditionalSenseCode = 0x5b01
	LogCounterAtMaximum                                     AdditionalSenseCode = 0x5b02
	LogListCodesExhausted                                   AdditionalSenseCode = 0x5b03
	RplStatusChange                                         AdditionalSenseCode = 0x5c00
	SpindlesSynchronized                                    AdditionalSenseCode = 0x5c01
	SpindlesNotSynchronized                                 AdditionalSenseCode = 0x5c02
	FailurePredictionThresholdExceeded                      AdditionalSenseCode = 0x5d00
	MediaFailurePredictionThresholdExceeded                 AdditionalSenseCode = 0x5d01
	LogicalUnitFailurePredictionThresholdExceeded           AdditionalSenseCode = 0x5d02
	SpareAreaExhaustionPredictionThresholdExceeded          AdditionalSenseCode = 0x5d03
	HardwareImpendingFailureGeneralHardDriveFailure         AdditionalSenseCode = 0x5d10
	HardwareImpendingFailureDriveErrorRateTooHigh           AdditionalSenseCode = 0x5d11
	HardwareImpendingFailureDataErrorRateTooHigh            AdditionalSenseCode = 0x5d12
	HardwareImpendingFailureSeekErrorRateTooHigh            AdditionalSenseCode = 0x5d13
	HardwareImpendingFailureTooManyBlockReassigns           AdditionalSenseCode = 0x5d14
	HardwareImpendingFailureAccessTimesTooHigh              AdditionalSenseCode = 0x5d15
	HardwareImpendingFailureStartUnitTimesTooHigh           AdditionalSenseCode = 0x5d16
	HardwareImpendingFailureChannelParametrics              AdditionalSenseCode = 0x5d17
	HardwareImpendingFailureControllerDetected              AdditionalSenseCode = 0x5d18
	HardwareImpendingFailureThroughputPerformance           AdditionalSenseCode = 0x5d19
	HardwareImpendingFailureSeekTimePerformance             AdditionalSenseCode = 0x5d1a
	HardwareImpendingFailureSpinUpRetryCount                AdditionalSenseCode = 0x5d1b
	HardwareImpendingFailureDriveCalibrationRetryCount      AdditionalSenseCode = 0x5d1c
	HardwareImpendingFailurePowerLossProtectionCircuit      AdditionalSenseCode = 0x5d1d
	ControllerImpendingFailureGeneralHardDriveFailure       AdditionalSenseCode = 0x5d20
	ControllerImpendingFailureDriveErrorRateTooHigh         AdditionalSenseCode = 0x5d21
	ControllerImpendingFailureDataErrorRateTooHigh          AdditionalSenseCode = 0x5d22
	ControllerImpendingFailureSeekErrorRateTooHigh          AdditionalSenseCode = 0x5d23
	ControllerImpendingFailureTooManyBlockReassigns         AdditionalSenseCode = 0x5d24
	ControllerImpendingFailureAccessTimesTooHigh            AdditionalSenseCode = 0x5d25
	ControllerImpendingFailureStartUnitTimesTooHigh         AdditionalSenseCode = 0x5d26
	ControllerImpendingFailureChannelParametrics            AdditionalSenseCode = 0x5d27
	ControllerImpendingFailureControllerDetected            AdditionalSenseCode = 0x5d28
	ControllerImpendingFailureThroughputPerformance         AdditionalSenseCode = 0x5d29
	ControllerImpendingFailureSeekTimePerformance           AdditionalSenseCode = 0x5d2a
	ControllerImpendingFailureSpinUpRetryCount              AdditionalSenseCode = 0x5d2b
	ControllerImpendingFailureDriveCalibrationRetryCount    AdditionalSenseCode = 0x5d2c
	DataChannelImpendingFailureGeneralHardDriveFailure      AdditionalSenseCode = 0x5d30
	DataChannelImpendingFailureDriveErrorRateTooHigh        AdditionalSenseCode = 0x5d31
	DataChannelImpendingFailureDataErrorRateTooHigh         AdditionalSenseCode = 0x5d32
	DataChannelImpendingFailureSeekErrorRateTooHigh         AdditionalSenseCode = 0x5d33
	DataChannelImpendingFailureTooManyBlockReassigns        AdditionalSenseCode = 0x5d34
	DataChannelImpendingFailureAccessTimesTooHigh           AdditionalSenseCode = 0x5d35
	DataChannelImpendingFailureStartUnitTimesTooHigh        AdditionalSenseCode = 0x5d36
	DataChannelImpendingFailureChannelParametrics           AdditionalSenseCode = 0x5d37
	DataChannelImpendingFailureControllerDetected           AdditionalSenseCode = 0x5d38
	DataChannelImpendingFailureThroughputPerformance        AdditionalSenseCode = 0x5d39
	DataChannelImpendingFailureSeekTimePerformance          AdditionalSenseCode = 0x5d3a
	DataChannelImpendingFailureSpinUpRetryCount             AdditionalSenseCode = 0x5d3b
	DataChannelImpendingFailureDriveCalibrationRetryCount   AdditionalSenseCode = 0x5d3c
	ServoImpendingFailureGeneralHardDriveFailure            AdditionalSenseCode = 0x5d40
	ServoImpendingFailureDriveErrorRateTooHigh              AdditionalSenseCode = 0x5d41
	ServoImpendingFailureDataErrorRateTooHigh               AdditionalSenseCode = 0x5d42
	ServoImpendingFailureSeekErrorRateTooHigh               AdditionalSenseCode = 0x5d43
	ServoImpendingFailureTooManyBlockReassigns              AdditionalSenseCode = 0x5d44
	ServoImpendingFailureAccessTimesTooHigh                 AdditionalSenseCode = 0x5d45
	ServoImpendingFailureStartUnitTimesTooHigh              AdditionalSenseCode = 0x5d46
	ServoImpendingFailureChannelParametrics                 AdditionalSenseCode = 0x5d47
	ServoImpendingFailureControllerDetected                 AdditionalSenseCode = 0x5d48
	ServoImpendingFailureThroughputPerformance              AdditionalSenseCode = 0x5d49
	ServoImpendingFailureSeekTimePerformance                AdditionalSenseCode = 0x5d4a
	ServoImpendingFailureSpinUpRetryCount                   AdditionalSenseCode = 0x5d4b
	ServoImpendingFailureDriveCalibrationRetryCount         AdditionalSenseCode = 0x5d4c
	SpindleImpendingFailureGeneralHardDriveFailure          AdditionalSenseCode = 0x5d50
	SpindleImpendingFailureDriveErrorRateTooHigh            AdditionalSenseCode = 0x5d51
	SpindleImpendingFailureDataErrorRateTooHigh             AdditionalSenseCode = 0x5d52
	SpindleImpendingFailureSeekErrorRateTooHigh             AdditionalSenseCode = 0x5d53
	SpindleImpendingFailureTooManyBlockReassigns            AdditionalSenseCode = 0x5d54
	SpindleImpendingFailureAccessTimesTooHigh               AdditionalSenseCode = 0x5d55
	SpindleImpendingFailureStartUnitTimesTooHigh            AdditionalSenseCode = 0x5d56
	SpindleImpendingFailureChannelParametrics               AdditionalSenseCode = 0x5d57
	SpindleImpendingFailureControllerDetected               AdditionalSenseCode = 0x5d58
	SpindleImpendingFailureThroughputPerformance            AdditionalSenseCode = 0x5d59
	SpindleImpendingFailureSeekTimePerformance              AdditionalSenseCode = 0x5d5a
	SpindleImpendingFailureSpinUpRetryCount                 AdditionalSenseCode = 0x5d5b
	SpindleImpendingFailureDriveCalibrationRetryCount       AdditionalSenseCode = 0x5d5c
	FirmwareImpendingFailureGeneralHardDriveFailure         AdditionalSenseCode = 0x5d60
	FirmwareImpendingFailureDriveErrorRateTooHigh           AdditionalSenseCode = 0x5d61
	FirmwareImpendingFailureDataErrorRateTooHigh            AdditionalSenseCode = 0x5d62
	FirmwareImpendingFailureSeekErrorRateTooHigh            AdditionalSenseCode = 0x5d63
	FirmwareImpendingFailureTooManyBlockReassigns           AdditionalSenseCode = 0x5d64
	FirmwareImpendingFailureAccessTimesTooHigh              AdditionalSenseCode = 0x5d65
	FirmwareImpendingFailureStartUnitTimesTooHigh           AdditionalSenseCode = 0x5d66
	FirmwareImpendingFailureChannelParametrics              AdditionalSenseCode = 0x5d67
	FirmwareImpendingFailureControllerDetected              AdditionalSenseCode = 0x5d68
	FirmwareImpendingFailureThroughputPerformance           AdditionalSenseCode = 0x5d69
	FirmwareImpendingFailureSeekTimePerformance             AdditionalSenseCode = 0x5d6a
	FirmwareImpendingFailureSpinUpRetryCount                AdditionalSenseCode = 0x5d6b
	FirmwareImpendingFailureDriveCalibrationRetryCount      AdditionalSenseCode = 0x5d6c
	MediaImpendingFailureEnduranceLimitMet                  AdditionalSenseCode = 0x5d73
	FailurePredictionThresholdExceededfalse                 AdditionalSenseCode = 0x5dff
	LowPowerConditionOn                                     AdditionalSenseCode = 0x5e00
	IdleConditionActivatedByTimer                           AdditionalSenseCode = 0x5e01
	StandbyConditionActivatedByTimer                        AdditionalSenseCode = 0x5e02
	IdleConditionActivatedByCommand                         AdditionalSenseCode = 0x5e03
	StandbyConditionActivatedByCommand                      AdditionalSenseCode = 0x5e04
	IdleBConditionActivatedByTimer                          AdditionalSenseCode = 0x5e05
	IdleBConditionActivatedByCommand                        AdditionalSenseCode = 0x5e06
	IdleCConditionActivatedByTimer                          AdditionalSenseCode = 0x5e07
	IdleCConditionActivatedByCommand                        AdditionalSenseCode = 0x5e08
	StandbyYConditionActivatedByTimer                       AdditionalSenseCode = 0x5e09
	StandbyYConditionActivatedByCommand                     AdditionalSenseCode = 0x5e0a
	PowerStateChangeToActive                                AdditionalSenseCode = 0x5e41
	PowerStateChangeToIdle                                  AdditionalSenseCode = 0x5e42
	PowerStateChangeToStandby                               AdditionalSenseCode = 0x5e43
	PowerStateChangeToSleep                                 AdditionalSenseCode = 0x5e45
	PowerStateChangeToDeviceControl                         AdditionalSenseCode = 0x5e47
	LampFailure                                             AdditionalSenseCode = 0x6000
	VideoAcquisitionError                                   AdditionalSenseCode = 0x6100
	UnableToAcquireVideo                                    AdditionalSenseCode = 0x6101
	OutOfFocus                                              AdditionalSenseCode = 0x6102
	ScanHeadPositioningError                                AdditionalSenseCode = 0x6200
	EndOfUserAreaEncounteredOnThisTrack                     AdditionalSenseCode = 0x6300
	PacketDoesNotFitInAvailableSpace                        AdditionalSenseCode = 0x6301
	IllegalModeForThisTrack                                 AdditionalSenseCode = 0x6400
	InvalidPacketSize                                       AdditionalSenseCode = 0x6401
	VoltageFault                                            AdditionalSenseCode = 0x6500
	AutomaticDocumentFeederCoverUp                          AdditionalSenseCode = 0x6600
	AutomaticDocumentFeederLiftUp                           AdditionalSenseCode = 0x6601
	DocumentJamInAutomaticDocumentFeeder                    AdditionalSenseCode = 0x6602
	DocumentMissFeedAutomaticInDocumentFeeder               AdditionalSenseCode = 0x6603
	ConfigurationFailure                                    AdditionalSenseCode = 0x6700
	ConfigurationOfIncapableLogicalUnitsFailed              AdditionalSenseCode = 0x6701
	AddLogicalUnitFailed                                    AdditionalSenseCode = 0x6702
	ModificationOfLogicalUnitFailed                         AdditionalSenseCode = 0x6703
	ExchangeOfLogicalUnitFailed                             AdditionalSenseCode = 0x6704
	RemoveOfLogicalUnitFailed                               AdditionalSenseCode = 0x6705
	AttachmentOfLogicalUnitFailed                           AdditionalSenseCode = 0x6706
	CreationOfLogicalUnitFailed                             AdditionalSenseCode = 0x6707
	AssignFailureOccurred                                   AdditionalSenseCode = 0x6708
	MultiplyAssignedLogicalUnit                             AdditionalSenseCode = 0x6709
	SetTargetPortGroupsCommandFailed                        AdditionalSenseCode = 0x670a
	AtaDeviceFeatureNotEnabled                              AdditionalSenseCode = 0x670b
	CommandRejected                                         AdditionalSenseCode = 0x670c
	ExplicitBindNotAllowed                                  AdditionalSenseCode = 0x670d
	LogicalUnitNotConfigured                                AdditionalSenseCode = 0x6800
	SubsidiaryLogicalUnitNotConfigured                      AdditionalSenseCode = 0x6801
	DataLossOnLogicalUnit                                   AdditionalSenseCode = 0x6900
	MultipleLogicalUnitFailures                             AdditionalSenseCode = 0x6901
	ParitydataMismatch                                      AdditionalSenseCode = 0x6902
	InformationalReferToLog                                 AdditionalSenseCode = 0x6a00
	StateChangeHasOccurred                                  AdditionalSenseCode = 0x6b00
	RedundancyLevelGotBetter                                AdditionalSenseCode = 0x6b01
	RedundancyLevelGotWorse                                 AdditionalSenseCode = 0x6b02
	RebuildFailureOccurred                                  AdditionalSenseCode = 0x6c00
	RecalculateFailureOccurred                              AdditionalSenseCode = 0x6d00
	CommandToLogicalUnitFailed                              AdditionalSenseCode = 0x6e00
	CopyProtectionKeyExchangeFailureAuthentication          AdditionalSenseCode = 0x6f00
	CopyProtectionKeyExchangeFailureKeyNotPresent           AdditionalSenseCode = 0x6f01
	CopyProtectionKeyExchangeFailureKeyNotEstablished       AdditionalSenseCode = 0x6f02
	ReadOfScrambledSectorWithoutAuthentication              AdditionalSenseCode = 0x6f03
	MediaRegionCodeIsMismatchedToLogicalUnitRegion          AdditionalSenseCode = 0x6f04
	DriveRegionMustBePermanentregionResetCountError         AdditionalSenseCode = 0x6f05
	InsufficientBlockCountForBindingNonceRecording          AdditionalSenseCode = 0x6f06
	ConflictInBindingNonceRecording                         AdditionalSenseCode = 0x6f07
	InsufficientPermission                                  AdditionalSenseCode = 0x6f08
	InvalidDriveHostPairingServer                           AdditionalSenseCode = 0x6f09
	DriveHostPairingSuspended                               AdditionalSenseCode = 0x6f0a
	DecompressionExceptionLongAlgorithmId                   AdditionalSenseCode = 0x7100
	SessionFixationError                                    AdditionalSenseCode = 0x7200
	SessionFixationErrorWritingLeadIn                       AdditionalSenseCode = 0x7201
	SessionFixationErrorWritingLeadOut                      AdditionalSenseCode = 0x7202
	SessionFixationErrorIncompleteTrackInSession            AdditionalSenseCode = 0x7203
	EmptyOrPartiallyWrittenReservedTrack                    AdditionalSenseCode = 0x7204
	NoMoreTrackReservationsAllowed                          AdditionalSenseCode = 0x7205
	RmzExtensionIsNotAllowed                                AdditionalSenseCode = 0x7206
	NoMoreTestZoneExtensionsAreAllowed                      AdditionalSenseCode = 0x7207
	CdControlError                                          AdditionalSenseCode = 0x7300
	PowerCalibrationAreaAlmostFull                          AdditionalSenseCode = 0x7301
	PowerCalibrationAreaIsFull                              AdditionalSenseCode = 0x7302
	PowerCalibrationAreaError                               AdditionalSenseCode = 0x7303
	ProgramMemoryAreaUpdateFailure                          AdditionalSenseCode = 0x7304
	ProgramMemoryAreaIsFull                                 AdditionalSenseCode = 0x7305
	RmapmaIsAlmostFull                                      AdditionalSenseCode = 0x7306
	CurrentPowerCalibrationAreaAlmostFull                   AdditionalSenseCode = 0x7310
	CurrentPowerCalibrationAreaIsFull                       AdditionalSenseCode = 0x7311
	RdzIsFull                                               AdditionalSenseCode = 0x7317
	SecurityError                                           AdditionalSenseCode = 0x7400
	UnableToDecryptData                                     AdditionalSenseCode = 0x7401
	UnencryptedDataEncounteredWhileDecrypting               AdditionalSenseCode = 0x7402
	IncorrectDataEncryptionKey                              AdditionalSenseCode = 0x7403
	CryptographicIntegrityValidationFailed                  AdditionalSenseCode = 0x7404
	ErrorDecryptingData                                     AdditionalSenseCode = 0x7405
	UnknownSignatureVerificationKey                         AdditionalSenseCode = 0x7406
	EncryptionParametersNotUseable                          AdditionalSenseCode = 0x7407
	DigitalSignatureValidationFailure                       AdditionalSenseCode = 0x7408
	EncryptionModeMismatchOnRead                            AdditionalSenseCode = 0x7409
	EncryptedBlockNotRawReadEnabled                         AdditionalSenseCode = 0x740a
	IncorrectEncryptionParameters                           AdditionalSenseCode = 0x740b
	UnableToDecryptParameterList                            AdditionalSenseCode = 0x740c
	EncryptionAlgorithmDisabled                             AdditionalSenseCode = 0x740d
	SaCreationParameterValueInvalid                         AdditionalSenseCode = 0x7410
	SaCreationParameterValueRejected                        AdditionalSenseCode = 0x7411
	InvalidSaUsage                                          AdditionalSenseCode = 0x7412
	DataEncryptionConfigurationPrevented                    AdditionalSenseCode = 0x7421
	SaCreationParameterNotSupported                         AdditionalSenseCode = 0x7430
	AuthenticationFailed                                    AdditionalSenseCode = 0x7440
	ExternalDataEncryptionKeyManagerAccessError             AdditionalSenseCode = 0x7461
	ExternalDataEncryptionKeyManagerError                   AdditionalSenseCode = 0x7462
	ExternalDataEncryptionKeyNotFound                       AdditionalSenseCode = 0x7463
	ExternalDataEncryptionRequestNotAuthorized              AdditionalSenseCode = 0x7464
	ExternalDataEncryptionControlTimeout                    AdditionalSenseCode = 0x746e
	ExternalDataEncryptionControlError                      AdditionalSenseCode = 0x746f
	LogicalUnitAccessNotAuthorized                          AdditionalSenseCode = 0x7471
	SecurityConflictInTranslatedDevice                      AdditionalSenseCode = 0x7479
)

Generated from Table F.1

func (AdditionalSenseCode) ASK

func (a AdditionalSenseCode) ASK() uint8

ASK returns the raw Additional Sense Key

func (AdditionalSenseCode) ASKQ

func (a AdditionalSenseCode) ASKQ() uint8

ASKQ returns the raw Additional Sense Key Qualifier

func (AdditionalSenseCode) IsKey

IsKey checks if the ASK portion of a is the same as the ASK portion of b.

func (AdditionalSenseCode) String

func (a AdditionalSenseCode) String() string

String returns the textual representation of this ASK

type CommandDataBuffer

type CommandDataBuffer struct {
	// OperationCode contains the code of the command to be called
	OperationCode OperationCode
	// Request contains the OperationCode-specific request parameters
	Request []byte
	// ServiceAction can (for certain CDB encodings) contain an additional
	// qualification for the OperationCode.
	ServiceAction *uint8
	// Control contains common CDB metadata
	Control uint8
	// DataTransferDirection contains the direction(s) of the data transfer(s)
	// to be made.
	DataTransferDirection DataTransferDirection
	// Data contains the data to be transferred. If data needs to be received
	// from the device, a buffer needs to be provided here.
	Data []byte
	// Timeout can contain an optional timeout (0 = no timeout) for the command
	Timeout time.Duration
}

CommandDataBuffer represents a command

func (*CommandDataBuffer) Bytes

func (c *CommandDataBuffer) Bytes() ([]byte, error)

Bytes returns the raw CDB to be sent to the device

type DataTransferDirection

type DataTransferDirection uint8
const (
	DataTransferNone DataTransferDirection = iota
	DataTransferToDevice
	DataTransferFromDevice
	DataTransferBidirectional
)

type Device

type Device struct {
	// contains filtered or unexported fields
}

Device is a handle for a SCSI device

func NewFromFd

func NewFromFd(fd syscall.Conn) (*Device, error)

NewFromFd creates a new SCSI device handle from a system handle.

func Open

func Open(path string) (*Device, error)

Open creates a new SCSI device handle from a device path (like /dev/sda).

func (*Device) Close

func (d *Device) Close() error

Close closes the SCSI device handle if opened by Open()

func (*Device) GetInformationalExceptions

func (d *Device) GetInformationalExceptions() (*InformationalExceptions, error)

func (Device) Inquiry

func (d Device) Inquiry() (*InquiryData, error)

Inquiry queries the device for various metadata about its identity and supported features.

func (*Device) InquiryVPD

func (d *Device) InquiryVPD(pageCode VPDPageCode, initialSize uint16) ([]byte, error)

InquiryVPD requests a specified Vital Product Description Page from the device. If the size of the page is known in advance, initialSize should be set to a non-zero value to make the query more efficient.

func (*Device) LogSenseParameters

func (d *Device) LogSenseParameters(r LogSenseRequest) (map[uint16][]LogParameter, error)

LogSenseParameters returns the parameters of a log page. The returned map contains one entry per parameter ID in the result. The order of parameters of the same ID is kept.

func (*Device) LogSenseRaw

func (d *Device) LogSenseRaw(r LogSenseRequest) ([]byte, error)

LogSenseRaw requests a raw log page. For log pages with parameters LogSenseParameters is better-suited.

func (*Device) RawCommand

func (d *Device) RawCommand(c *CommandDataBuffer) error

RawCommand issues a raw command against the device.

func (*Device) ReadDefectDataLBA

func (d *Device) ReadDefectDataLBA(plist, glist bool) ([]uint64, error)

ReadDefectDataLBA reads the primary (manufacturer) and/or grown defect list in LBA format. This is commonly used on SSDs and generally returns an error on spinning drives.

func (*Device) ReadDefectDataPhysical

func (d *Device) ReadDefectDataPhysical(plist, glist bool) ([]PhysicalSectorFormatAddress, error)

ReadDefectDataPhysical reads the primary (manufacturer) and/or grown defect list in physical format. This is only defined for spinning drives, returning an error on SSDs.

func (*Device) SolidStateMediaHealth

func (d *Device) SolidStateMediaHealth() (*SolidStateMediaHealth, error)

SolidStateMediaHealth reports parameters about the health of the solid-state media of a SCSI block device.

func (*Device) SupportedLogPages

func (d *Device) SupportedLogPages() (map[uint8]bool, error)

SupportedLogPages returns a map with all supported log pages. This can return an error if the device does not support logs at all.

func (*Device) SupportedLogPagesAndSubpages

func (d *Device) SupportedLogPagesAndSubpages() (map[PageAndSubpage]bool, error)

SupportedLogPagesAndSubpages returns the list of supported pages and subpages. This can return an error if the device does not support logs at all.

func (*Device) SupportedLogSubPages

func (d *Device) SupportedLogSubPages(pageCode uint8) (map[uint8]bool, error)

SupportedLogSubPages returns the list of subpages supported in a log page.

func (*Device) SupportedVPDPages

func (d *Device) SupportedVPDPages() (map[VPDPageCode]bool, error)

SupportedVPDPages returns the list of supported vital product data pages supported by the device.

func (*Device) UnitSerialNumber

func (d *Device) UnitSerialNumber() (string, error)

UnitSerialNumber returns the serial number of the device. Only available if UnitSerialNumberVPD is a supported VPD page.

type DeviceType

type DeviceType uint8

DeviceType represents a SCSI peripheral device type, which can be used to determine the command set to use to control the device. See Table 150 in the standard.

const (
	TypeBlockDevice              DeviceType = 0x00
	TypeSequentialAccessDevice   DeviceType = 0x01
	TypeProcessor                DeviceType = 0x03
	TypeOpticalDrive             DeviceType = 0x05
	TypeOpticalMemory            DeviceType = 0x07
	TypeMediaChanger             DeviceType = 0x08
	TypeArrayController          DeviceType = 0x0c
	TypeEncloseServices          DeviceType = 0x0d
	TypeOpticalCardRWDevice      DeviceType = 0x0f
	TypeObjectStorageDevice      DeviceType = 0x11
	TypeAutomationDriveInterface DeviceType = 0x12
	TypeZonedBlockDevice         DeviceType = 0x14
	TypeUnknownDevice            DeviceType = 0x1f
)

func (DeviceType) String

func (d DeviceType) String() string

type FixedError

type FixedError struct {
	Deferred                   bool
	SenseKey                   SenseKey
	Information                uint32
	CommandSpecificInformation uint32
	AdditionalSenseCode        AdditionalSenseCode
}

FixedError is one type of error returned by a SCSI CHECK_CONDITION. See also Table 48 in the standard.

func (FixedError) Error

func (e FixedError) Error() string

type InformationalExceptions

type InformationalExceptions struct {
	InformationalSenseCode AdditionalSenseCode
	Temperature            uint8
}

type InquiryData

type InquiryData struct {
	PeriperalQualifier      uint8
	PeripheralDeviceType    DeviceType
	RemovableMedium         bool
	LogicalUnitConglomerate bool
	CommandSetVersion       Version
	NormalACASupported      bool
	HistoricalSupport       bool
	ResponseDataFormat      uint8
	SCCSupported            bool
	TargetPortGroupSupport  uint8
	ThirdPartyCopySupport   bool
	HasProtectionInfo       bool
	HasEnclosureServices    bool
	VendorFeature1          bool
	HasMultipleSCSIPorts    bool
	CmdQueue                bool
	VendorFeature2          bool
	Vendor                  string
	Product                 string
	ProductRevisionLevel    string
	VendorSpecific          []byte
	VersionDescriptors      []uint16
}

InquiryData contains data returned by the INQUIRY command.

type LogParameter

type LogParameter struct {
	// DisableUpdate indicates if the device is updating this parameter.
	// If this is true the parameter has either overflown or updating has been
	// manually disabled.
	DisableUpdate bool
	// TargetSaveDisable indicates if automatic saving of this parameter has
	// been disabled.
	TargetSaveDisable bool
	// FormatAndLinking contains the format of the log parameter.
	FormatAndLinking uint8
	// Data contains the payload of the log parameter.
	Data []byte
}

type LogSenseRequest

type LogSenseRequest struct {
	// PageCode contains the identifier of the requested page
	PageCode uint8
	// SubpageCode contains the identifier of the requested subpage
	// or the zero value if no subpage is requested.
	SubpageCode uint8
	// PageControl specifies what type of values should be returned for bounded
	// and unbounded log parameters. See also Table 156 in the standard.
	PageControl uint8
	// ParameterPointer allows requesting parameter data beginning from a
	// specific parameter code. The zero value starts from the beginning.
	ParameterPointer uint16
	// SaveParameters requests the device to save all parameters without
	// DisableUpdate set to non-volatile storage.
	SaveParameters bool
	// InitialSize is an optional hint how big the buffer for the log page
	// should be for the initial request. The zero value sets this to 4096.
	InitialSize uint16
}

type OperationCode

type OperationCode uint8
const (
	InquiryOp        OperationCode = 0x12
	ReadDefectDataOp OperationCode = 0x37
	LogSenseOp       OperationCode = 0x4d
)

type PageAndSubpage

type PageAndSubpage uint16

PageAndSubpage identifies a log page uniquely.

func NewPageAndSubpage

func NewPageAndSubpage(page, subpage uint8) PageAndSubpage

func (PageAndSubpage) Page

func (p PageAndSubpage) Page() uint8

func (PageAndSubpage) String

func (p PageAndSubpage) String() string

func (PageAndSubpage) Subpage

func (p PageAndSubpage) Subpage() uint8

type PhysicalSectorFormatAddress

type PhysicalSectorFormatAddress struct {
	CylinderNumber              uint32
	HeadNumber                  uint8
	SectorNumber                uint32
	MultiAddressDescriptorStart bool
}

PhysicalSectorFormatAddress represents a physical sector (or the the whole track if SectorNumber == AllSectors) on a spinning hard drive.

type SenseKey

type SenseKey uint8

SenseKey represents the top-level status code of a SCSI sense response.

const (
	NoSense        SenseKey = 0x0
	RecoveredError SenseKey = 0x1
	NotReady       SenseKey = 0x2
	MediumError    SenseKey = 0x3
	HardwareError  SenseKey = 0x4
	IllegalRequest SenseKey = 0x5
	UnitAttention  SenseKey = 0x6
	DataProtect    SenseKey = 0x7
	BlankCheck     SenseKey = 0x8
	VendorSpecific SenseKey = 0x9
	CopyAborted    SenseKey = 0xa
	AbortedCommand SenseKey = 0xb
	VolumeOverflow SenseKey = 0xd
	Miscompare     SenseKey = 0xe
	Completed      SenseKey = 0xf
)

func (SenseKey) String

func (s SenseKey) String() string

type SolidStateMediaHealth

type SolidStateMediaHealth struct {
	// PercentageUsedEnduranceIndicator is a value which represents a
	// vendor-specific wear estimate of the solid state medium.
	// A new device starts at 0, at 100 the device is considered end-of-life.
	// Values up to 255 are possible.
	PercentageUsedEnduranceIndicator uint8
}

type UnknownError

type UnknownError struct {
	RawSenseData []byte
}

UnknownError is a type of error returned by SCSI which is not understood by this library. This can be a vendor-specific or future error.

func (*UnknownError) Error

func (e *UnknownError) Error() string

type VPDPageCode

type VPDPageCode uint8

VPDPageCode see Table 498

const (
	SupportedVPDs                      VPDPageCode = 0x00
	UnitSerialNumberVPD                VPDPageCode = 0x80
	DeviceIdentificationVPD            VPDPageCode = 0x83
	SoftwareInterfaceIdentificationVPD VPDPageCode = 0x84
	ManagementNetworkAddressesVPD      VPDPageCode = 0x85
	ExtendedINQUIRYDataVPD             VPDPageCode = 0x86
	ModePagePolicyVPD                  VPDPageCode = 0x87
	SCSIPortsVPD                       VPDPageCode = 0x88
	ATAInformationVPD                  VPDPageCode = 0x89
	PowerConditionVPD                  VPDPageCode = 0x8a
	DeviceConstituentsVPD              VPDPageCode = 0x8b
)

func (VPDPageCode) String

func (v VPDPageCode) String() string

type Version

type Version uint8

Version represents a specific standardized version of the SCSI primary command set (SPC). The enum values are sorted, so for example version >= SPC3 is true for SPC-3 and all later standards. See table 151 in the standard.

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL