Lines Matching refs:sense_buffer
138 bool scsi_normalize_sense(const u8 *sense_buffer, int sb_len, in scsi_normalize_sense() argument
143 if (!sense_buffer || !sb_len) in scsi_normalize_sense()
146 sshdr->response_code = (sense_buffer[0] & 0x7f); in scsi_normalize_sense()
156 sshdr->sense_key = (sense_buffer[1] & 0xf); in scsi_normalize_sense()
158 sshdr->asc = sense_buffer[2]; in scsi_normalize_sense()
160 sshdr->ascq = sense_buffer[3]; in scsi_normalize_sense()
162 sshdr->additional_length = sense_buffer[7]; in scsi_normalize_sense()
168 sshdr->sense_key = (sense_buffer[2] & 0xf); in scsi_normalize_sense()
170 sb_len = (sb_len < (sense_buffer[7] + 8)) ? in scsi_normalize_sense()
171 sb_len : (sense_buffer[7] + 8); in scsi_normalize_sense()
173 sshdr->asc = sense_buffer[12]; in scsi_normalize_sense()
175 sshdr->ascq = sense_buffer[13]; in scsi_normalize_sense()
196 const u8 * scsi_sense_desc_find(const u8 * sense_buffer, int sb_len, in scsi_sense_desc_find() argument
202 if ((sb_len < 8) || (0 == (add_sen_len = sense_buffer[7]))) in scsi_sense_desc_find()
204 if ((sense_buffer[0] < 0x72) || (sense_buffer[0] > 0x73)) in scsi_sense_desc_find()
208 descp = &sense_buffer[8]; in scsi_sense_desc_find()