diff options
author | mav <mav@FreeBSD.org> | 2017-01-05 13:29:57 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2017-01-05 13:29:57 +0000 |
commit | c92326773b9fea9843f6e372f044c92a9c171879 (patch) | |
tree | dcce245aa62e63d15ff1bfd9a3ca892d5662d46d /sys/cam/scsi/scsi_all.h | |
parent | 56e0cd7b993a6bf5bd31e4d8473ee46441be7c57 (diff) | |
download | FreeBSD-src-c92326773b9fea9843f6e372f044c92a9c171879.zip FreeBSD-src-c92326773b9fea9843f6e372f044c92a9c171879.tar.gz |
MFC r305591: Decode ATA Status Return descriptor.
Diffstat (limited to 'sys/cam/scsi/scsi_all.h')
-rw-r--r-- | sys/cam/scsi/scsi_all.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index c3913ba..5dc496e 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -3399,6 +3399,29 @@ struct scsi_sense_osd_attr_id }; /* + * ATA Return descriptor, used for the SCSI ATA PASS-THROUGH(12), (16) and + * (32) commands. Described in SAT-4r05. + */ +struct scsi_sense_ata_ret_desc +{ + uint8_t desc_type; +#define SSD_DESC_ATA 0x09 + uint8_t length; + uint8_t flags; +#define SSD_DESC_ATA_FLAG_EXTEND 0x01 + uint8_t error; + uint8_t count_15_8; + uint8_t count_7_0; + uint8_t lba_31_24; + uint8_t lba_7_0; + uint8_t lba_39_32; + uint8_t lba_15_8; + uint8_t lba_47_40; + uint8_t lba_23_16; + uint8_t device; + uint8_t status; +}; +/* * Used with Sense keys No Sense (0x00) and Not Ready (0x02). * * Maximum descriptors allowed: 32 (as of SPC-4) @@ -3663,6 +3686,10 @@ void scsi_sense_progress_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, u_int sense_len, uint8_t *cdb, int cdb_len, struct scsi_inquiry_data *inq_data, struct scsi_sense_desc_header *header); +void scsi_sense_ata_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, + u_int sense_len, uint8_t *cdb, int cdb_len, + struct scsi_inquiry_data *inq_data, + struct scsi_sense_desc_header *header); void scsi_sense_forwarded_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, u_int sense_len, uint8_t *cdb, int cdb_len, struct scsi_inquiry_data *inq_data, |