Lines Matching refs:sshdr

165 	struct scsi_sense_hdr sshdr;  in cache_type_store()  local
215 sdkp->max_retries, &data, &sshdr)) { in cache_type_store()
216 if (scsi_sense_valid(&sshdr)) in cache_type_store()
217 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1594 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1596 if (!scsi_sense_valid(sshdr)) in media_not_present()
1600 switch (sshdr->sense_key) { in media_not_present()
1604 if (sshdr->asc == 0x3A) { in media_not_present()
1654 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1657 &sshdr); in sd_check_events()
1665 if (media_not_present(sdkp, &sshdr)) in sd_check_events()
1689 static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_sync_cache() argument
1701 if (!sshdr) in sd_sync_cache()
1702 sshdr = &my_sshdr; in sd_sync_cache()
1712 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, sshdr, in sd_sync_cache()
1722 sd_print_sense_hdr(sdkp, sshdr); in sd_sync_cache()
1725 if (scsi_sense_valid(sshdr) && in sd_sync_cache()
1726 (sshdr->asc == 0x3a || /* medium not present */ in sd_sync_cache()
1727 sshdr->asc == 0x20 || /* invalid command */ in sd_sync_cache()
1728 (sshdr->asc == 0x74 && sshdr->ascq == 0x71))) /* drive is password locked */ in sd_sync_cache()
1812 struct scsi_sense_hdr sshdr; in sd_pr_command() local
1827 &sshdr, SD_TIMEOUT, sdkp->max_retries, NULL); in sd_pr_command()
1830 scsi_sense_valid(&sshdr)) { in sd_pr_command()
1832 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_command()
2025 struct scsi_sense_hdr sshdr; in sd_done() local
2067 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
2069 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
2077 switch (sshdr.sense_key) { in sd_done()
2094 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
2098 switch (sshdr.asc) { in sd_done()
2127 good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr); in sd_done()
2146 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
2162 &sshdr, SD_TIMEOUT, in sd_spinup_disk()
2170 if (media_not_present(sdkp, &sshdr)) in sd_spinup_disk()
2174 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
2179 sense_valid && sshdr.sense_key == UNIT_ATTENTION))); in sd_spinup_disk()
2197 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
2198 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
2200 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
2202 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
2204 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk()
2218 NULL, 0, &sshdr, in sd_spinup_disk()
2234 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
2235 sshdr.asc == 0x28) { in sd_spinup_disk()
2247 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2306 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2310 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2319 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2341 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2360 buffer, RC16_LEN, &sshdr, in read_capacity_16()
2363 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2367 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2369 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2370 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2371 sshdr.ascq == 0x00) in read_capacity_16()
2377 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2378 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2390 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2432 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2445 buffer, 8, &sshdr, in read_capacity_10()
2448 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2452 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2454 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_10()
2455 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_10()
2467 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2633 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2637 sshdr); in sd_do_mode_sense()
2713 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
2744 &data, &sshdr); in sd_read_cache_type()
2776 &data, &sshdr); in sd_read_cache_type()
2853 if (scsi_sense_valid(&sshdr) && in sd_read_cache_type()
2854 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
2855 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
2885 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
2894 sdkp->max_retries, &data, &sshdr); in sd_read_app_tag_own()
2901 if (scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
2902 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
3582 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
3595 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, in sd_start_stop_device()
3600 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
3601 if (scsi_sense_valid(&sshdr) && in sd_start_stop_device()
3603 sshdr.asc == 0x3a) in sd_start_stop_device()
3643 struct scsi_sense_hdr sshdr; in sd_suspend_common() local
3651 ret = sd_sync_cache(sdkp, &sshdr); in sd_suspend_common()
3658 if (!scsi_sense_valid(&sshdr) || in sd_suspend_common()
3659 sshdr.sense_key != ILLEGAL_REQUEST) in sd_suspend_common()
3809 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
3812 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()