scsi_sense.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef __SCSI_SENSE_H__
  2. #define __SCSI_SENSE_H__
  3. #define SCSI_SENSE_NO_SENSE 0
  4. #define SCSI_SENSE_RECOVERED_ERROR 0x1
  5. #define SCSI_SENSE_NOT_READY 0x2
  6. #define SCSI_SENSE_MEDUIM_ERROR 0x3
  7. #define SCSI_SENSE_HARDWARE_ERROR 0x4
  8. #define SCSI_SENSE_ILLEGAL_REQUEST 0x5
  9. #define SCSI_SENSE_UNIT_ATTENTION 0x6
  10. #define SCSI_SENSE_DATA_PROTECT 0x7
  11. #define SCSI_SENSE_BLANK_CHECK 0x8
  12. #define SCSI_SENSE_VENDOR_SPECIFIC 0x9
  13. #define SCSI_SENSE_COPY_ABORTED 0xa
  14. #define SCSI_SENSE_ABORTED_COMMAND 0xb
  15. #define SCSI_SENSE_EQUAL 0xc
  16. #define SCSI_SENSE_VOLUME_OVERFLOW 0xd
  17. #define SCSI_SENSE_MISCOMPARE 0xe
  18. #define SCSI_SENSE_RESERVED 0xf
  19. #define SCSI_ASC_INVALID_OPERATION_CODE 0x2000
  20. #define SCSI_ASC_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE 0x2100
  21. #define SCSI_ASC_INVALID_FIELD_IN_CDB 0x2400
  22. #define SCSI_ASC_LOGICAL_UNIT_NOT_SUPPORTED 0x2500
  23. #define SCSI_ASC_INVALID_FIELD_PARAMETER_LIST 0x2600
  24. #define SCSI_ASC_WRITE_PROTECTED 0x2700
  25. #define SCSI_ASC_CANNOT_READ_MEDIUM_UNKNOWN_FORMAT 0x3001
  26. #define SCSI_ASC_CANNOT_READ_MEDIUM_INCOMPATIBLE_FORMAT 0x3002
  27. #define SCSI_ASC_SAVING_PARAMETERS_NOT_SUPPORTED 0x3900
  28. #define SCSI_ASC_MEDIUM_NOT_PRESENT 0x3A00
  29. #define SCSI_ASC_LUN_NOT_READY_MANUAL_INTERVENTION_REQUIRED 0x0403
  30. // SCSI mode page codes
  31. #define SCSI_SENSE_MODE_VENDOR 0x00
  32. #define SCSI_SENSE_MODE_READ_WRITE_ERROR_RECOVERY 0x01
  33. #define SCSI_SENSE_MODE_DISCONNECT_RECONNECT 0x02
  34. #define SCSI_SENSE_MODE_FORMAT_DEVICE 0x03
  35. #define SCSI_SENSE_MODE_DISK_GEOMETRY 0x04
  36. #define SCSI_SENSE_MODE_FLEXABLE_GEOMETRY 0x05
  37. #define SCSI_SENSE_MODE_CACHING 0x08
  38. #define SCSI_SENSE_MODE_CDROM 0x0D
  39. #define SCSI_SENSE_MODE_CDROM_AUDIO_CONTROL 0x0E
  40. #define SCSI_SENSE_MODE_VENDOR_APPLE 0x30
  41. #define SCSI_SENSE_MODE_ALL 0x3F
  42. #endif