Lines Matching refs:sshdr

164 	struct scsi_sense_hdr sshdr;  in cache_type_store()  local
208 SD_MAX_RETRIES, &data, &sshdr)) { in cache_type_store()
209 if (scsi_sense_valid(&sshdr)) in cache_type_store()
210 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1511 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1513 if (!scsi_sense_valid(sshdr)) in media_not_present()
1517 switch (sshdr->sense_key) { in media_not_present()
1521 if (sshdr->asc == 0x3A) { in media_not_present()
1571 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1574 &sshdr); in sd_check_events()
1582 if (media_not_present(sdkp, &sshdr)) in sd_check_events()
1606 static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_sync_cache() argument
1618 if (!sshdr) in sd_sync_cache()
1619 sshdr = &my_sshdr; in sd_sync_cache()
1629 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, sshdr, in sd_sync_cache()
1639 sd_print_sense_hdr(sdkp, sshdr); in sd_sync_cache()
1642 if (scsi_sense_valid(sshdr) && in sd_sync_cache()
1643 (sshdr->asc == 0x3a || /* medium not present */ in sd_sync_cache()
1644 sshdr->asc == 0x20)) /* invalid command */ in sd_sync_cache()
1723 struct scsi_sense_hdr sshdr; in sd_pr_command() local
1738 &sshdr, SD_TIMEOUT, SD_MAX_RETRIES, NULL); in sd_pr_command()
1741 scsi_sense_valid(&sshdr)) { in sd_pr_command()
1743 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_command()
1936 struct scsi_sense_hdr sshdr; in sd_done() local
1983 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
1985 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
1993 switch (sshdr.sense_key) { in sd_done()
2010 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
2014 switch (sshdr.asc) { in sd_done()
2043 sd_zbc_complete(SCpnt, good_bytes, &sshdr); in sd_done()
2067 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
2083 &sshdr, SD_TIMEOUT, in sd_spinup_disk()
2091 if (media_not_present(sdkp, &sshdr)) in sd_spinup_disk()
2095 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
2100 sense_valid && sshdr.sense_key == UNIT_ATTENTION))); in sd_spinup_disk()
2118 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
2119 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
2121 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
2123 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
2125 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk()
2139 NULL, 0, &sshdr, in sd_spinup_disk()
2155 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
2156 sshdr.asc == 0x28) { in sd_spinup_disk()
2168 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2225 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2229 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2238 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2276 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2295 buffer, RC16_LEN, &sshdr, in read_capacity_16()
2298 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2302 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2304 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2305 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2306 sshdr.ascq == 0x00) in read_capacity_16()
2312 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2313 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2325 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2375 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2388 buffer, 8, &sshdr, in read_capacity_10()
2391 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2395 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2397 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_10()
2398 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_10()
2410 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2586 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2590 sshdr); in sd_do_mode_sense()
2667 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
2698 &data, &sshdr); in sd_read_cache_type()
2730 &data, &sshdr); in sd_read_cache_type()
2807 if (scsi_sense_valid(&sshdr) && in sd_read_cache_type()
2808 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
2809 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
2839 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
2848 SD_MAX_RETRIES, &data, &sshdr); in sd_read_app_tag_own()
2855 if (scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
2856 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
3468 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
3481 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, in sd_start_stop_device()
3486 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
3487 if (scsi_sense_valid(&sshdr) && in sd_start_stop_device()
3489 sshdr.asc == 0x3a) in sd_start_stop_device()
3529 struct scsi_sense_hdr sshdr; in sd_suspend_common() local
3537 ret = sd_sync_cache(sdkp, &sshdr); in sd_suspend_common()
3544 if (!scsi_sense_valid(&sshdr) || in sd_suspend_common()
3545 sshdr.sense_key != ILLEGAL_REQUEST) in sd_suspend_common()
3685 struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
3688 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()