Lines Matching refs:sshdr

164 	struct scsi_sense_hdr sshdr;  in cache_type_store()  local
214 sdkp->max_retries, &data, &sshdr)) { in cache_type_store()
215 if (scsi_sense_valid(&sshdr)) in cache_type_store()
216 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1592 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1594 if (!scsi_sense_valid(sshdr)) in media_not_present()
1598 switch (sshdr->sense_key) { in media_not_present()
1602 if (sshdr->asc == 0x3A) { in media_not_present()
1653 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1656 &sshdr); in sd_check_events()
1664 if (media_not_present(sdkp, &sshdr)) in sd_check_events()
1688 static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_sync_cache() argument
1700 if (!sshdr) in sd_sync_cache()
1701 sshdr = &my_sshdr; in sd_sync_cache()
1711 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, sshdr, in sd_sync_cache()
1724 scsi_sense_valid(sshdr)) { in sd_sync_cache()
1725 sd_print_sense_hdr(sdkp, sshdr); in sd_sync_cache()
1728 if (sshdr->asc == 0x3a || /* medium not present */ in sd_sync_cache()
1729 sshdr->asc == 0x20 || /* invalid command */ in sd_sync_cache()
1730 (sshdr->asc == 0x74 && sshdr->ascq == 0x71)) /* drive is password locked */ in sd_sync_cache()
1823 struct scsi_sense_hdr sshdr; in sd_pr_command() local
1838 &sshdr, SD_TIMEOUT, sdkp->max_retries, NULL); in sd_pr_command()
1841 scsi_sense_valid(&sshdr)) { in sd_pr_command()
1843 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_command()
2035 struct scsi_sense_hdr sshdr; in sd_done() local
2077 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
2079 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
2087 switch (sshdr.sense_key) { in sd_done()
2104 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
2108 switch (sshdr.asc) { in sd_done()
2137 good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr); in sd_done()
2156 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
2174 &sshdr, SD_TIMEOUT, in sd_spinup_disk()
2182 if (media_not_present(sdkp, &sshdr)) { in sd_spinup_disk()
2189 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
2194 sense_valid && sshdr.sense_key == UNIT_ATTENTION))); in sd_spinup_disk()
2212 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
2213 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
2215 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
2217 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
2219 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk()
2233 NULL, 0, &sshdr, in sd_spinup_disk()
2249 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
2250 sshdr.asc == 0x28) { in sd_spinup_disk()
2262 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2321 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2325 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2334 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2356 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2375 buffer, RC16_LEN, &sshdr, in read_capacity_16()
2378 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2382 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2384 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2385 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2386 sshdr.ascq == 0x00) in read_capacity_16()
2392 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2393 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2405 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2447 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2460 buffer, 8, &sshdr, in read_capacity_10()
2463 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2467 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2469 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_10()
2470 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_10()
2482 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2648 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2659 sshdr); in sd_do_mode_sense()
2735 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
2766 &data, &sshdr); in sd_read_cache_type()
2798 &data, &sshdr); in sd_read_cache_type()
2876 if (scsi_sense_valid(&sshdr) && in sd_read_cache_type()
2877 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
2878 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
2908 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
2917 sdkp->max_retries, &data, &sshdr); in sd_read_app_tag_own()
2924 if (scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
2925 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
3689 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
3702 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, in sd_start_stop_device()
3706 if (res > 0 && scsi_sense_valid(&sshdr)) { in sd_start_stop_device()
3707 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
3709 if (sshdr.asc == 0x3a) in sd_start_stop_device()
3750 struct scsi_sense_hdr sshdr; in sd_suspend_common() local
3758 ret = sd_sync_cache(sdkp, &sshdr); in sd_suspend_common()
3765 if (!scsi_sense_valid(&sshdr) || in sd_suspend_common()
3766 sshdr.sense_key != ILLEGAL_REQUEST) in sd_suspend_common()
3947 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
3950 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()