/linux/drivers/scsi/device_handler/ |
A D | scsi_dh_hp_sw.c | 44 struct scsi_sense_hdr *sshdr) in tur_done() argument 48 switch (sshdr->sense_key) { in tur_done() 53 if (sshdr->asc == 0x04 && sshdr->ascq == 2) { in tur_done() 67 HP_SW_NAME, sshdr->sense_key, sshdr->asc, in tur_done() 68 sshdr->ascq); in tur_done() 84 struct scsi_sense_hdr sshdr; in hp_sw_tur() local 93 if (scsi_sense_valid(&sshdr)) in hp_sw_tur() 120 struct scsi_sense_hdr sshdr; in hp_sw_start_stop() local 137 switch (sshdr.sense_key) { in hp_sw_start_stop() 139 if (sshdr.asc == 0x04 && sshdr.ascq == 3) { in hp_sw_start_stop() [all …]
|
A D | scsi_dh_emc.c | 101 struct scsi_sense_hdr *sshdr) in trespass_endio() argument 107 "command.\n", CLARIION_NAME, sshdr->sense_key, in trespass_endio() 108 sshdr->asc, sshdr->ascq); in trespass_endio() 110 if (sshdr->sense_key == 0x05 && sshdr->asc == 0x04 && in trespass_endio() 111 sshdr->ascq == 0x00) { in trespass_endio() 120 } else if (sshdr->sense_key == 0x02 && sshdr->asc == 0x04 && in trespass_endio() 121 sshdr->ascq == 0x03) { in trespass_endio() 241 struct scsi_sense_hdr sshdr; in send_trespass_cmd() local 267 &sshdr, CLARIION_TIMEOUT * HZ, CLARIION_RETRIES, in send_trespass_cmd() 270 if (scsi_sense_valid(&sshdr)) in send_trespass_cmd() [all …]
|
/linux/drivers/scsi/ |
A D | scsi_common.c | 148 struct scsi_sense_hdr *sshdr) in scsi_normalize_sense() argument 150 memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); in scsi_normalize_sense() 157 if (!scsi_sense_valid(sshdr)) in scsi_normalize_sense() 160 if (sshdr->response_code >= 0x72) { in scsi_normalize_sense() 165 sshdr->sense_key = (sense_buffer[1] & 0xf); in scsi_normalize_sense() 167 sshdr->asc = sense_buffer[2]; in scsi_normalize_sense() 169 sshdr->ascq = sense_buffer[3]; in scsi_normalize_sense() 171 sshdr->additional_length = sense_buffer[7]; in scsi_normalize_sense() 177 sshdr->sense_key = (sense_buffer[2] & 0xf); in scsi_normalize_sense() 182 sshdr->asc = sense_buffer[12]; in scsi_normalize_sense() [all …]
|
A D | sr_ioctl.c | 190 if (cgc->sshdr) in sr_do_ioctl() 191 sshdr = cgc->sshdr; in sr_do_ioctl() 220 if (sshdr->asc == 0x04 && in sr_do_ioctl() 244 if (sshdr->asc == 0x20 && in sr_do_ioctl() 245 sshdr->ascq == 0x00) in sr_do_ioctl() 298 if (scsi_sense_valid(&sshdr) && sshdr.sense_key == NOT_READY in sr_drive_status() 299 && sshdr.asc == 0x04 && sshdr.ascq == 0x01) in sr_drive_status() 316 if (scsi_sense_valid(&sshdr) && sshdr.sense_key == NOT_READY in sr_drive_status() 317 && sshdr.asc == 0x04 && sshdr.ascq == 0x02) in sr_drive_status() 323 if (sshdr.sense_key == NOT_READY && sshdr.asc == 0x04) in sr_drive_status() [all …]
|
A D | sd.c | 1700 if (!sshdr) in sd_sync_cache() 2213 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk() 2215 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk() 2217 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk() 2219 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk() 2385 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16() 2393 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16() 2470 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_10() 2659 sshdr); in sd_do_mode_sense() 2766 &data, &sshdr); in sd_read_cache_type() [all …]
|
A D | scsi_error.c | 457 if (sshdr->asc == 0x3f && sshdr->ascq == 0x03) { in scsi_report_sense() 461 } else if (sshdr->asc == 0x3f && sshdr->ascq == 0x0e) { in scsi_report_sense() 476 if (sshdr->asc == 0x38 && sshdr->ascq == 0x07) { in scsi_report_sense() 490 if (sshdr->asc == 0x2a && sshdr->ascq == 0x01) { in scsi_report_sense() 494 } else if (sshdr->asc == 0x2a && sshdr->ascq == 0x06) { in scsi_report_sense() 587 if (sshdr.asc == 0xc1 && sshdr.ascq == 0x01 && in scsi_check_sense() 607 if (sshdr.asc != 0x28 || sshdr.ascq != 0x00) { in scsi_check_sense() 618 sshdr.asc == 0x3f && sshdr.ascq == 0x0e) in scsi_check_sense() 624 if ((sshdr.asc == 0x04) && (sshdr.ascq == 0x01)) in scsi_check_sense() 631 (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) in scsi_check_sense() [all …]
|
A D | scsi_logging.c | 271 const struct scsi_sense_hdr *sshdr) in scsi_format_sense_hdr() argument 277 sense_txt = scsi_sense_key_string(sshdr->sense_key); in scsi_format_sense_hdr() 283 "0x%x ", sshdr->sense_key); in scsi_format_sense_hdr() 287 if (sshdr->response_code >= 0x72) in scsi_format_sense_hdr() 320 int tag, const struct scsi_sense_hdr *sshdr) in scsi_log_print_sense_hdr() argument 338 sshdr->asc, sshdr->ascq); in scsi_log_print_sense_hdr() 347 struct scsi_sense_hdr sshdr; in scsi_log_print_sense() local 349 if (scsi_normalize_sense(sense_buffer, sense_len, &sshdr)) in scsi_log_print_sense() 350 scsi_log_print_sense_hdr(sdev, name, tag, &sshdr); in scsi_log_print_sense() 360 const struct scsi_sense_hdr *sshdr) in scsi_print_sense_hdr() argument [all …]
|
A D | scsi_lib.c | 259 if (sshdr) in __scsi_execute() 698 sshdr.asc == 0x20 && sshdr.ascq == 0x00) && in scsi_io_completion_action() 708 } else if (sshdr.asc == 0x20 || sshdr.asc == 0x24) { in scsi_io_completion_action() 723 if (sshdr.asc == 0x04) { in scsi_io_completion_action() 724 switch (sshdr.ascq) { in scsi_io_completion_action() 756 if ((sshdr.asc == 0x0C && sshdr.ascq == 0x12) || in scsi_io_completion_action() 758 (sshdr.ascq == 0x0E || sshdr.ascq == 0x0F))) { in scsi_io_completion_action() 863 if ((sshdr.asc == 0x0) && (sshdr.ascq == 0x1d)) in scsi_io_completion_nz_result() 2139 if (!sshdr) in scsi_mode_sense() 2140 sshdr = &my_sshdr; in scsi_mode_sense() [all …]
|
A D | sr.c | 211 struct scsi_sense_hdr sshdr; in sr_get_events() local 215 &sshdr, SR_TIMEOUT, MAX_RETRIES, NULL); in sr_get_events() 216 if (scsi_sense_valid(&sshdr) && sshdr.sense_key == UNIT_ATTENTION) in sr_get_events() 246 struct scsi_sense_hdr sshdr; in sr_check_events() local 292 (scsi_sense_valid(&sshdr) && sshdr.asc != 0x3a); in sr_check_events() 514 struct scsi_sense_hdr sshdr; in sr_revalidate_disk() local 841 struct scsi_sense_hdr sshdr; in get_capabilities() local 866 scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr); in get_capabilities() 999 struct scsi_sense_hdr sshdr; in sr_read_cdda_bpc() local 1002 &sshdr); in sr_read_cdda_bpc() [all …]
|
A D | ses.c | 91 struct scsi_sense_hdr sshdr; in ses_recv_diag() local 95 &sshdr, SES_TIMEOUT, 1, NULL); in ses_recv_diag() 96 } while (ret > 0 && --retries && scsi_sense_valid(&sshdr) && in ses_recv_diag() 97 (sshdr.sense_key == NOT_READY || in ses_recv_diag() 98 (sshdr.sense_key == UNIT_ATTENTION && sshdr.asc == 0x29))); in ses_recv_diag() 131 struct scsi_sense_hdr sshdr; in ses_send_diag() local 136 &sshdr, SES_TIMEOUT, 1, NULL); in ses_send_diag() 137 } while (result > 0 && --retries && scsi_sense_valid(&sshdr) && in ses_send_diag() 138 (sshdr.sense_key == NOT_READY || in ses_send_diag() 139 (sshdr.sense_key == UNIT_ATTENTION && sshdr.asc == 0x29))); in ses_send_diag()
|
A D | scsi.c | 479 struct scsi_sense_hdr sshdr; in scsi_report_opcode() local 494 &sshdr, 30 * HZ, 3, NULL); in scsi_report_opcode() 498 if (result && scsi_sense_valid(&sshdr) && in scsi_report_opcode() 499 sshdr.sense_key == ILLEGAL_REQUEST && in scsi_report_opcode() 500 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && sshdr.ascq == 0x00) in scsi_report_opcode()
|
A D | ch.c | 164 static int ch_find_errno(struct scsi_sense_hdr *sshdr) in ch_find_errno() argument 169 if (scsi_sense_valid(sshdr) && in ch_find_errno() 170 sshdr->asc != 0) { in ch_find_errno() 172 if (ch_err[i].sense == sshdr->sense_key && in ch_find_errno() 173 ch_err[i].asc == sshdr->asc && in ch_find_errno() 174 ch_err[i].ascq == sshdr->ascq) { in ch_find_errno() 191 struct scsi_sense_hdr sshdr; in ch_do_scsi() local 199 buflength, &sshdr, timeout * HZ, in ch_do_scsi() 203 if (scsi_sense_valid(&sshdr)) { in ch_do_scsi() 206 errno = ch_find_errno(&sshdr); in ch_do_scsi() [all …]
|
A D | sd_zbc.c | 99 struct scsi_sense_hdr sshdr; in sd_zbc_do_report_zones() local 113 buf, buflen, &sshdr, in sd_zbc_do_report_zones() 119 if (result > 0 && scsi_sense_valid(&sshdr)) in sd_zbc_do_report_zones() 120 sd_print_sense_hdr(sdkp, &sshdr); in sd_zbc_do_report_zones() 516 struct scsi_sense_hdr *sshdr) in sd_zbc_complete() argument 523 sshdr->sense_key == ILLEGAL_REQUEST && in sd_zbc_complete() 524 sshdr->asc == 0x24) { in sd_zbc_complete()
|
A D | sd.h | 226 struct scsi_sense_hdr *sshdr); 256 unsigned int good_bytes, struct scsi_sense_hdr *sshdr) in sd_zbc_complete() argument 272 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr);
|
A D | scsi_scan.c | 607 struct scsi_sense_hdr sshdr; in scsi_probe_lun() local 634 inq_result, try_inquiry_len, &sshdr, in scsi_probe_lun() 650 scsi_sense_valid(&sshdr)) { in scsi_probe_lun() 651 if ((sshdr.sense_key == UNIT_ATTENTION) && in scsi_probe_lun() 652 ((sshdr.asc == 0x28) || in scsi_probe_lun() 653 (sshdr.asc == 0x29)) && in scsi_probe_lun() 654 (sshdr.ascq == 0)) in scsi_probe_lun() 1342 struct scsi_sense_hdr sshdr; in scsi_report_lun_scan() local 1420 lun_data, length, &sshdr, in scsi_report_lun_scan() 1430 else if (scsi_sense_valid(&sshdr)) { in scsi_report_lun_scan() [all …]
|
A D | scsi_transport_spi.c | 110 struct scsi_sense_hdr *sshdr) in spi_execute() argument 116 if (!sshdr) in spi_execute() 117 sshdr = &sshdr_tmp; in spi_execute() 125 sshdr, DV_TIMEOUT, /* retries */ 1, in spi_execute() 130 if (result < 0 || !scsi_sense_valid(sshdr) || in spi_execute() 131 sshdr->sense_key != UNIT_ATTENTION) in spi_execute() 633 struct scsi_sense_hdr sshdr; in spi_dv_device_echo_buffer() local 679 buffer, len, &sshdr); in spi_dv_device_echo_buffer() 683 if (scsi_sense_valid(&sshdr) in spi_dv_device_echo_buffer() 684 && sshdr.sense_key == ILLEGAL_REQUEST in spi_dv_device_echo_buffer() [all …]
|
A D | scsi_ioctl.c | 71 struct scsi_sense_hdr sshdr; in ioctl_internal_command() local 77 &sshdr, timeout, retries, NULL); in ioctl_internal_command() 84 if (scsi_sense_valid(&sshdr)) { in ioctl_internal_command() 85 switch (sshdr.sense_key) { in ioctl_internal_command() 94 sshdr.asc, sshdr.ascq); in ioctl_internal_command() 111 scsi_print_sense_hdr(sdev, NULL, &sshdr); in ioctl_internal_command()
|
A D | myrs.c | 820 struct scsi_sense_hdr sshdr = {0}; in myrs_log_event() local 825 if (!scsi_normalize_sense(ev->sense_data, 40, &sshdr)) { in myrs_log_event() 826 memset(&sshdr, 0x0, sizeof(sshdr)); in myrs_log_event() 834 if (sshdr.sense_key == VENDOR_SPECIFIC && in myrs_log_event() 835 (sshdr.asc == 0x80 || sshdr.asc == 0x81)) in myrs_log_event() 836 ev->ev_code = ((sshdr.asc - 0x80) << 8 | sshdr.ascq); in myrs_log_event() 894 if (sshdr.sense_key == NO_SENSE || in myrs_log_event() 895 (sshdr.sense_key == NOT_READY && in myrs_log_event() 896 sshdr.asc == 0x04 && (sshdr.ascq == 0x01 || in myrs_log_event() 897 sshdr.ascq == 0x02))) in myrs_log_event() [all …]
|
/linux/include/scsi/ |
A D | scsi_eh.h | 19 struct scsi_sense_hdr *sshdr); 22 static inline bool scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr) in scsi_sense_is_deferred() argument 24 return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1)); in scsi_sense_is_deferred()
|
A D | scsi_common.h | 61 static inline bool scsi_sense_valid(const struct scsi_sense_hdr *sshdr) in scsi_sense_valid() argument 63 if (!sshdr) in scsi_sense_valid() 66 return (sshdr->response_code & 0x70) == 0x70; in scsi_sense_valid() 70 struct scsi_sense_hdr *sshdr);
|
A D | scsi_device.h | 423 int retries, struct scsi_sense_hdr *sshdr); 452 unsigned char *sense, struct scsi_sense_hdr *sshdr, 457 sshdr, timeout, retries, flags, rq_flags, resid) \ argument 462 sense, sshdr, timeout, retries, flags, rq_flags, \ 467 unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, in scsi_execute_req() argument 471 bufflen, NULL, sshdr, timeout, retries, 0, 0, resid); in scsi_execute_req()
|
/linux/drivers/usb/storage/ |
A D | transport.c | 709 struct scsi_sense_hdr sshdr; in usb_stor_invoke_transport() local 800 &sshdr); in usb_stor_invoke_transport() 805 sshdr.response_code, sshdr.sense_key, in usb_stor_invoke_transport() 806 sshdr.asc, sshdr.ascq); in usb_stor_invoke_transport() 808 usb_stor_show_sense(us, sshdr.sense_key, sshdr.asc, sshdr.ascq); in usb_stor_invoke_transport() 823 if (sshdr.sense_key == 0 && sshdr.asc == 0 && sshdr.ascq == 0 && in usb_stor_invoke_transport() 853 if ((sshdr.response_code & 0x72) == 0x72) in usb_stor_invoke_transport()
|
/linux/drivers/block/ |
A D | pktcdvd.c | 751 struct scsi_sense_hdr *sshdr = cgc->sshdr; in pkt_dump_sense() local 753 if (sshdr) in pkt_dump_sense() 756 sshdr->sense_key, sshdr->asc, sshdr->ascq, in pkt_dump_sense() 794 cgc.sshdr = &sshdr; in pkt_set_speed() 1636 cgc.sshdr = &sshdr; in pkt_set_write_settings() 1652 cgc.sshdr = &sshdr; in pkt_set_write_settings() 1895 cgc.sshdr = &sshdr; in pkt_write_caching() 1943 cgc.sshdr = &sshdr; in pkt_get_max_speed() 2003 cgc.sshdr = &sshdr; in pkt_media_speed() 2018 cgc.sshdr = &sshdr; in pkt_media_speed() [all …]
|
/linux/drivers/scsi/cxlflash/ |
A D | superpipe.c | 335 struct scsi_sense_hdr sshdr; in read_cap16() local 361 CMD_BUFSIZE, NULL, &sshdr, to, CMD_RETRIES, in read_cap16() 372 if (result > 0 && scsi_sense_valid(&sshdr)) { in read_cap16() 374 switch (sshdr.sense_key) { in read_cap16() 381 switch (sshdr.asc) { in read_cap16() 1778 struct scsi_sense_hdr sshdr = { 0 }; in process_sense() local 1782 DK_CXLFLASH_VERIFY_SENSE_LEN, &sshdr); in process_sense() 1789 switch (sshdr.sense_key) { in process_sense() 1795 switch (sshdr.asc) { in process_sense() 1823 sshdr.sense_key, sshdr.asc, sshdr.ascq, rc); in process_sense()
|
/linux/drivers/cdrom/ |
A D | cdrom.c | 356 if (cgc->sshdr) { in cdrom_dummy_generic_packet() 357 cgc->sshdr->sense_key = 0x05; in cdrom_dummy_generic_packet() 358 cgc->sshdr->asc = 0x20; in cdrom_dummy_generic_packet() 359 cgc->sshdr->ascq = 0x00; in cdrom_dummy_generic_packet() 2954 struct scsi_sense_hdr sshdr; in mmc_ioctl_cdrom_read_data() local 2982 memset(&sshdr, 0, sizeof(sshdr)); in mmc_ioctl_cdrom_read_data() 2983 cgc->sshdr = &sshdr; in mmc_ioctl_cdrom_read_data() 2986 if (ret && sshdr.sense_key == 0x05 && in mmc_ioctl_cdrom_read_data() 2987 sshdr.asc == 0x20 && in mmc_ioctl_cdrom_read_data() 2988 sshdr.ascq == 0x00) { in mmc_ioctl_cdrom_read_data() [all …]
|