Lines Matching refs:sshdr

167 	struct scsi_sense_hdr sshdr;  in cache_type_store()  local
217 SD_MAX_RETRIES, &data, &sshdr)) { in cache_type_store()
218 if (scsi_sense_valid(&sshdr)) in cache_type_store()
219 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1525 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1527 if (!scsi_sense_valid(sshdr)) in media_not_present()
1531 switch (sshdr->sense_key) { in media_not_present()
1535 if (sshdr->asc == 0x3A) { in media_not_present()
1585 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1588 &sshdr); in sd_check_events()
1596 if (media_not_present(sdkp, &sshdr)) in sd_check_events()
1620 static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_sync_cache() argument
1632 if (!sshdr) in sd_sync_cache()
1633 sshdr = &my_sshdr; in sd_sync_cache()
1643 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, sshdr, in sd_sync_cache()
1653 sd_print_sense_hdr(sdkp, sshdr); in sd_sync_cache()
1656 if (scsi_sense_valid(sshdr) && in sd_sync_cache()
1657 (sshdr->asc == 0x3a || /* medium not present */ in sd_sync_cache()
1658 sshdr->asc == 0x20 || /* invalid command */ in sd_sync_cache()
1659 (sshdr->asc == 0x74 && sshdr->ascq == 0x71))) /* drive is password locked */ in sd_sync_cache()
1738 struct scsi_sense_hdr sshdr; in sd_pr_command() local
1753 &sshdr, SD_TIMEOUT, SD_MAX_RETRIES, NULL); in sd_pr_command()
1756 scsi_sense_valid(&sshdr)) { in sd_pr_command()
1758 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_command()
1952 struct scsi_sense_hdr sshdr; in sd_done() local
1991 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
1993 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
2001 switch (sshdr.sense_key) { in sd_done()
2018 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
2022 switch (sshdr.asc) { in sd_done()
2051 sd_zbc_complete(SCpnt, good_bytes, &sshdr); in sd_done()
2070 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
2086 &sshdr, SD_TIMEOUT, in sd_spinup_disk()
2094 if (media_not_present(sdkp, &sshdr)) in sd_spinup_disk()
2098 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
2103 sense_valid && sshdr.sense_key == UNIT_ATTENTION))); in sd_spinup_disk()
2121 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
2122 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
2124 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
2126 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
2128 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk()
2142 NULL, 0, &sshdr, in sd_spinup_disk()
2158 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
2159 sshdr.asc == 0x28) { in sd_spinup_disk()
2171 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2228 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2232 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2241 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2263 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2282 buffer, RC16_LEN, &sshdr, in read_capacity_16()
2285 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2289 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2291 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2292 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2293 sshdr.ascq == 0x00) in read_capacity_16()
2299 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2300 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2312 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2354 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2367 buffer, 8, &sshdr, in read_capacity_10()
2370 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2374 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2376 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_10()
2377 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_10()
2389 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2557 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2561 sshdr); in sd_do_mode_sense()
2637 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
2668 &data, &sshdr); in sd_read_cache_type()
2700 &data, &sshdr); in sd_read_cache_type()
2777 if (scsi_sense_valid(&sshdr) && in sd_read_cache_type()
2778 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
2779 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
2809 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
2818 SD_MAX_RETRIES, &data, &sshdr); in sd_read_app_tag_own()
2825 if (scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
2826 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
3477 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
3490 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, in sd_start_stop_device()
3495 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
3496 if (scsi_sense_valid(&sshdr) && in sd_start_stop_device()
3498 sshdr.asc == 0x3a) in sd_start_stop_device()
3538 struct scsi_sense_hdr sshdr; in sd_suspend_common() local
3546 ret = sd_sync_cache(sdkp, &sshdr); in sd_suspend_common()
3553 if (!scsi_sense_valid(&sshdr) || in sd_suspend_common()
3554 sshdr.sense_key != ILLEGAL_REQUEST) in sd_suspend_common()
3705 struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
3708 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()