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()
1611 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1613 if (!scsi_sense_valid(sshdr)) in media_not_present()
1617 switch (sshdr->sense_key) { in media_not_present()
1621 if (sshdr->asc == 0x3A) { in media_not_present()
1671 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1674 &sshdr); in sd_check_events()
1682 if (media_not_present(sdkp, &sshdr)) in sd_check_events()
1706 static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_sync_cache() argument
1718 if (!sshdr) in sd_sync_cache()
1719 sshdr = &my_sshdr; in sd_sync_cache()
1729 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, sshdr, in sd_sync_cache()
1739 sd_print_sense_hdr(sdkp, sshdr); in sd_sync_cache()
1742 if (scsi_sense_valid(sshdr) && in sd_sync_cache()
1743 (sshdr->asc == 0x3a || /* medium not present */ in sd_sync_cache()
1744 sshdr->asc == 0x20 || /* invalid command */ in sd_sync_cache()
1745 (sshdr->asc == 0x74 && sshdr->ascq == 0x71))) /* drive is password locked */ in sd_sync_cache()
1829 struct scsi_sense_hdr sshdr; in sd_pr_command() local
1844 &sshdr, SD_TIMEOUT, sdkp->max_retries, NULL); in sd_pr_command()
1847 scsi_sense_valid(&sshdr)) { in sd_pr_command()
1849 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_command()
2042 struct scsi_sense_hdr sshdr; in sd_done() local
2084 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
2086 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
2094 switch (sshdr.sense_key) { in sd_done()
2111 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
2115 switch (sshdr.asc) { in sd_done()
2144 good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr); in sd_done()
2163 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
2179 &sshdr, SD_TIMEOUT, in sd_spinup_disk()
2187 if (media_not_present(sdkp, &sshdr)) in sd_spinup_disk()
2191 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
2196 sense_valid && sshdr.sense_key == UNIT_ATTENTION))); in sd_spinup_disk()
2214 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
2215 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
2217 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
2219 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
2221 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk()
2235 NULL, 0, &sshdr, in sd_spinup_disk()
2251 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
2252 sshdr.asc == 0x28) { in sd_spinup_disk()
2264 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2323 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2327 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2336 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2358 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2377 buffer, RC16_LEN, &sshdr, in read_capacity_16()
2380 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2384 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2386 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2387 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2388 sshdr.ascq == 0x00) in read_capacity_16()
2394 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2395 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2407 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2449 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2462 buffer, 8, &sshdr, in read_capacity_10()
2465 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2469 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2471 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_10()
2472 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_10()
2484 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2650 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2654 sshdr); in sd_do_mode_sense()
2730 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
2761 &data, &sshdr); in sd_read_cache_type()
2793 &data, &sshdr); in sd_read_cache_type()
2870 if (scsi_sense_valid(&sshdr) && in sd_read_cache_type()
2871 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
2872 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
2902 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
2911 sdkp->max_retries, &data, &sshdr); in sd_read_app_tag_own()
2918 if (scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
2919 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
3600 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
3613 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, in sd_start_stop_device()
3618 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
3619 if (scsi_sense_valid(&sshdr) && in sd_start_stop_device()
3621 sshdr.asc == 0x3a) in sd_start_stop_device()
3661 struct scsi_sense_hdr sshdr; in sd_suspend_common() local
3669 ret = sd_sync_cache(sdkp, &sshdr); in sd_suspend_common()
3676 if (!scsi_sense_valid(&sshdr) || in sd_suspend_common()
3677 sshdr.sense_key != ILLEGAL_REQUEST) in sd_suspend_common()
3833 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
3836 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()