/linux-4.4.14/drivers/scsi/ |
D | scsi_common.c | 138 struct scsi_sense_hdr *sshdr) in scsi_normalize_sense() argument 143 memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); in scsi_normalize_sense() 145 sshdr->response_code = (sense_buffer[0] & 0x7f); in scsi_normalize_sense() 147 if (!scsi_sense_valid(sshdr)) in scsi_normalize_sense() 150 if (sshdr->response_code >= 0x72) { in scsi_normalize_sense() 155 sshdr->sense_key = (sense_buffer[1] & 0xf); in scsi_normalize_sense() 157 sshdr->asc = sense_buffer[2]; in scsi_normalize_sense() 159 sshdr->ascq = sense_buffer[3]; in scsi_normalize_sense() 161 sshdr->additional_length = sense_buffer[7]; in scsi_normalize_sense() 167 sshdr->sense_key = (sense_buffer[2] & 0xf); in scsi_normalize_sense() [all …]
|
D | sr_ioctl.c | 188 struct scsi_sense_hdr sshdr; in sr_do_ioctl() local 213 scsi_normalize_sense((char *)sense, sizeof(*sense), &sshdr); in sr_do_ioctl() 217 switch (sshdr.sense_key) { in sr_do_ioctl() 228 if (sshdr.asc == 0x04 && in sr_do_ioctl() 229 sshdr.ascq == 0x01) { in sr_do_ioctl() 252 if (sshdr.asc == 0x20 && in sr_do_ioctl() 253 sshdr.ascq == 0x00) in sr_do_ioctl() 297 struct scsi_sense_hdr sshdr; in sr_drive_status() local 304 if (!scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr)) in sr_drive_status() 308 if (scsi_sense_valid(&sshdr) && sshdr.sense_key == NOT_READY in sr_drive_status() [all …]
|
D | sd.c | 161 struct scsi_sense_hdr sshdr; in cache_type_store() local 211 SD_MAX_RETRIES, &data, &sshdr)) { in cache_type_store() 212 if (scsi_sense_valid(&sshdr)) in cache_type_store() 213 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store() 1372 struct scsi_sense_hdr *sshdr) in media_not_present() argument 1374 if (!scsi_sense_valid(sshdr)) in media_not_present() 1378 switch (sshdr->sense_key) { in media_not_present() 1382 if (sshdr->asc == 0x3A) { in media_not_present() 1403 struct scsi_sense_hdr *sshdr = NULL; in sd_check_events() local 1431 sshdr = kzalloc(sizeof(*sshdr), GFP_KERNEL); in sd_check_events() [all …]
|
D | scsi_error.c | 389 struct scsi_sense_hdr *sshdr) in scsi_report_sense() argument 393 if (sshdr->sense_key == UNIT_ATTENTION) { in scsi_report_sense() 394 if (sshdr->asc == 0x3f && sshdr->ascq == 0x03) { in scsi_report_sense() 398 } else if (sshdr->asc == 0x3f && sshdr->ascq == 0x0e) { in scsi_report_sense() 406 } else if (sshdr->asc == 0x3f) in scsi_report_sense() 413 if (sshdr->asc == 0x38 && sshdr->ascq == 0x07) { in scsi_report_sense() 421 if (sshdr->asc == 0x2a && sshdr->ascq == 0x01) { in scsi_report_sense() 425 } else if (sshdr->asc == 0x2a && sshdr->ascq == 0x06) { in scsi_report_sense() 429 } else if (sshdr->asc == 0x2a && sshdr->ascq == 0x09) { in scsi_report_sense() 433 } else if (sshdr->asc == 0x2a) in scsi_report_sense() [all …]
|
D | scsi_ioctl.c | 92 struct scsi_sense_hdr sshdr; in ioctl_internal_command() local 98 &sshdr, timeout, retries, NULL); in ioctl_internal_command() 104 (scsi_sense_valid(&sshdr))) { in ioctl_internal_command() 105 switch (sshdr.sense_key) { in ioctl_internal_command() 114 sshdr.asc, sshdr.ascq); in ioctl_internal_command() 129 scsi_print_sense_hdr(sdev, NULL, &sshdr); in ioctl_internal_command()
|
D | scsi_logging.c | 317 const struct scsi_sense_hdr *sshdr) in scsi_format_sense_hdr() argument 323 sense_txt = scsi_sense_key_string(sshdr->sense_key); in scsi_format_sense_hdr() 329 "0x%x ", sshdr->sense_key); in scsi_format_sense_hdr() 331 scsi_sense_is_deferred(sshdr) ? "[deferred] " : "[current] "); in scsi_format_sense_hdr() 333 if (sshdr->response_code >= 0x72) in scsi_format_sense_hdr() 366 int tag, const struct scsi_sense_hdr *sshdr) in scsi_log_print_sense_hdr() argument 375 off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr); in scsi_log_print_sense_hdr() 384 sshdr->asc, sshdr->ascq); in scsi_log_print_sense_hdr() 393 struct scsi_sense_hdr sshdr; in scsi_log_print_sense() local 395 if (scsi_normalize_sense(sense_buffer, sense_len, &sshdr)) in scsi_log_print_sense() [all …]
|
D | scsi_lib.c | 268 struct scsi_sense_hdr *sshdr, int timeout, int retries, in scsi_execute_req_flags() argument 274 if (sshdr) { in scsi_execute_req_flags() 281 if (sshdr) in scsi_execute_req_flags() 282 scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, sshdr); in scsi_execute_req_flags() 824 struct scsi_sense_hdr sshdr; in scsi_io_completion() local 832 sense_valid = scsi_command_normalize_sense(cmd, &sshdr); in scsi_io_completion() 834 sense_deferred = scsi_sense_is_deferred(&sshdr); in scsi_io_completion() 898 if (sense_valid && (sshdr.sense_key == RECOVERED_ERROR)) { in scsi_io_completion() 903 if ((sshdr.asc == 0x0) && (sshdr.ascq == 0x1d)) in scsi_io_completion() 946 switch (sshdr.sense_key) { in scsi_io_completion() [all …]
|
D | sr.c | 201 struct scsi_sense_hdr sshdr; in sr_get_events() local 205 &sshdr, SR_TIMEOUT, MAX_RETRIES, NULL); in sr_get_events() 206 if (scsi_sense_valid(&sshdr) && sshdr.sense_key == UNIT_ATTENTION) in sr_get_events() 234 struct scsi_sense_hdr sshdr; in sr_check_events() local 272 ret = scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr); in sr_check_events() 280 (scsi_sense_valid(&sshdr) && sshdr.asc != 0x3a); in sr_check_events() 596 struct scsi_sense_hdr sshdr; in sr_block_revalidate_disk() local 599 if (scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr)) in sr_block_revalidate_disk() 836 struct scsi_sense_hdr sshdr; in get_capabilities() local 860 scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr); in get_capabilities()
|
D | ch.c | 163 static int ch_find_errno(struct scsi_sense_hdr *sshdr) in ch_find_errno() argument 168 if (scsi_sense_valid(sshdr) && in ch_find_errno() 169 sshdr->asc != 0) { in ch_find_errno() 171 if (ch_err[i].sense == sshdr->sense_key && in ch_find_errno() 172 ch_err[i].asc == sshdr->asc && in ch_find_errno() 173 ch_err[i].ascq == sshdr->ascq) { in ch_find_errno() 190 struct scsi_sense_hdr sshdr; in ch_do_scsi() local 198 buflength, &sshdr, timeout * HZ, in ch_do_scsi() 203 scsi_print_sense_hdr(ch->device, ch->name, &sshdr); in ch_do_scsi() 204 errno = ch_find_errno(&sshdr); in ch_do_scsi() [all …]
|
D | scsi_scan.c | 567 struct scsi_sense_hdr sshdr; in scsi_probe_lun() local 594 inq_result, try_inquiry_len, &sshdr, in scsi_probe_lun() 610 scsi_sense_valid(&sshdr)) { in scsi_probe_lun() 611 if ((sshdr.sense_key == UNIT_ATTENTION) && in scsi_probe_lun() 612 ((sshdr.asc == 0x28) || in scsi_probe_lun() 613 (sshdr.asc == 0x29)) && in scsi_probe_lun() 614 (sshdr.ascq == 0)) in scsi_probe_lun() 1307 struct scsi_sense_hdr sshdr; in scsi_report_lun_scan() local 1389 lun_data, length, &sshdr, in scsi_report_lun_scan() 1399 else if (scsi_sense_valid(&sshdr)) { in scsi_report_lun_scan() [all …]
|
D | scsi.c | 872 struct scsi_sense_hdr sshdr; in scsi_report_opcode() local 887 &sshdr, 30 * HZ, 3, NULL); in scsi_report_opcode() 889 if (result && scsi_sense_valid(&sshdr) && in scsi_report_opcode() 890 sshdr.sense_key == ILLEGAL_REQUEST && in scsi_report_opcode() 891 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && sshdr.ascq == 0x00) in scsi_report_opcode()
|
D | scsi_transport_spi.c | 122 struct scsi_sense_hdr *sshdr) in spi_execute() argument 136 if (!sshdr) in spi_execute() 137 sshdr = &sshdr_tmp; in spi_execute() 140 sshdr) in spi_execute() 141 && sshdr->sense_key == UNIT_ATTENTION) in spi_execute() 643 struct scsi_sense_hdr sshdr; in spi_dv_device_echo_buffer() local 689 buffer, len, &sshdr); in spi_dv_device_echo_buffer() 693 if (scsi_sense_valid(&sshdr) in spi_dv_device_echo_buffer() 694 && sshdr.sense_key == ILLEGAL_REQUEST in spi_dv_device_echo_buffer() 696 && sshdr.asc == 0x24 && sshdr.ascq == 0x00) in spi_dv_device_echo_buffer()
|
D | sg.c | 1319 struct scsi_sense_hdr sshdr; in sg_rq_end_io() local 1334 && scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, &sshdr) in sg_rq_end_io() 1335 && !scsi_sense_is_deferred(&sshdr) in sg_rq_end_io() 1336 && sshdr.sense_key == UNIT_ATTENTION in sg_rq_end_io()
|
D | hpsa.c | 323 struct scsi_sense_hdr sshdr; in decode_sense_data() local 333 rc = scsi_normalize_sense(sense_data, sense_data_len, &sshdr); in decode_sense_data() 335 *sense_key = sshdr.sense_key; in decode_sense_data() 336 *asc = sshdr.asc; in decode_sense_data() 337 *ascq = sshdr.ascq; in decode_sense_data()
|
/linux-4.4.14/drivers/scsi/device_handler/ |
D | scsi_dh_hp_sw.c | 61 struct scsi_sense_hdr sshdr; in tur_done() local 64 ret = scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, &sshdr); in tur_done() 72 switch (sshdr.sense_key) { in tur_done() 77 if ((sshdr.asc == 0x04) && (sshdr.ascq == 2)) { in tur_done() 90 HP_SW_NAME, sshdr.sense_key, sshdr.asc, in tur_done() 91 sshdr.ascq); in tur_done() 161 struct scsi_sense_hdr sshdr; in start_done() local 164 rc = scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, &sshdr); in start_done() 172 switch (sshdr.sense_key) { in start_done() 174 if ((sshdr.asc == 0x04) && (sshdr.ascq == 3)) { in start_done() [all …]
|
D | scsi_dh_emc.c | 122 struct scsi_sense_hdr sshdr; in trespass_endio() local 124 if (!scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, &sshdr)) { in trespass_endio() 127 "command.\n", CLARIION_NAME, sshdr.sense_key, in trespass_endio() 128 sshdr.asc, sshdr.ascq); in trespass_endio() 130 if ((sshdr.sense_key == 0x05) && (sshdr.asc == 0x04) && in trespass_endio() 131 (sshdr.ascq == 0x00)) { in trespass_endio() 140 } else if ((sshdr.sense_key == 0x02) && (sshdr.asc == 0x04) && in trespass_endio() 141 (sshdr.ascq == 0x03)) { in trespass_endio() 464 struct scsi_sense_hdr sshdr; in clariion_std_inquiry() local 467 &sshdr)) { in clariion_std_inquiry() [all …]
|
/linux-4.4.14/include/scsi/ |
D | scsi_eh.h | 18 struct scsi_sense_hdr *sshdr); 20 static inline bool scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr) in scsi_sense_is_deferred() argument 22 return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1)); in scsi_sense_is_deferred()
|
D | scsi_common.h | 53 static inline bool scsi_sense_valid(const struct scsi_sense_hdr *sshdr) in scsi_sense_valid() argument 55 if (!sshdr) in scsi_sense_valid() 58 return (sshdr->response_code & 0x70) == 0x70; in scsi_sense_valid() 62 struct scsi_sense_hdr *sshdr);
|
D | scsi_device.h | 375 int retries, struct scsi_sense_hdr *sshdr); 406 unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, 410 unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, in scsi_execute_req() argument 414 bufflen, sshdr, timeout, retries, resid, 0); in scsi_execute_req()
|
/linux-4.4.14/drivers/usb/storage/ |
D | transport.c | 693 struct scsi_sense_hdr sshdr; in usb_stor_invoke_transport() local 780 &sshdr); in usb_stor_invoke_transport() 785 sshdr.response_code, sshdr.sense_key, in usb_stor_invoke_transport() 786 sshdr.asc, sshdr.ascq); in usb_stor_invoke_transport() 788 usb_stor_show_sense(us, sshdr.sense_key, sshdr.asc, sshdr.ascq); in usb_stor_invoke_transport() 802 if (sshdr.sense_key == 0 && sshdr.asc == 0 && sshdr.ascq == 0 && in usb_stor_invoke_transport() 818 if ((sshdr.response_code & 0x72) == 0x72) in usb_stor_invoke_transport()
|
/linux-4.4.14/drivers/scsi/cxlflash/ |
D | superpipe.c | 348 struct scsi_sense_hdr sshdr; in read_cap16() local 351 &sshdr); in read_cap16() 352 switch (sshdr.sense_key) { in read_cap16() 360 switch (sshdr.asc) { in read_cap16() 1710 struct scsi_sense_hdr sshdr = { 0 }; in process_sense() local 1714 DK_CXLFLASH_VERIFY_SENSE_LEN, &sshdr); in process_sense() 1721 switch (sshdr.sense_key) { in process_sense() 1728 switch (sshdr.asc) { in process_sense() 1756 sshdr.sense_key, sshdr.asc, sshdr.ascq, rc); in process_sense()
|
/linux-4.4.14/drivers/ata/ |
D | libata-scsi.c | 547 struct scsi_sense_hdr sshdr; in ata_cmd_ioctl() local 549 &sshdr); in ata_cmd_ioctl() 550 if (sshdr.sense_key == RECOVERED_ERROR && in ata_cmd_ioctl() 551 sshdr.asc == 0 && sshdr.ascq == 0x1d) in ata_cmd_ioctl() 633 struct scsi_sense_hdr sshdr; in ata_task_ioctl() local 635 &sshdr); in ata_task_ioctl() 636 if (sshdr.sense_key == RECOVERED_ERROR && in ata_task_ioctl() 637 sshdr.asc == 0 && sshdr.ascq == 0x1d) in ata_task_ioctl()
|
/linux-4.4.14/drivers/xen/ |
D | xen-scsiback.c | 330 struct scsi_sense_hdr sshdr; in scsiback_do_resp_with_sense() local 344 &sshdr)) { in scsiback_do_resp_with_sense()
|
/linux-4.4.14/drivers/scsi/ufs/ |
D | ufshcd.c | 4776 struct scsi_sense_hdr sshdr; in ufshcd_set_dev_pwr_mode() local 4819 ret = scsi_execute_req_flags(sdp, cmd, DMA_NONE, NULL, 0, &sshdr, in ufshcd_set_dev_pwr_mode() 4826 scsi_print_sense_hdr(sdp, NULL, &sshdr); in ufshcd_set_dev_pwr_mode()
|