Home
last modified time | relevance | path

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

/linux-4.1.27/include/scsi/
Dscsi_eh.h30 static inline bool scsi_sense_valid(const struct scsi_sense_hdr *sshdr) in scsi_sense_valid() argument
32 if (!sshdr) in scsi_sense_valid()
35 return (sshdr->response_code & 0x70) == 0x70; in scsi_sense_valid()
46 struct scsi_sense_hdr *sshdr);
48 struct scsi_sense_hdr *sshdr);
50 static inline bool scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr) in scsi_sense_is_deferred() argument
52 return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1)); in scsi_sense_is_deferred()
Dscsi_device.h394 int retries, struct scsi_sense_hdr *sshdr);
427 unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout,
431 unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, in scsi_execute_req() argument
435 bufflen, sshdr, timeout, retries, resid, 0); in scsi_execute_req()
/linux-4.1.27/drivers/scsi/device_handler/
Dscsi_dh_hp_sw.c67 struct scsi_sense_hdr sshdr; in tur_done() local
70 ret = scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, &sshdr); in tur_done()
78 switch (sshdr.sense_key) { in tur_done()
83 if ((sshdr.asc == 0x04) && (sshdr.ascq == 2)) { in tur_done()
96 HP_SW_NAME, sshdr.sense_key, sshdr.asc, in tur_done()
97 sshdr.ascq); in tur_done()
167 struct scsi_sense_hdr sshdr; in start_done() local
170 rc = scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, &sshdr); in start_done()
178 switch (sshdr.sense_key) { in start_done()
180 if ((sshdr.asc == 0x04) && (sshdr.ascq == 3)) { in start_done()
[all …]
Dscsi_dh_emc.c130 struct scsi_sense_hdr sshdr; in trespass_endio() local
132 if (!scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, &sshdr)) { in trespass_endio()
135 "command.\n", CLARIION_NAME, sshdr.sense_key, in trespass_endio()
136 sshdr.asc, sshdr.ascq); in trespass_endio()
138 if ((sshdr.sense_key == 0x05) && (sshdr.asc == 0x04) && in trespass_endio()
139 (sshdr.ascq == 0x00)) { in trespass_endio()
148 } else if ((sshdr.sense_key == 0x02) && (sshdr.asc == 0x04) && in trespass_endio()
149 (sshdr.ascq == 0x03)) { in trespass_endio()
472 struct scsi_sense_hdr sshdr; in clariion_std_inquiry() local
475 &sshdr)) { in clariion_std_inquiry()
[all …]
/linux-4.1.27/drivers/scsi/
Dsd.c160 struct scsi_sense_hdr sshdr; in cache_type_store() local
209 SD_MAX_RETRIES, &data, &sshdr)) { in cache_type_store()
210 if (scsi_sense_valid(&sshdr)) in cache_type_store()
211 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1357 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1359 if (!scsi_sense_valid(sshdr)) in media_not_present()
1363 switch (sshdr->sense_key) { in media_not_present()
1367 if (sshdr->asc == 0x3A) { in media_not_present()
1388 struct scsi_sense_hdr *sshdr = NULL; in sd_check_events() local
1416 sshdr = kzalloc(sizeof(*sshdr), GFP_KERNEL); in sd_check_events()
[all …]
Dsr_ioctl.c188 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 …]
Dscsi_error.c387 struct scsi_sense_hdr *sshdr) in scsi_report_sense() argument
391 if (sshdr->sense_key == UNIT_ATTENTION) { in scsi_report_sense()
392 if (sshdr->asc == 0x3f && sshdr->ascq == 0x03) { in scsi_report_sense()
396 } else if (sshdr->asc == 0x3f && sshdr->ascq == 0x0e) { in scsi_report_sense()
404 } else if (sshdr->asc == 0x3f) in scsi_report_sense()
411 if (sshdr->asc == 0x38 && sshdr->ascq == 0x07) { in scsi_report_sense()
419 if (sshdr->asc == 0x2a && sshdr->ascq == 0x01) { in scsi_report_sense()
423 } else if (sshdr->asc == 0x2a && sshdr->ascq == 0x09) { in scsi_report_sense()
427 } else if (sshdr->asc == 0x2a) in scsi_report_sense()
452 struct scsi_sense_hdr sshdr; in scsi_check_sense() local
[all …]
Dscsi_ioctl.c92 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()
Dscsi_logging.c317 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 …]
Dscsi_lib.c267 struct scsi_sense_hdr *sshdr, int timeout, int retries, in scsi_execute_req_flags() argument
273 if (sshdr) { in scsi_execute_req_flags()
280 if (sshdr) in scsi_execute_req_flags()
281 scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, sshdr); in scsi_execute_req_flags()
823 struct scsi_sense_hdr sshdr; in scsi_io_completion() local
831 sense_valid = scsi_command_normalize_sense(cmd, &sshdr); in scsi_io_completion()
833 sense_deferred = scsi_sense_is_deferred(&sshdr); in scsi_io_completion()
897 if (sense_valid && (sshdr.sense_key == RECOVERED_ERROR)) { in scsi_io_completion()
902 if ((sshdr.asc == 0x0) && (sshdr.ascq == 0x1d)) in scsi_io_completion()
945 switch (sshdr.sense_key) { in scsi_io_completion()
[all …]
Dsr.c201 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()
Dch.c163 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 …]
Dscsi_scan.c565 struct scsi_sense_hdr sshdr; in scsi_probe_lun() local
592 inq_result, try_inquiry_len, &sshdr, in scsi_probe_lun()
608 scsi_sense_valid(&sshdr)) { in scsi_probe_lun()
609 if ((sshdr.sense_key == UNIT_ATTENTION) && in scsi_probe_lun()
610 ((sshdr.asc == 0x28) || in scsi_probe_lun()
611 (sshdr.asc == 0x29)) && in scsi_probe_lun()
612 (sshdr.ascq == 0)) in scsi_probe_lun()
1364 struct scsi_sense_hdr sshdr; in scsi_report_lun_scan() local
1446 lun_data, length, &sshdr, in scsi_report_lun_scan()
1456 else if (scsi_sense_valid(&sshdr)) { in scsi_report_lun_scan()
[all …]
Dscsi.c939 struct scsi_sense_hdr sshdr; in scsi_report_opcode() local
954 &sshdr, 30 * HZ, 3, NULL); in scsi_report_opcode()
956 if (result && scsi_sense_valid(&sshdr) && in scsi_report_opcode()
957 sshdr.sense_key == ILLEGAL_REQUEST && in scsi_report_opcode()
958 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && sshdr.ascq == 0x00) in scsi_report_opcode()
Dscsi_transport_spi.c122 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()
Dsg.c1313 struct scsi_sense_hdr sshdr; in sg_rq_end_io() local
1328 && scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, &sshdr) in sg_rq_end_io()
1329 && !scsi_sense_is_deferred(&sshdr) in sg_rq_end_io()
1330 && sshdr.sense_key == UNIT_ATTENTION in sg_rq_end_io()
/linux-4.1.27/drivers/usb/storage/
Dtransport.c693 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.1.27/drivers/ata/
Dlibata-scsi.c547 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.1.27/drivers/xen/
Dxen-scsiback.c337 struct scsi_sense_hdr sshdr; in scsiback_do_resp_with_sense() local
351 &sshdr)) { in scsiback_do_resp_with_sense()
/linux-4.1.27/drivers/scsi/ufs/
Dufshcd.c4690 struct scsi_sense_hdr sshdr; in ufshcd_set_dev_pwr_mode() local
4733 ret = scsi_execute_req_flags(sdp, cmd, DMA_NONE, NULL, 0, &sshdr, in ufshcd_set_dev_pwr_mode()
4740 scsi_print_sense_hdr(sdp, NULL, &sshdr); in ufshcd_set_dev_pwr_mode()