Lines Matching refs:sshdr
199 struct scsi_sense_hdr sshdr; in cache_type_store() local
257 sdkp->max_retries, &data, &sshdr); in cache_type_store()
259 if (ret > 0 && scsi_sense_valid(&sshdr)) in cache_type_store()
260 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1721 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1723 if (!scsi_sense_valid(sshdr)) in media_not_present()
1727 switch (sshdr->sense_key) { in media_not_present()
1731 if (sshdr->asc == 0x3A) { in media_not_present()
1782 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1785 &sshdr); in sd_check_events()
1793 if (media_not_present(sdkp, &sshdr)) in sd_check_events()
1825 struct scsi_sense_hdr sshdr; in sd_sync_cache() local
1838 .sshdr = &sshdr, in sd_sync_cache()
1854 scsi_sense_valid(&sshdr)) { in sd_sync_cache()
1855 sd_print_sense_hdr(sdkp, &sshdr); in sd_sync_cache()
1858 if (sshdr.asc == 0x3a || /* medium not present */ in sd_sync_cache()
1859 sshdr.asc == 0x20 || /* invalid command */ in sd_sync_cache()
1860 (sshdr.asc == 0x74 && sshdr.ascq == 0x71)) /* drive is password locked */ in sd_sync_cache()
1870 if ((sshdr.asc == 0x04 && sshdr.ascq == 0x04) || in sd_sync_cache()
1871 sshdr.sense_key == ILLEGAL_REQUEST) in sd_sync_cache()
1938 static int sd_scsi_to_pr_err(struct scsi_sense_hdr *sshdr, int result) in sd_scsi_to_pr_err() argument
1955 if (!scsi_sense_valid(sshdr)) in sd_scsi_to_pr_err()
1958 if (sshdr->sense_key == ILLEGAL_REQUEST && in sd_scsi_to_pr_err()
1959 (sshdr->asc == 0x26 || sshdr->asc == 0x24)) in sd_scsi_to_pr_err()
1973 struct scsi_sense_hdr sshdr; in sd_pr_in_command() local
1989 .sshdr = &sshdr, in sd_pr_in_command()
1999 scsi_sense_valid(&sshdr)) { in sd_pr_in_command()
2001 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_in_command()
2007 return sd_scsi_to_pr_err(&sshdr, result); in sd_pr_in_command()
2086 struct scsi_sense_hdr sshdr; in sd_pr_out_command() local
2101 .sshdr = &sshdr, in sd_pr_out_command()
2122 scsi_sense_valid(&sshdr)) { in sd_pr_out_command()
2124 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_out_command()
2130 return sd_scsi_to_pr_err(&sshdr, result); in sd_pr_out_command()
2316 struct scsi_sense_hdr sshdr; in sd_done() local
2357 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
2359 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
2367 switch (sshdr.sense_key) { in sd_done()
2384 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
2388 switch (sshdr.asc) { in sd_done()
2416 good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr); in sd_done()
2435 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
2461 .sshdr = &sshdr, in sd_spinup_disk()
2485 if (media_not_present(sdkp, &sshdr)) { in sd_spinup_disk()
2491 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
2510 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
2511 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
2513 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
2515 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
2517 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk()
2519 if (sshdr.asc == 4 && sshdr.ascq == 0x24) in sd_spinup_disk()
2521 if (sshdr.asc == 4 && sshdr.ascq == 0x25) in sd_spinup_disk()
2553 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
2554 sshdr.asc == 0x28) { in sd_spinup_disk()
2566 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2632 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2636 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2645 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2667 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2669 .sshdr = &sshdr, in read_capacity_16()
2692 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2695 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2697 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2698 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2699 sshdr.ascq == 0x00) in read_capacity_16()
2705 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2706 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2718 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2758 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2789 .sshdr = &sshdr, in read_capacity_10()
2804 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2806 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2812 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2978 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2988 SD_TIMEOUT, sdkp->max_retries, data, sshdr); in sd_do_mode_sense()
3064 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
3095 &data, &sshdr); in sd_read_cache_type()
3128 &data, &sshdr); in sd_read_cache_type()
3204 if (res == -EIO && scsi_sense_valid(&sshdr) && in sd_read_cache_type()
3205 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
3206 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
3235 struct scsi_sense_hdr sshdr; in sd_is_perm_stream() local
3237 .sshdr = &sshdr, in sd_is_perm_stream()
3248 if (scsi_status_is_check_condition(res) && scsi_sense_valid(&sshdr)) in sd_is_perm_stream()
3249 sd_print_sense_hdr(sdkp, &sshdr); in sd_is_perm_stream()
3262 struct scsi_sense_hdr sshdr; in sd_read_io_hints() local
3271 sdkp->max_retries, &data, &sshdr); in sd_read_io_hints()
3305 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
3314 sdkp->max_retries, &data, &sshdr); in sd_read_app_tag_own()
3321 if (res == -EIO && scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
3322 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
4092 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
4122 .sshdr = &sshdr, in sd_start_stop_device()
4142 if (res > 0 && scsi_sense_valid(&sshdr)) { in sd_start_stop_device()
4143 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
4145 if (sshdr.asc == 0x3a) in sd_start_stop_device()
4448 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
4451 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()