lib: Parse sense specific descriptor
Extend struct scsi_sense with sense specific descriptor information, introduce the function scsi_parse_sense_data() and let that function parse the sense specific descriptor. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
fbc87ab12f
commit
8435f9722e
@@ -254,6 +254,16 @@ struct scsi_sense {
|
||||
unsigned char error_type;
|
||||
enum scsi_sense_key key;
|
||||
int ascq;
|
||||
|
||||
/*
|
||||
* Sense specific descriptor. See also paragraph "Sense key specific
|
||||
* sense data descriptor" in SPC.
|
||||
*/
|
||||
unsigned sense_specific:1;
|
||||
unsigned ill_param_in_cdb:1;
|
||||
unsigned bit_pointer_valid:1;
|
||||
unsigned char bit_pointer;
|
||||
uint16_t field_pointer;
|
||||
};
|
||||
|
||||
struct scsi_data {
|
||||
@@ -1051,6 +1061,8 @@ EXTERN int scsi_datain_getfullsize(struct scsi_task *task);
|
||||
EXTERN void *scsi_datain_unmarshall(struct scsi_task *task);
|
||||
EXTERN void *scsi_cdb_unmarshall(struct scsi_task *task, enum scsi_opcode opcode);
|
||||
|
||||
EXTERN void scsi_parse_sense_data(struct scsi_sense *sense, const uint8_t *sb);
|
||||
|
||||
EXTERN struct scsi_task *scsi_cdb_compareandwrite(uint64_t lba, uint32_t xferlen, int blocksize, int wrprotect, int dpo, int fua, int fua_nv, int group_number);
|
||||
EXTERN struct scsi_task *scsi_cdb_get_lba_status(uint64_t starting_lba, uint32_t alloc_len);
|
||||
EXTERN struct scsi_task *scsi_cdb_orwrite(uint64_t lba, uint32_t xferlen, int blocksize, int wrprotect, int dpo, int fua, int fua_nv, int group_number);
|
||||
|
||||
Reference in New Issue
Block a user