Lines Matching refs:sshdr
163 struct scsi_sense_hdr sshdr; in cache_type_store() local
213 sdkp->max_retries, &data, &sshdr)) { in cache_type_store()
214 if (scsi_sense_valid(&sshdr)) in cache_type_store()
215 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1591 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1593 if (!scsi_sense_valid(sshdr)) in media_not_present()
1597 switch (sshdr->sense_key) { in media_not_present()
1601 if (sshdr->asc == 0x3A) { in media_not_present()
1652 struct scsi_sense_hdr sshdr = { 0, }; in sd_check_events() local
1655 &sshdr); in sd_check_events()
1663 if (media_not_present(sdkp, &sshdr)) in sd_check_events()
1687 static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_sync_cache() argument
1699 if (!sshdr) in sd_sync_cache()
1700 sshdr = &my_sshdr; in sd_sync_cache()
1710 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, sshdr, in sd_sync_cache()
1723 scsi_sense_valid(sshdr)) { in sd_sync_cache()
1724 sd_print_sense_hdr(sdkp, sshdr); in sd_sync_cache()
1727 if (sshdr->asc == 0x3a || /* medium not present */ in sd_sync_cache()
1728 sshdr->asc == 0x20 || /* invalid command */ in sd_sync_cache()
1729 (sshdr->asc == 0x74 && sshdr->ascq == 0x71)) /* drive is password locked */ in sd_sync_cache()
1784 struct scsi_sense_hdr sshdr; in sd_pr_command() local
1799 &sshdr, SD_TIMEOUT, sdkp->max_retries, NULL); in sd_pr_command()
1802 scsi_sense_valid(&sshdr)) { in sd_pr_command()
1804 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_command()
1995 struct scsi_sense_hdr sshdr; in sd_done() local
2037 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
2039 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
2047 switch (sshdr.sense_key) { in sd_done()
2064 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
2068 switch (sshdr.asc) { in sd_done()
2097 good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr); in sd_done()
2116 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
2134 &sshdr, SD_TIMEOUT, in sd_spinup_disk()
2142 if (media_not_present(sdkp, &sshdr)) { in sd_spinup_disk()
2149 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
2154 sense_valid && sshdr.sense_key == UNIT_ATTENTION))); in sd_spinup_disk()
2172 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
2173 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
2175 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
2177 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
2179 if (sshdr.asc == 4 && sshdr.ascq == 0x1b) in sd_spinup_disk()
2193 NULL, 0, &sshdr, in sd_spinup_disk()
2209 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
2210 sshdr.asc == 0x28) { in sd_spinup_disk()
2222 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2281 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2285 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2294 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2316 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2335 buffer, RC16_LEN, &sshdr, in read_capacity_16()
2338 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2342 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2344 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2345 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2346 sshdr.ascq == 0x00) in read_capacity_16()
2352 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2353 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2365 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2407 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2420 buffer, 8, &sshdr, in read_capacity_10()
2423 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2427 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2429 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_10()
2430 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_10()
2442 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2608 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2612 sshdr); in sd_do_mode_sense()
2688 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
2719 &data, &sshdr); in sd_read_cache_type()
2751 &data, &sshdr); in sd_read_cache_type()
2828 if (scsi_sense_valid(&sshdr) && in sd_read_cache_type()
2829 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
2830 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
2860 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
2869 sdkp->max_retries, &data, &sshdr); in sd_read_app_tag_own()
2876 if (scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
2877 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
3555 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
3568 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, in sd_start_stop_device()
3572 if (res > 0 && scsi_sense_valid(&sshdr)) { in sd_start_stop_device()
3573 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
3575 if (sshdr.asc == 0x3a) in sd_start_stop_device()
3616 struct scsi_sense_hdr sshdr; in sd_suspend_common() local
3624 ret = sd_sync_cache(sdkp, &sshdr); in sd_suspend_common()
3631 if (!scsi_sense_valid(&sshdr) || in sd_suspend_common()
3632 sshdr.sense_key != ILLEGAL_REQUEST) in sd_suspend_common()
3802 void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
3805 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()