Lines Matching refs:sshdr

387 			      struct scsi_sense_hdr *sshdr)  in scsi_report_sense()  argument
391 if (sshdr->sense_key == UNIT_ATTENTION) { in scsi_report_sense()
392 if (sshdr->asc == 0x3f && sshdr->ascq == 0x03) { in scsi_report_sense()
396 } else if (sshdr->asc == 0x3f && sshdr->ascq == 0x0e) { in scsi_report_sense()
404 } else if (sshdr->asc == 0x3f) in scsi_report_sense()
411 if (sshdr->asc == 0x38 && sshdr->ascq == 0x07) { in scsi_report_sense()
419 if (sshdr->asc == 0x2a && sshdr->ascq == 0x01) { in scsi_report_sense()
423 } else if (sshdr->asc == 0x2a && sshdr->ascq == 0x09) { in scsi_report_sense()
427 } else if (sshdr->asc == 0x2a) in scsi_report_sense()
452 struct scsi_sense_hdr sshdr; in scsi_check_sense() local
454 if (! scsi_command_normalize_sense(scmd, &sshdr)) in scsi_check_sense()
457 scsi_report_sense(sdev, &sshdr); in scsi_check_sense()
459 if (scsi_sense_is_deferred(&sshdr)) in scsi_check_sense()
466 rc = sdev->scsi_dh_data->scsi_dh->check_sense(sdev, &sshdr); in scsi_check_sense()
484 if (sshdr.response_code == 0x70) { in scsi_check_sense()
494 if ((sshdr.additional_length > 3) && in scsi_check_sense()
500 switch (sshdr.sense_key) { in scsi_check_sense()
507 if (sshdr.asc == 0x10) /* DIF */ in scsi_check_sense()
526 if (sshdr.asc != 0x28 || sshdr.ascq != 0x00) { in scsi_check_sense()
537 sshdr.asc == 0x3f && sshdr.ascq == 0x0e) in scsi_check_sense()
543 if ((sshdr.asc == 0x04) && (sshdr.ascq == 0x01)) in scsi_check_sense()
550 (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) in scsi_check_sense()
560 if (sshdr.asc == 0x27 && sshdr.ascq == 0x07) { in scsi_check_sense()
573 if (sshdr.asc == 0x11 || /* UNRECOVERED READ ERR */ in scsi_check_sense()
574 sshdr.asc == 0x13 || /* AMNF DATA FIELD */ in scsi_check_sense()
575 sshdr.asc == 0x14) { /* RECORD NOT FOUND */ in scsi_check_sense()
588 if (sshdr.asc == 0x20 || /* Invalid command operation code */ in scsi_check_sense()
589 sshdr.asc == 0x21 || /* Logical block address out of range */ in scsi_check_sense()
590 sshdr.asc == 0x24 || /* Invalid field in cdb */ in scsi_check_sense()
591 sshdr.asc == 0x26) { /* Parameter value invalid */ in scsi_check_sense()
2430 struct scsi_sense_hdr *sshdr) in scsi_normalize_sense() argument
2435 memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); in scsi_normalize_sense()
2437 sshdr->response_code = (sense_buffer[0] & 0x7f); in scsi_normalize_sense()
2439 if (!scsi_sense_valid(sshdr)) in scsi_normalize_sense()
2442 if (sshdr->response_code >= 0x72) { in scsi_normalize_sense()
2447 sshdr->sense_key = (sense_buffer[1] & 0xf); in scsi_normalize_sense()
2449 sshdr->asc = sense_buffer[2]; in scsi_normalize_sense()
2451 sshdr->ascq = sense_buffer[3]; in scsi_normalize_sense()
2453 sshdr->additional_length = sense_buffer[7]; in scsi_normalize_sense()
2459 sshdr->sense_key = (sense_buffer[2] & 0xf); in scsi_normalize_sense()
2464 sshdr->asc = sense_buffer[12]; in scsi_normalize_sense()
2466 sshdr->ascq = sense_buffer[13]; in scsi_normalize_sense()
2475 struct scsi_sense_hdr *sshdr) in scsi_command_normalize_sense() argument
2478 SCSI_SENSE_BUFFERSIZE, sshdr); in scsi_command_normalize_sense()