Lines Matching refs:sshdr
148 struct scsi_sense_hdr sshdr; in cache_type_store() local
207 sdkp->max_retries, &data, &sshdr); in cache_type_store()
209 if (ret > 0 && scsi_sense_valid(&sshdr)) in cache_type_store()
210 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1683 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1685 if (!scsi_sense_valid(sshdr)) in media_not_present()
1689 switch (sshdr->sense_key) { in media_not_present()
1693 if (sshdr->asc == 0x3A) { in media_not_present()
1744 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1747 &sshdr); in sd_check_events()
1755 if (media_not_present(sdkp, &sshdr)) in sd_check_events()
1787 struct scsi_sense_hdr sshdr; in sd_sync_cache() local
1800 .sshdr = &sshdr, in sd_sync_cache()
1816 scsi_sense_valid(&sshdr)) { in sd_sync_cache()
1817 sd_print_sense_hdr(sdkp, &sshdr); in sd_sync_cache()
1820 if (sshdr.asc == 0x3a || /* medium not present */ in sd_sync_cache()
1821 sshdr.asc == 0x20 || /* invalid command */ in sd_sync_cache()
1822 (sshdr.asc == 0x74 && sshdr.ascq == 0x71)) /* drive is password locked */ in sd_sync_cache()
1832 if ((sshdr.asc == 0x04 && sshdr.ascq == 0x04) || in sd_sync_cache()
1833 sshdr.sense_key == ILLEGAL_REQUEST) in sd_sync_cache()
1900 static int sd_scsi_to_pr_err(struct scsi_sense_hdr *sshdr, int result) in sd_scsi_to_pr_err() argument
1917 if (!scsi_sense_valid(sshdr)) in sd_scsi_to_pr_err()
1920 if (sshdr->sense_key == ILLEGAL_REQUEST && in sd_scsi_to_pr_err()
1921 (sshdr->asc == 0x26 || sshdr->asc == 0x24)) in sd_scsi_to_pr_err()
1935 struct scsi_sense_hdr sshdr; in sd_pr_in_command() local
1951 .sshdr = &sshdr, in sd_pr_in_command()
1961 scsi_sense_valid(&sshdr)) { in sd_pr_in_command()
1963 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_in_command()
1969 return sd_scsi_to_pr_err(&sshdr, result); in sd_pr_in_command()
2038 struct scsi_sense_hdr sshdr; in sd_pr_out_command() local
2053 .sshdr = &sshdr, in sd_pr_out_command()
2074 scsi_sense_valid(&sshdr)) { in sd_pr_out_command()
2076 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_out_command()
2082 return sd_scsi_to_pr_err(&sshdr, result); in sd_pr_out_command()
2283 struct scsi_sense_hdr sshdr; in sd_done() local
2324 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
2326 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
2334 switch (sshdr.sense_key) { in sd_done()
2351 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
2355 switch (sshdr.asc) { in sd_done()
2383 good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr); in sd_done()
2402 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
2428 .sshdr = &sshdr, in sd_spinup_disk()
2452 if (media_not_present(sdkp, &sshdr)) { in sd_spinup_disk()
2458 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
2477 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
2478 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
2480 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
2482 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
2484 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk()
2486 if (sshdr.asc == 4 && sshdr.ascq == 0x24) in sd_spinup_disk()
2488 if (sshdr.asc == 4 && sshdr.ascq == 0x25) in sd_spinup_disk()
2520 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
2521 sshdr.asc == 0x28) { in sd_spinup_disk()
2533 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2599 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2603 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2612 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2634 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2636 .sshdr = &sshdr, in read_capacity_16()
2659 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2662 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2664 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2665 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2666 sshdr.ascq == 0x00) in read_capacity_16()
2672 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2673 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2685 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2725 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2756 .sshdr = &sshdr, in read_capacity_10()
2771 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2773 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2779 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2945 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2955 SD_TIMEOUT, sdkp->max_retries, data, sshdr); in sd_do_mode_sense()
3031 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
3062 &data, &sshdr); in sd_read_cache_type()
3094 &data, &sshdr); in sd_read_cache_type()
3172 if (res == -EIO && scsi_sense_valid(&sshdr) && in sd_read_cache_type()
3173 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
3174 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
3203 struct scsi_sense_hdr sshdr; in sd_is_perm_stream() local
3205 .sshdr = &sshdr, in sd_is_perm_stream()
3216 if (scsi_status_is_check_condition(res) && scsi_sense_valid(&sshdr)) in sd_is_perm_stream()
3217 sd_print_sense_hdr(sdkp, &sshdr); in sd_is_perm_stream()
3230 struct scsi_sense_hdr sshdr; in sd_read_io_hints() local
3239 sdkp->max_retries, &data, &sshdr); in sd_read_io_hints()
3273 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
3282 sdkp->max_retries, &data, &sshdr); in sd_read_app_tag_own()
3289 if (res == -EIO && scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
3290 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
4094 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
4124 .sshdr = &sshdr, in sd_start_stop_device()
4144 if (res > 0 && scsi_sense_valid(&sshdr)) { in sd_start_stop_device()
4145 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
4147 if (sshdr.asc == 0x3a) in sd_start_stop_device()
4419 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
4422 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()