Lines Matching refs:sshdr

161 	struct scsi_sense_hdr sshdr;  in cache_type_store()  local
211 SD_MAX_RETRIES, &data, &sshdr)) { in cache_type_store()
212 if (scsi_sense_valid(&sshdr)) in cache_type_store()
213 sd_print_sense_hdr(sdkp, &sshdr); in cache_type_store()
1372 struct scsi_sense_hdr *sshdr) in media_not_present() argument
1374 if (!scsi_sense_valid(sshdr)) in media_not_present()
1378 switch (sshdr->sense_key) { in media_not_present()
1382 if (sshdr->asc == 0x3A) { in media_not_present()
1403 struct scsi_sense_hdr *sshdr = NULL; in sd_check_events() local
1431 sshdr = kzalloc(sizeof(*sshdr), GFP_KERNEL); in sd_check_events()
1433 sshdr); in sd_check_events()
1442 if (media_not_present(sdkp, sshdr)) in sd_check_events()
1459 kfree(sshdr); in sd_check_events()
1471 struct scsi_sense_hdr sshdr; in sd_sync_cache() local
1485 &sshdr, timeout, SD_MAX_RETRIES, in sd_sync_cache()
1495 sd_print_sense_hdr(sdkp, &sshdr); in sd_sync_cache()
1497 if (scsi_sense_valid(&sshdr) && in sd_sync_cache()
1498 (sshdr.asc == 0x3a || /* medium not present */ in sd_sync_cache()
1499 sshdr.asc == 0x20)) /* invalid command */ in sd_sync_cache()
1578 struct scsi_sense_hdr sshdr; in sd_pr_command() local
1593 &sshdr, SD_TIMEOUT, SD_MAX_RETRIES, NULL); in sd_pr_command()
1596 (scsi_sense_valid(&sshdr))) { in sd_pr_command()
1598 scsi_print_sense_hdr(sdev, NULL, &sshdr); in sd_pr_command()
1764 struct scsi_sense_hdr sshdr; in sd_done() local
1783 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr); in sd_done()
1785 sense_deferred = scsi_sense_is_deferred(&sshdr); in sd_done()
1793 switch (sshdr.sense_key) { in sd_done()
1810 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */ in sd_done()
1814 if (sshdr.asc == 0x10) /* DIX: Host detected corruption */ in sd_done()
1817 if (sshdr.asc == 0x20 || sshdr.asc == 0x24) { in sd_done()
1861 struct scsi_sense_hdr sshdr; in sd_spinup_disk() local
1877 &sshdr, SD_TIMEOUT, in sd_spinup_disk()
1885 if (media_not_present(sdkp, &sshdr)) in sd_spinup_disk()
1889 sense_valid = scsi_sense_valid(&sshdr); in sd_spinup_disk()
1894 sense_valid && sshdr.sense_key == UNIT_ATTENTION))); in sd_spinup_disk()
1912 if (sense_valid && sshdr.sense_key == NOT_READY) { in sd_spinup_disk()
1913 if (sshdr.asc == 4 && sshdr.ascq == 3) in sd_spinup_disk()
1915 if (sshdr.asc == 4 && sshdr.ascq == 0xb) in sd_spinup_disk()
1917 if (sshdr.asc == 4 && sshdr.ascq == 0xc) in sd_spinup_disk()
1931 NULL, 0, &sshdr, in sd_spinup_disk()
1947 sshdr.sense_key == UNIT_ATTENTION && in sd_spinup_disk()
1948 sshdr.asc == 0x28) { in sd_spinup_disk()
1960 sd_print_sense_hdr(sdkp, &sshdr); in sd_spinup_disk()
2018 struct scsi_sense_hdr *sshdr, int sense_valid, in read_capacity_error() argument
2022 sd_print_sense_hdr(sdkp, sshdr); in read_capacity_error()
2031 sense_valid && sshdr->sense_key == NOT_READY) in read_capacity_error()
2053 struct scsi_sense_hdr sshdr; in read_capacity_16() local
2072 buffer, RC16_LEN, &sshdr, in read_capacity_16()
2075 if (media_not_present(sdkp, &sshdr)) in read_capacity_16()
2079 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_16()
2081 sshdr.sense_key == ILLEGAL_REQUEST && in read_capacity_16()
2082 (sshdr.asc == 0x20 || sshdr.asc == 0x24) && in read_capacity_16()
2083 sshdr.ascq == 0x00) in read_capacity_16()
2089 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_16()
2090 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_16()
2102 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_16()
2149 struct scsi_sense_hdr sshdr; in read_capacity_10() local
2162 buffer, 8, &sshdr, in read_capacity_10()
2165 if (media_not_present(sdkp, &sshdr)) in read_capacity_10()
2169 sense_valid = scsi_sense_valid(&sshdr); in read_capacity_10()
2171 sshdr.sense_key == UNIT_ATTENTION && in read_capacity_10()
2172 sshdr.asc == 0x29 && sshdr.ascq == 0x00) in read_capacity_10()
2184 read_capacity_error(sdkp, sdp, &sshdr, sense_valid, the_result); in read_capacity_10()
2350 struct scsi_sense_hdr *sshdr) in sd_do_mode_sense() argument
2354 sshdr); in sd_do_mode_sense()
2432 struct scsi_sense_hdr sshdr; in sd_read_cache_type() local
2463 &data, &sshdr); in sd_read_cache_type()
2495 &data, &sshdr); in sd_read_cache_type()
2571 if (scsi_sense_valid(&sshdr) && in sd_read_cache_type()
2572 sshdr.sense_key == ILLEGAL_REQUEST && in sd_read_cache_type()
2573 sshdr.asc == 0x24 && sshdr.ascq == 0x0) in sd_read_cache_type()
2603 struct scsi_sense_hdr sshdr; in sd_read_app_tag_own() local
2612 SD_MAX_RETRIES, &data, &sshdr); in sd_read_app_tag_own()
2619 if (scsi_sense_valid(&sshdr)) in sd_read_app_tag_own()
2620 sd_print_sense_hdr(sdkp, &sshdr); in sd_read_app_tag_own()
3196 struct scsi_sense_hdr sshdr; in sd_start_stop_device() local
3209 res = scsi_execute_req_flags(sdp, cmd, DMA_NONE, NULL, 0, &sshdr, in sd_start_stop_device()
3214 sd_print_sense_hdr(sdkp, &sshdr); in sd_start_stop_device()
3215 if (scsi_sense_valid(&sshdr) && in sd_start_stop_device()
3217 sshdr.asc == 0x3a) in sd_start_stop_device()
3398 struct scsi_sense_hdr *sshdr) in sd_print_sense_hdr() argument
3401 sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); in sd_print_sense_hdr()