Lines Matching refs:sshdr
160 struct scsi_sense_hdr sshdr; in cache_type_store() local
209 SD_MAX_RETRIES, &data, &sshdr)) { in cache_type_store()
210 if (scsi_sense_valid(&sshdr)) in cache_type_store()
211 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1357 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1359 if (!scsi_sense_valid(sshdr)) in media_not_present()
1363 switch (sshdr->sense_key) { in media_not_present()
1367 if (sshdr->asc == 0x3A) { in media_not_present()
1388 struct scsi_sense_hdr *sshdr = NULL; in sd_check_events() local
1416 sshdr = kzalloc(sizeof(*sshdr), GFP_KERNEL); in sd_check_events()
1418 sshdr); in sd_check_events()
1427 if (media_not_present(sdkp, sshdr)) in sd_check_events()
1444 kfree(sshdr); in sd_check_events()
1456 struct scsi_sense_hdr sshdr; in sd_sync_cache() local
1470 &sshdr, timeout, SD_MAX_RETRIES, in sd_sync_cache()
1480 sd_print_sense_hdr(sdkp, &sshdr); in sd_sync_cache()
1482 if (scsi_sense_valid(&sshdr) && in sd_sync_cache()
1483 (sshdr.asc == 0x3a || /* medium not present */ in sd_sync_cache()
1484 sshdr.asc == 0x20)) /* invalid command */ in sd_sync_cache()
1654 struct scsi_sense_hdr sshdr; in sd_done() local
1673 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
1675 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
1683 switch (sshdr.sense_key) { in sd_done()
1700 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
1704 if (sshdr.asc == 0x10) /* DIX: Host detected corruption */ in sd_done()
1707 if (sshdr.asc == 0x20 || sshdr.asc == 0x24) { in sd_done()
1751 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
1767 &sshdr, SD_TIMEOUT, in sd_spinup_disk()
1775 if (media_not_present(sdkp, &sshdr)) in sd_spinup_disk()
1779 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
1784 sense_valid && sshdr.sense_key == UNIT_ATTENTION))); in sd_spinup_disk()
1802 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
1803 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
1805 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
1807 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
1821 NULL, 0, &sshdr, in sd_spinup_disk()
1837 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
1838 sshdr.asc == 0x28) { in sd_spinup_disk()
1850 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
1908 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
1912 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
1921 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
1943 struct scsi_sense_hdr sshdr; in read_capacity_16() local
1962 buffer, RC16_LEN, &sshdr, in read_capacity_16()
1965 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
1969 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
1971 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
1972 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
1973 sshdr.ascq == 0x00) in read_capacity_16()
1979 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
1980 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
1992 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2039 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2052 buffer, 8, &sshdr, in read_capacity_10()
2055 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2059 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2061 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_10()
2062 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_10()
2074 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2243 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2247 sshdr); in sd_do_mode_sense()
2325 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
2356 &data, &sshdr); in sd_read_cache_type()
2388 &data, &sshdr); in sd_read_cache_type()
2464 if (scsi_sense_valid(&sshdr) && in sd_read_cache_type()
2465 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
2466 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
2496 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
2505 SD_MAX_RETRIES, &data, &sshdr); in sd_read_app_tag_own()
2512 if (scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
2513 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
3074 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
3087 res = scsi_execute_req_flags(sdp, cmd, DMA_NONE, NULL, 0, &sshdr, in sd_start_stop_device()
3092 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
3093 if (scsi_sense_valid(&sshdr) && in sd_start_stop_device()
3095 sshdr.asc == 0x3a) in sd_start_stop_device()
3276 struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
3279 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()