Home
last modified time | relevance | path

Searched refs:sshdr (Results 1 – 25 of 38) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/scsi/device_handler/
Dscsi_dh_hp_sw.c44 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
90 res = scsi_execute(sdev, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, in hp_sw_tur()
93 if (scsi_sense_valid(&sshdr)) in hp_sw_tur()
94 ret = tur_done(sdev, h, &sshdr); in hp_sw_tur()
120 struct scsi_sense_hdr sshdr; in hp_sw_start_stop() local
[all …]
Dscsi_dh_emc.c101 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 …]
/kernel/linux/linux-5.10/drivers/scsi/
Dscsi_common.c139 struct scsi_sense_hdr *sshdr) in scsi_normalize_sense() argument
141 memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); in scsi_normalize_sense()
146 sshdr->response_code = (sense_buffer[0] & 0x7f); in scsi_normalize_sense()
148 if (!scsi_sense_valid(sshdr)) in scsi_normalize_sense()
151 if (sshdr->response_code >= 0x72) { 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()
[all …]
Dsr_ioctl.c189 struct scsi_sense_hdr local_sshdr, *sshdr = &local_sshdr; in sr_do_ioctl() local
194 if (cgc->sshdr) in sr_do_ioctl()
195 sshdr = cgc->sshdr; in sr_do_ioctl()
204 cgc->buffer, cgc->buflen, NULL, sshdr, in sr_do_ioctl()
209 switch (sshdr->sense_key) { in sr_do_ioctl()
220 if (sshdr->asc == 0x04 && in sr_do_ioctl()
221 sshdr->ascq == 0x01) { in sr_do_ioctl()
244 if (sshdr->asc == 0x20 && in sr_do_ioctl()
245 sshdr->ascq == 0x00) in sr_do_ioctl()
287 struct scsi_sense_hdr sshdr; in sr_drive_status() local
[all …]
Dsd.c165 struct scsi_sense_hdr sshdr; in cache_type_store() local
215 sdkp->max_retries, &data, &sshdr)) { in cache_type_store()
216 if (scsi_sense_valid(&sshdr)) in cache_type_store()
217 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1611 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1613 if (!scsi_sense_valid(sshdr)) in media_not_present()
1617 switch (sshdr->sense_key) { in media_not_present()
1621 if (sshdr->asc == 0x3A) { in media_not_present()
1671 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1674 &sshdr); in sd_check_events()
[all …]
Dscsi_error.c409 struct scsi_sense_hdr *sshdr) in scsi_report_sense() argument
413 if (sshdr->sense_key == UNIT_ATTENTION) { in scsi_report_sense()
414 if (sshdr->asc == 0x3f && sshdr->ascq == 0x03) { in scsi_report_sense()
418 } else if (sshdr->asc == 0x3f && sshdr->ascq == 0x0e) { in scsi_report_sense()
426 } else if (sshdr->asc == 0x3f) in scsi_report_sense()
433 if (sshdr->asc == 0x38 && sshdr->ascq == 0x07) { in scsi_report_sense()
441 if (sshdr->asc == 0x29) { in scsi_report_sense()
447 if (sshdr->asc == 0x2a && sshdr->ascq == 0x01) { in scsi_report_sense()
451 } else if (sshdr->asc == 0x2a && sshdr->ascq == 0x06) { in scsi_report_sense()
455 } else if (sshdr->asc == 0x2a && sshdr->ascq == 0x09) { in scsi_report_sense()
[all …]
Dscsi_logging.c270 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 …]
Dscsi_ioctl.c93 struct scsi_sense_hdr sshdr; in ioctl_internal_command() local
99 &sshdr, timeout, retries, NULL); in ioctl_internal_command()
105 scsi_sense_valid(&sshdr)) { in ioctl_internal_command()
106 switch (sshdr.sense_key) { in ioctl_internal_command()
115 sshdr.asc, sshdr.ascq); in ioctl_internal_command()
132 scsi_print_sense_hdr(sdev, NULL, &sshdr); in ioctl_internal_command()
Dscsi_lib.c242 unsigned char *sense, struct scsi_sense_hdr *sshdr, in __scsi_execute() argument
287 if (sshdr) in __scsi_execute()
288 scsi_normalize_sense(rq->sense, rq->sense_len, sshdr); in __scsi_execute()
684 struct scsi_sense_hdr sshdr; in scsi_io_completion_action() local
689 sense_valid = scsi_command_normalize_sense(cmd, &sshdr); in scsi_io_completion_action()
691 sense_current = !scsi_sense_is_deferred(&sshdr); in scsi_io_completion_action()
702 switch (sshdr.sense_key) { in scsi_io_completion_action()
729 sshdr.asc == 0x20 && sshdr.ascq == 0x00) && in scsi_io_completion_action()
735 } else if (sshdr.asc == 0x10) /* DIX */ { in scsi_io_completion_action()
739 } else if (sshdr.asc == 0x20 || sshdr.asc == 0x24) { in scsi_io_completion_action()
[all …]
Dses.c91 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()
Dsr.c205 struct scsi_sense_hdr sshdr; in sr_get_events() local
209 &sshdr, SR_TIMEOUT, MAX_RETRIES, NULL); in sr_get_events()
210 if (scsi_sense_valid(&sshdr) && sshdr.sense_key == UNIT_ATTENTION) in sr_get_events()
240 struct scsi_sense_hdr sshdr; in sr_check_events() local
278 ret = scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr); in sr_check_events()
286 (scsi_sense_valid(&sshdr) && sshdr.asc != 0x3a); in sr_check_events()
521 struct scsi_sense_hdr sshdr; in sr_revalidate_disk() local
524 if (scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr)) in sr_revalidate_disk()
902 struct scsi_sense_hdr sshdr; in get_capabilities() local
927 scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr); in get_capabilities()
Dscsi.c488 struct scsi_sense_hdr sshdr; in scsi_report_opcode() local
503 &sshdr, 30 * HZ, 3, NULL); in scsi_report_opcode()
505 if (result && scsi_sense_valid(&sshdr) && in scsi_report_opcode()
506 sshdr.sense_key == ILLEGAL_REQUEST && in scsi_report_opcode()
507 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && sshdr.ascq == 0x00) in scsi_report_opcode()
Dsd.h225 struct scsi_sense_hdr *sshdr);
255 unsigned int good_bytes, struct scsi_sense_hdr *sshdr) in sd_zbc_complete() argument
271 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr);
Dsd_zbc.c99 struct scsi_sense_hdr sshdr; in sd_zbc_do_report_zones() local
113 buf, buflen, &sshdr, in sd_zbc_do_report_zones()
120 scsi_sense_valid(&sshdr)) in sd_zbc_do_report_zones()
121 sd_print_sense_hdr(sdkp, &sshdr); in sd_zbc_do_report_zones()
514 struct scsi_sense_hdr *sshdr) in sd_zbc_complete() argument
521 sshdr->sense_key == ILLEGAL_REQUEST && in sd_zbc_complete()
522 sshdr->asc == 0x24) { in sd_zbc_complete()
Dch.c164 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()
204 scsi_print_sense_hdr(ch->device, ch->name, &sshdr); in ch_do_scsi()
205 errno = ch_find_errno(&sshdr); in ch_do_scsi()
[all …]
Dscsi_scan.c567 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()
1298 struct scsi_sense_hdr sshdr; in scsi_report_lun_scan() local
1377 lun_data, length, &sshdr, in scsi_report_lun_scan()
1387 else if (scsi_sense_valid(&sshdr)) { in scsi_report_lun_scan()
[all …]
Dscsi_transport_spi.c110 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()
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()
686 && sshdr.asc == 0x24 && sshdr.ascq == 0x00) in spi_dv_device_echo_buffer()
/kernel/linux/linux-5.10/drivers/ide/
Dide-cd_ioctl.c46 struct scsi_sense_hdr sshdr; in ide_cdrom_drive_status() local
52 stat = cdrom_check_status(drive, &sshdr); in ide_cdrom_drive_status()
53 if (!stat || sshdr.sense_key == UNIT_ATTENTION) in ide_cdrom_drive_status()
65 if (sshdr.sense_key == NOT_READY && sshdr.asc == 0x04 in ide_cdrom_drive_status()
66 && sshdr.ascq == 0x04) in ide_cdrom_drive_status()
74 if (sshdr.sense_key == NOT_READY) { in ide_cdrom_drive_status()
75 if (sshdr.asc == 0x3a && sshdr.ascq == 1) in ide_cdrom_drive_status()
139 struct scsi_sense_hdr sshdr; in ide_cd_lockdoor() local
154 &sshdr, 0, 0); in ide_cd_lockdoor()
160 sshdr.sense_key == ILLEGAL_REQUEST && in ide_cd_lockdoor()
[all …]
Dide-cd.c434 struct scsi_sense_hdr *sshdr, int timeout, in ide_cd_queue_pc() argument
446 if (!sshdr) in ide_cd_queue_pc()
447 sshdr = &local_sshdr; in ide_cd_queue_pc()
476 scsi_req(rq)->sense_len, sshdr); in ide_cd_queue_pc()
488 if (sshdr->sense_key == UNIT_ATTENTION) in ide_cd_queue_pc()
490 else if (sshdr->sense_key == NOT_READY && in ide_cd_queue_pc()
491 sshdr->asc == 4 && sshdr->ascq != 4) { in ide_cd_queue_pc()
959 int cdrom_check_status(ide_drive_t *drive, struct scsi_sense_hdr *sshdr) in cdrom_check_status() argument
981 return ide_cd_queue_pc(drive, cmd, 0, NULL, NULL, sshdr, 0, RQF_QUIET); in cdrom_check_status()
/kernel/linux/linux-5.10/include/scsi/
Dscsi_eh.h19 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()
Dscsi_common.h61 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);
Dscsi_device.h415 int retries, struct scsi_sense_hdr *sshdr);
444 unsigned char *sense, struct scsi_sense_hdr *sshdr,
449 sshdr, timeout, retries, flags, rq_flags, resid) \ argument
454 sense, sshdr, timeout, retries, flags, rq_flags, \
459 unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, in scsi_execute_req() argument
463 bufflen, NULL, sshdr, timeout, retries, 0, 0, resid); in scsi_execute_req()
/kernel/linux/linux-5.10/drivers/usb/storage/
Dtransport.c704 struct scsi_sense_hdr sshdr; in usb_stor_invoke_transport() local
795 &sshdr); in usb_stor_invoke_transport()
800 sshdr.response_code, sshdr.sense_key, in usb_stor_invoke_transport()
801 sshdr.asc, sshdr.ascq); in usb_stor_invoke_transport()
803 usb_stor_show_sense(us, sshdr.sense_key, sshdr.asc, sshdr.ascq); in usb_stor_invoke_transport()
818 if (sshdr.sense_key == 0 && sshdr.asc == 0 && sshdr.ascq == 0 && in usb_stor_invoke_transport()
848 if ((sshdr.response_code & 0x72) == 0x72) in usb_stor_invoke_transport()
/kernel/linux/linux-5.10/drivers/block/
Dpktcdvd.c751 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()
757 sense_key_string(sshdr->sense_key)); in pkt_dump_sense()
790 struct scsi_sense_hdr sshdr; in pkt_set_speed() local
794 cgc.sshdr = &sshdr; in pkt_set_speed()
1591 struct scsi_sense_hdr sshdr; in pkt_set_write_settings() local
1602 cgc.sshdr = &sshdr; in pkt_set_write_settings()
1618 cgc.sshdr = &sshdr; in pkt_set_write_settings()
1856 struct scsi_sense_hdr sshdr; in pkt_write_caching() local
[all …]
/kernel/linux/linux-5.10/drivers/scsi/cxlflash/
Dsuperpipe.c335 struct scsi_sense_hdr sshdr; in read_cap16() local
361 CMD_BUFSIZE, NULL, &sshdr, to, CMD_RETRIES, in read_cap16()
375 switch (sshdr.sense_key) { in read_cap16()
382 switch (sshdr.asc) { in read_cap16()
1779 struct scsi_sense_hdr sshdr = { 0 }; in process_sense() local
1783 DK_CXLFLASH_VERIFY_SENSE_LEN, &sshdr); in process_sense()
1790 switch (sshdr.sense_key) { in process_sense()
1796 switch (sshdr.asc) { in process_sense()
1824 sshdr.sense_key, sshdr.asc, sshdr.ascq, rc); in process_sense()

12