Lines Matching refs:sshdr

148 	struct scsi_sense_hdr sshdr;  in cache_type_store()  local
206 sdkp->max_retries, &data, &sshdr); in cache_type_store()
208 if (ret > 0 && scsi_sense_valid(&sshdr)) in cache_type_store()
209 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1714 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1716 if (!scsi_sense_valid(sshdr)) in media_not_present()
1720 switch (sshdr->sense_key) { in media_not_present()
1724 if (sshdr->asc == 0x3A) { in media_not_present()
1775 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1778 &sshdr); in sd_check_events()
1786 if (media_not_present(sdkp, &sshdr)) in sd_check_events()
1818 struct scsi_sense_hdr sshdr; in sd_sync_cache() local
1831 .sshdr = &sshdr, in sd_sync_cache()
1847 scsi_sense_valid(&sshdr)) { in sd_sync_cache()
1848 sd_print_sense_hdr(sdkp, &sshdr); in sd_sync_cache()
1851 if (sshdr.asc == 0x3a || /* medium not present */ in sd_sync_cache()
1852 sshdr.asc == 0x20 || /* invalid command */ in sd_sync_cache()
1853 (sshdr.asc == 0x74 && sshdr.ascq == 0x71)) /* drive is password locked */ in sd_sync_cache()
1863 if ((sshdr.asc == 0x04 && sshdr.ascq == 0x04) || in sd_sync_cache()
1864 sshdr.sense_key == ILLEGAL_REQUEST) in sd_sync_cache()
1931 static int sd_scsi_to_pr_err(struct scsi_sense_hdr *sshdr, int result) in sd_scsi_to_pr_err() argument
1948 if (!scsi_sense_valid(sshdr)) in sd_scsi_to_pr_err()
1951 if (sshdr->sense_key == ILLEGAL_REQUEST && in sd_scsi_to_pr_err()
1952 (sshdr->asc == 0x26 || sshdr->asc == 0x24)) in sd_scsi_to_pr_err()
1966 struct scsi_sense_hdr sshdr; in sd_pr_in_command() local
1982 .sshdr = &sshdr, in sd_pr_in_command()
1992 scsi_sense_valid(&sshdr)) { in sd_pr_in_command()
1994 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_in_command()
2000 return sd_scsi_to_pr_err(&sshdr, result); in sd_pr_in_command()
2079 struct scsi_sense_hdr sshdr; in sd_pr_out_command() local
2094 .sshdr = &sshdr, in sd_pr_out_command()
2115 scsi_sense_valid(&sshdr)) { in sd_pr_out_command()
2117 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_out_command()
2123 return sd_scsi_to_pr_err(&sshdr, result); in sd_pr_out_command()
2324 struct scsi_sense_hdr sshdr; in sd_done() local
2365 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
2367 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
2375 switch (sshdr.sense_key) { in sd_done()
2392 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
2396 switch (sshdr.asc) { in sd_done()
2424 good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr); in sd_done()
2443 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
2469 .sshdr = &sshdr, in sd_spinup_disk()
2493 if (media_not_present(sdkp, &sshdr)) { in sd_spinup_disk()
2499 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
2518 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
2519 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
2521 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
2523 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
2525 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk()
2527 if (sshdr.asc == 4 && sshdr.ascq == 0x24) in sd_spinup_disk()
2529 if (sshdr.asc == 4 && sshdr.ascq == 0x25) in sd_spinup_disk()
2561 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
2562 sshdr.asc == 0x28) { in sd_spinup_disk()
2574 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2640 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2644 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2653 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2675 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2677 .sshdr = &sshdr, in read_capacity_16()
2700 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2703 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2705 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2706 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2707 sshdr.ascq == 0x00) in read_capacity_16()
2713 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2714 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2726 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2766 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2797 .sshdr = &sshdr, in read_capacity_10()
2812 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2814 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2820 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2986 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2996 SD_TIMEOUT, sdkp->max_retries, data, sshdr); in sd_do_mode_sense()
3072 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
3103 &data, &sshdr); in sd_read_cache_type()
3135 &data, &sshdr); in sd_read_cache_type()
3213 if (res == -EIO && scsi_sense_valid(&sshdr) && in sd_read_cache_type()
3214 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
3215 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
3244 struct scsi_sense_hdr sshdr; in sd_is_perm_stream() local
3246 .sshdr = &sshdr, in sd_is_perm_stream()
3257 if (scsi_status_is_check_condition(res) && scsi_sense_valid(&sshdr)) in sd_is_perm_stream()
3258 sd_print_sense_hdr(sdkp, &sshdr); in sd_is_perm_stream()
3271 struct scsi_sense_hdr sshdr; in sd_read_io_hints() local
3280 sdkp->max_retries, &data, &sshdr); in sd_read_io_hints()
3314 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
3323 sdkp->max_retries, &data, &sshdr); in sd_read_app_tag_own()
3330 if (res == -EIO && scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
3331 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
4130 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
4160 .sshdr = &sshdr, in sd_start_stop_device()
4180 if (res > 0 && scsi_sense_valid(&sshdr)) { in sd_start_stop_device()
4181 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
4183 if (sshdr.asc == 0x3a) in sd_start_stop_device()
4459 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
4462 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()