/linux-6.12.1/drivers/scsi/device_handler/ |
D | scsi_dh_hp_sw.c | 44 struct scsi_sense_hdr *sshdr) in tur_done() argument 48 switch (sshdr->sense_key) { in tur_done() 50 if (sshdr->asc == 0x04 && sshdr->ascq == 2) { in tur_done() 64 HP_SW_NAME, sshdr->sense_key, sshdr->asc, in tur_done() 65 sshdr->ascq); in tur_done() 81 struct scsi_sense_hdr sshdr; in hp_sw_tur() local 99 .sshdr = &sshdr, in hp_sw_tur() 105 if (res > 0 && scsi_sense_valid(&sshdr)) { in hp_sw_tur() 106 ret = tur_done(sdev, h, &sshdr); in hp_sw_tur() 129 struct scsi_sense_hdr sshdr; in hp_sw_start_stop() local [all …]
|
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 245 .sshdr = &sshdr, in send_trespass_cmd() 273 if (scsi_sense_valid(&sshdr)) in send_trespass_cmd() [all …]
|
D | scsi_dh_alua.c | 127 int bufflen, struct scsi_sense_hdr *sshdr, int flags) in submit_rtpg() argument 133 .sshdr = sshdr, in submit_rtpg() 158 struct scsi_sense_hdr *sshdr) in submit_stpg() argument 166 .sshdr = sshdr, in submit_stpg()
|
D | scsi_dh_rdac.c | 511 struct scsi_sense_hdr sshdr; in send_mode_select() local 556 .sshdr = &sshdr, in send_mode_select() 584 err = mode_select_handle_sense(sdev, &sshdr); in send_mode_select()
|
/linux-6.12.1/drivers/scsi/ |
D | sr_ioctl.c | 191 struct scsi_sense_hdr local_sshdr, *sshdr; in sr_do_ioctl() local 194 .sshdr = cgc->sshdr ? : &local_sshdr, in sr_do_ioctl() 199 sshdr = exec_args.sshdr; in sr_do_ioctl() 218 switch (sshdr->sense_key) { in sr_do_ioctl() 229 if (sshdr->asc == 0x04 && in sr_do_ioctl() 230 sshdr->ascq == 0x01) { in sr_do_ioctl() 253 if (sshdr->asc == 0x20 && in sr_do_ioctl() 254 sshdr->ascq == 0x00) in sr_do_ioctl() 296 struct scsi_sense_hdr sshdr; in sr_drive_status() local 303 if (!scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr)) in sr_drive_status() [all …]
|
D | scsi_common.c | 192 struct scsi_sense_hdr *sshdr) in scsi_normalize_sense() argument 194 memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); in scsi_normalize_sense() 199 sshdr->response_code = (sense_buffer[0] & 0x7f); in scsi_normalize_sense() 201 if (!scsi_sense_valid(sshdr)) in scsi_normalize_sense() 204 if (sshdr->response_code >= 0x72) { in scsi_normalize_sense() 209 sshdr->sense_key = (sense_buffer[1] & 0xf); in scsi_normalize_sense() 211 sshdr->asc = sense_buffer[2]; in scsi_normalize_sense() 213 sshdr->ascq = sense_buffer[3]; in scsi_normalize_sense() 215 sshdr->additional_length = sense_buffer[7]; in scsi_normalize_sense() 221 sshdr->sense_key = (sense_buffer[2] & 0xf); in scsi_normalize_sense() [all …]
|
D | sd.c | 148 struct scsi_sense_hdr sshdr; in cache_type_store() local 207 sdkp->max_retries, &data, &sshdr); in cache_type_store() 209 if (ret > 0 && scsi_sense_valid(&sshdr)) in cache_type_store() 210 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store() 1683 struct scsi_sense_hdr *sshdr) in media_not_present() argument 1685 if (!scsi_sense_valid(sshdr)) in media_not_present() 1689 switch (sshdr->sense_key) { in media_not_present() 1693 if (sshdr->asc == 0x3A) { in media_not_present() 1744 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local 1747 &sshdr); in sd_check_events() [all …]
|
D | scsi_error.c | 459 struct scsi_sense_hdr *sshdr) in scsi_report_sense() argument 463 if (sshdr->sense_key == UNIT_ATTENTION) { in scsi_report_sense() 464 if (sshdr->asc == 0x3f && sshdr->ascq == 0x03) { in scsi_report_sense() 468 } else if (sshdr->asc == 0x3f && sshdr->ascq == 0x0e) { in scsi_report_sense() 475 } else if (sshdr->asc == 0x3f) in scsi_report_sense() 481 if (sshdr->asc == 0x38 && sshdr->ascq == 0x07) { in scsi_report_sense() 489 if (sshdr->asc == 0x29) { in scsi_report_sense() 500 if (sshdr->asc == 0x2a && sshdr->ascq == 0x01) { in scsi_report_sense() 504 } else if (sshdr->asc == 0x2a && sshdr->ascq == 0x06) { in scsi_report_sense() 508 } else if (sshdr->asc == 0x2a && sshdr->ascq == 0x09) { in scsi_report_sense() [all …]
|
D | scsi_logging.c | 270 const struct scsi_sense_hdr *sshdr) in scsi_format_sense_hdr() argument 276 sense_txt = scsi_sense_key_string(sshdr->sense_key); in scsi_format_sense_hdr() 282 "0x%x ", sshdr->sense_key); in scsi_format_sense_hdr() 284 scsi_sense_is_deferred(sshdr) ? "[deferred] " : "[current] "); in scsi_format_sense_hdr() 286 if (sshdr->response_code >= 0x72) in scsi_format_sense_hdr() 319 int tag, const struct scsi_sense_hdr *sshdr) in scsi_log_print_sense_hdr() argument 328 off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr); in scsi_log_print_sense_hdr() 337 sshdr->asc, sshdr->ascq); in scsi_log_print_sense_hdr() 346 struct scsi_sense_hdr sshdr; in scsi_log_print_sense() local 348 if (scsi_normalize_sense(sense_buffer, sense_len, &sshdr)) in scsi_log_print_sense() [all …]
|
D | scsi_lib.c | 210 struct scsi_sense_hdr sshdr; in scsi_check_passthrough() local 240 if (!scsi_command_normalize_sense(scmd, &sshdr)) in scsi_check_passthrough() 243 if (failure->sense != sshdr.sense_key) in scsi_check_passthrough() 249 if (failure->asc != sshdr.asc) in scsi_check_passthrough() 253 failure->ascq == sshdr.ascq) in scsi_check_passthrough() 345 if (args->sshdr) in scsi_execute_cmd() 347 args->sshdr); in scsi_execute_cmd() 784 struct scsi_sense_hdr sshdr; in scsi_io_completion_action() local 789 sense_valid = scsi_command_normalize_sense(cmd, &sshdr); in scsi_io_completion_action() 791 sense_current = !scsi_sense_is_deferred(&sshdr); in scsi_io_completion_action() [all …]
|
D | sr.c | 171 struct scsi_sense_hdr sshdr; in sr_get_events() local 173 .sshdr = &sshdr, in sr_get_events() 179 if (result > 0 && scsi_sense_valid(&sshdr) && in sr_get_events() 180 sshdr.sense_key == UNIT_ATTENTION) in sr_get_events() 210 struct scsi_sense_hdr sshdr; in sr_check_events() local 248 ret = scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr); in sr_check_events() 256 (scsi_sense_valid(&sshdr) && sshdr.asc != 0x3a); in sr_check_events() 478 struct scsi_sense_hdr sshdr; in sr_revalidate_disk() local 481 if (scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr)) in sr_revalidate_disk() 810 struct scsi_sense_hdr sshdr; in get_capabilities() local [all …]
|
D | scsi.c | 552 struct scsi_sense_hdr sshdr; in scsi_report_opcode() local 555 .sshdr = &sshdr, in scsi_report_opcode() 588 if (result && scsi_sense_valid(&sshdr) && in scsi_report_opcode() 589 sshdr.sense_key == ILLEGAL_REQUEST && in scsi_report_opcode() 590 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && sshdr.ascq == 0x00) in scsi_report_opcode() 699 struct scsi_sense_hdr sshdr; in scsi_cdl_enable() local 738 &data, &sshdr); in scsi_cdl_enable() 740 if (ret > 0 && scsi_sense_valid(&sshdr)) in scsi_cdl_enable() 742 dev_name(&sdev->sdev_gendev), &sshdr); in scsi_cdl_enable()
|
D | sd_zbc.c | 117 struct scsi_sense_hdr sshdr; in sd_zbc_do_report_zones() local 119 .sshdr = &sshdr, in sd_zbc_do_report_zones() 139 if (result > 0 && scsi_sense_valid(&sshdr)) in sd_zbc_do_report_zones() 140 sd_print_sense_hdr(sdkp, &sshdr); in sd_zbc_do_report_zones() 366 struct scsi_sense_hdr *sshdr) in sd_zbc_complete() argument 373 sshdr->sense_key == ILLEGAL_REQUEST && in sd_zbc_complete() 374 sshdr->asc == 0x24) { in sd_zbc_complete()
|
D | ch.c | 165 static int ch_find_errno(struct scsi_sense_hdr *sshdr) in ch_find_errno() argument 170 if (scsi_sense_valid(sshdr) && in ch_find_errno() 171 sshdr->asc != 0) { in ch_find_errno() 173 if (ch_err[i].sense == sshdr->sense_key && in ch_find_errno() 174 ch_err[i].asc == sshdr->asc && in ch_find_errno() 175 ch_err[i].ascq == sshdr->ascq) { in ch_find_errno() 191 struct scsi_sense_hdr sshdr; in ch_do_scsi() local 206 .sshdr = &sshdr, in ch_do_scsi() 217 if (scsi_sense_valid(&sshdr)) { in ch_do_scsi() 219 scsi_print_sense_hdr(ch->device, ch->name, &sshdr); in ch_do_scsi() [all …]
|
D | sd.h | 241 struct scsi_sense_hdr *sshdr); 266 unsigned int good_bytes, struct scsi_sense_hdr *sshdr) in sd_zbc_complete() argument 275 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr);
|
D | scsi_ioctl.c | 71 struct scsi_sense_hdr sshdr; in ioctl_internal_command() local 73 .sshdr = &sshdr, in ioctl_internal_command() 87 if (scsi_sense_valid(&sshdr)) { in ioctl_internal_command() 88 switch (sshdr.sense_key) { in ioctl_internal_command() 97 sshdr.asc, sshdr.ascq); in ioctl_internal_command() 114 scsi_print_sense_hdr(sdev, NULL, &sshdr); in ioctl_internal_command()
|
D | scsi_transport_spi.c | 109 struct scsi_sense_hdr *sshdr) in spi_execute() argument 129 .sshdr = sshdr, 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 (result > 0 && scsi_sense_valid(&sshdr) in spi_dv_device_echo_buffer() 684 && sshdr.sense_key == ILLEGAL_REQUEST in spi_dv_device_echo_buffer() 686 && sshdr.asc == 0x24 && sshdr.ascq == 0x00) in spi_dv_device_echo_buffer()
|
D | myrs.c | 818 struct scsi_sense_hdr sshdr = {0}; in myrs_log_event() local 823 if (!scsi_normalize_sense(ev->sense_data, 40, &sshdr)) { in myrs_log_event() 824 memset(&sshdr, 0x0, sizeof(sshdr)); in myrs_log_event() 832 if (sshdr.sense_key == VENDOR_SPECIFIC && in myrs_log_event() 833 (sshdr.asc == 0x80 || sshdr.asc == 0x81)) in myrs_log_event() 834 ev->ev_code = ((sshdr.asc - 0x80) << 8 | sshdr.ascq); in myrs_log_event() 892 if (sshdr.sense_key == NO_SENSE || in myrs_log_event() 893 (sshdr.sense_key == NOT_READY && in myrs_log_event() 894 sshdr.asc == 0x04 && (sshdr.ascq == 0x01 || in myrs_log_event() 895 sshdr.ascq == 0x02))) in myrs_log_event() [all …]
|
/linux-6.12.1/include/scsi/ |
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()
|
D | scsi_common.h | 74 static inline bool scsi_sense_valid(const struct scsi_sense_hdr *sshdr) in scsi_sense_valid() argument 76 if (!sshdr) in scsi_sense_valid() 79 return (sshdr->response_code & 0x70) == 0x70; in scsi_sense_valid() 83 struct scsi_sense_hdr *sshdr);
|
/linux-6.12.1/drivers/usb/storage/ |
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-6.12.1/drivers/block/ |
D | pktcdvd.c | 768 struct scsi_sense_hdr *sshdr = cgc->sshdr; in pkt_dump_sense() local 770 if (sshdr) in pkt_dump_sense() 773 sshdr->sense_key, sshdr->asc, sshdr->ascq, in pkt_dump_sense() 774 sense_key_string(sshdr->sense_key)); in pkt_dump_sense() 807 struct scsi_sense_hdr sshdr; in pkt_set_speed() local 811 cgc.sshdr = &sshdr; in pkt_set_speed() 1634 struct scsi_sense_hdr sshdr; in pkt_set_write_settings() local 1645 cgc.sshdr = &sshdr; in pkt_set_write_settings() 1661 cgc.sshdr = &sshdr; in pkt_set_write_settings() 1903 struct scsi_sense_hdr sshdr; in pkt_write_caching() local [all …]
|
/linux-6.12.1/include/trace/events/ |
D | scsi.h | 279 struct scsi_sense_hdr sshdr; 295 scsi_command_normalize_sense(cmd, &sshdr)) { 296 __entry->sense_key = sshdr.sense_key; 297 __entry->asc = sshdr.asc; 298 __entry->ascq = sshdr.ascq;
|
/linux-6.12.1/drivers/scsi/cxlflash/ |
D | superpipe.c | 335 struct scsi_sense_hdr sshdr; in read_cap16() local 337 .sshdr = &sshdr, in read_cap16() 374 if (result > 0 && scsi_sense_valid(&sshdr)) { in read_cap16() 376 switch (sshdr.sense_key) { in read_cap16() 383 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-6.12.1/drivers/ata/ |
D | libata-scsi.c | 465 struct scsi_sense_hdr sshdr; in ata_cmd_ioctl() local 467 .sshdr = &sshdr, in ata_cmd_ioctl() 519 if (scsi_sense_valid(&sshdr)) {/* sense data available */ in ata_cmd_ioctl() 525 if (sshdr.sense_key == RECOVERED_ERROR && in ata_cmd_ioctl() 526 sshdr.asc == 0 && sshdr.ascq == 0x1d) in ata_cmd_ioctl() 572 struct scsi_sense_hdr sshdr; in ata_task_ioctl() local 575 .sshdr = &sshdr, in ata_task_ioctl() 607 if (scsi_sense_valid(&sshdr)) {/* sense data available */ in ata_task_ioctl() 613 if (sshdr.sense_key == RECOVERED_ERROR && in ata_task_ioctl() 614 sshdr.asc == 0 && sshdr.ascq == 0x1d) in ata_task_ioctl()
|