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()
1684 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1686 if (!scsi_sense_valid(sshdr)) in media_not_present()
1690 switch (sshdr->sense_key) { in media_not_present()
1694 if (sshdr->asc == 0x3A) { in media_not_present()
1745 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1748 &sshdr); in sd_check_events()
1756 if (media_not_present(sdkp, &sshdr)) in sd_check_events()
1788 struct scsi_sense_hdr sshdr; in sd_sync_cache() local
1801 .sshdr = &sshdr, in sd_sync_cache()
1817 scsi_sense_valid(&sshdr)) { in sd_sync_cache()
1818 sd_print_sense_hdr(sdkp, &sshdr); in sd_sync_cache()
1821 if (sshdr.asc == 0x3a || /* medium not present */ in sd_sync_cache()
1822 sshdr.asc == 0x20 || /* invalid command */ in sd_sync_cache()
1823 (sshdr.asc == 0x74 && sshdr.ascq == 0x71)) /* drive is password locked */ in sd_sync_cache()
1833 if ((sshdr.asc == 0x04 && sshdr.ascq == 0x04) || in sd_sync_cache()
1834 sshdr.sense_key == ILLEGAL_REQUEST) in sd_sync_cache()
1901 static int sd_scsi_to_pr_err(struct scsi_sense_hdr *sshdr, int result) in sd_scsi_to_pr_err() argument
1918 if (!scsi_sense_valid(sshdr)) in sd_scsi_to_pr_err()
1921 if (sshdr->sense_key == ILLEGAL_REQUEST && in sd_scsi_to_pr_err()
1922 (sshdr->asc == 0x26 || sshdr->asc == 0x24)) in sd_scsi_to_pr_err()
1936 struct scsi_sense_hdr sshdr; in sd_pr_in_command() local
1952 .sshdr = &sshdr, in sd_pr_in_command()
1962 scsi_sense_valid(&sshdr)) { in sd_pr_in_command()
1964 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_in_command()
1970 return sd_scsi_to_pr_err(&sshdr, result); in sd_pr_in_command()
2039 struct scsi_sense_hdr sshdr; in sd_pr_out_command() local
2054 .sshdr = &sshdr, in sd_pr_out_command()
2075 scsi_sense_valid(&sshdr)) { in sd_pr_out_command()
2077 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_out_command()
2083 return sd_scsi_to_pr_err(&sshdr, result); in sd_pr_out_command()
2284 struct scsi_sense_hdr sshdr; in sd_done() local
2325 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
2327 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
2335 switch (sshdr.sense_key) { in sd_done()
2352 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
2356 switch (sshdr.asc) { in sd_done()
2384 good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr); in sd_done()
2403 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
2429 .sshdr = &sshdr, in sd_spinup_disk()
2453 if (media_not_present(sdkp, &sshdr)) { in sd_spinup_disk()
2459 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
2478 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
2479 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
2481 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
2483 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
2485 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk()
2487 if (sshdr.asc == 4 && sshdr.ascq == 0x24) in sd_spinup_disk()
2489 if (sshdr.asc == 4 && sshdr.ascq == 0x25) in sd_spinup_disk()
2521 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
2522 sshdr.asc == 0x28) { in sd_spinup_disk()
2534 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2600 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2604 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2613 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2635 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2637 .sshdr = &sshdr, in read_capacity_16()
2660 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2663 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2665 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2666 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2667 sshdr.ascq == 0x00) in read_capacity_16()
2673 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2674 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2686 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2726 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2757 .sshdr = &sshdr, in read_capacity_10()
2772 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2774 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2780 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2946 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2956 SD_TIMEOUT, sdkp->max_retries, data, sshdr); in sd_do_mode_sense()
3032 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
3063 &data, &sshdr); in sd_read_cache_type()
3095 &data, &sshdr); in sd_read_cache_type()
3173 if (res == -EIO && scsi_sense_valid(&sshdr) && in sd_read_cache_type()
3174 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
3175 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
3204 struct scsi_sense_hdr sshdr; in sd_is_perm_stream() local
3206 .sshdr = &sshdr, in sd_is_perm_stream()
3217 if (scsi_status_is_check_condition(res) && scsi_sense_valid(&sshdr)) in sd_is_perm_stream()
3218 sd_print_sense_hdr(sdkp, &sshdr); in sd_is_perm_stream()
3231 struct scsi_sense_hdr sshdr; in sd_read_io_hints() local
3240 sdkp->max_retries, &data, &sshdr); in sd_read_io_hints()
3274 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
3283 sdkp->max_retries, &data, &sshdr); in sd_read_app_tag_own()
3290 if (res == -EIO && scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
3291 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
4088 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
4118 .sshdr = &sshdr, in sd_start_stop_device()
4138 if (res > 0 && scsi_sense_valid(&sshdr)) { in sd_start_stop_device()
4139 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
4141 if (sshdr.asc == 0x3a) in sd_start_stop_device()
4415 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
4418 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()