Lines Matching refs:scsipkt

3475 	struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt;  in sata_txlt_invalid_command()  local
3478 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_invalid_command()
3479 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_invalid_command()
3482 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_invalid_command()
3489 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_invalid_command()
3491 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_invalid_command()
3492 scsipkt->pkt_comp != NULL) { in sata_txlt_invalid_command()
3522 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_check_condition() local
3526 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_check_condition()
3527 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_check_condition()
3530 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_check_condition()
3539 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_check_condition()
3541 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_check_condition()
3542 scsipkt->pkt_comp != NULL) { in sata_txlt_check_condition()
3640 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_inquiry() local
3671 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_inquiry()
3672 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_inquiry()
3676 if (scsipkt->pkt_cdbp[1] & CMDDT) { /* No support for this bit */ in sata_txlt_inquiry()
3677 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_inquiry()
3685 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_inquiry()
3696 sata_scsi_dmafree(NULL, scsipkt); in sata_txlt_inquiry()
3698 if (!(scsipkt->pkt_cdbp[1] & EVPD)) { in sata_txlt_inquiry()
3707 bufsize = scsipkt->pkt_cdbp[4]; in sata_txlt_inquiry()
3708 bufsize |= scsipkt->pkt_cdbp[3] << 8; in sata_txlt_inquiry()
3712 scsipkt->pkt_state |= STATE_XFERRED_DATA; in sata_txlt_inquiry()
3713 scsipkt->pkt_resid = scsipkt->pkt_cdbp[4] > count ? in sata_txlt_inquiry()
3730 switch ((uint_t)scsipkt->pkt_cdbp[2]) { in sata_txlt_inquiry()
3951 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_inquiry()
3958 scsipkt->pkt_state |= STATE_XFERRED_DATA; in sata_txlt_inquiry()
3959 scsipkt->pkt_resid = scsipkt->pkt_cdbp[4] > count ? in sata_txlt_inquiry()
3960 scsipkt->pkt_cdbp[4] - count : 0; in sata_txlt_inquiry()
3967 scsipkt->pkt_reason); in sata_txlt_inquiry()
3969 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_inquiry()
3970 scsipkt->pkt_comp != NULL) { in sata_txlt_inquiry()
4005 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_request_sense() local
4022 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_request_sense()
4023 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_request_sense()
4025 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_request_sense()
4031 if (scsipkt->pkt_cdbp[5] & CTL_BYTE_NACA_MASK) { in sata_txlt_request_sense()
4091 sata_scsi_dmafree(NULL, scsipkt); in sata_txlt_request_sense()
4099 scsipkt->pkt_state |= STATE_XFERRED_DATA; in sata_txlt_request_sense()
4100 scsipkt->pkt_resid = 0; in sata_txlt_request_sense()
4118 scsipkt->pkt_reason); in sata_txlt_request_sense()
4120 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_request_sense()
4121 scsipkt->pkt_comp != NULL) { in sata_txlt_request_sense()
4150 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_test_unit_ready() local
4194 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_test_unit_ready()
4202 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_test_unit_ready()
4205 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_test_unit_ready()
4206 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_test_unit_ready()
4212 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_test_unit_ready()
4214 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_test_unit_ready()
4215 scsipkt->pkt_comp != NULL) { in sata_txlt_test_unit_ready()
4262 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_start_stop_unit() local
4270 "sata_txlt_start_stop_unit: %d\n", scsipkt->pkt_scbp[4] & 1); in sata_txlt_start_stop_unit()
4280 if (scsipkt->pkt_cdbp[1] & START_STOP_IMMED_MASK) { in sata_txlt_start_stop_unit()
4295 switch ((scsipkt->pkt_cdbp[4] & START_STOP_POWER_COND_MASK) >> 4) { in sata_txlt_start_stop_unit()
4297 if (scsipkt->pkt_cdbp[4] & START_STOP_LOEJ_MASK) { in sata_txlt_start_stop_unit()
4301 if (scsipkt->pkt_cdbp[4] & START_STOP_START_MASK) { in sata_txlt_start_stop_unit()
4367 if (!(scsipkt->pkt_cdbp[4] & START_STOP_NOFLUSH_MASK)) { in sata_txlt_start_stop_unit()
4385 if ((scsipkt->pkt_cdbp[3] & START_STOP_MODIFIER_MASK)) { in sata_txlt_start_stop_unit()
4415 if (!(scsipkt->pkt_cdbp[4] & START_STOP_NOFLUSH_MASK)) { in sata_txlt_start_stop_unit()
4513 if (!(scsipkt->pkt_cdbp[4] & START_STOP_NOFLUSH_MASK)) { in sata_txlt_start_stop_unit()
4549 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_start_stop_unit()
4550 scsipkt->pkt_comp != NULL) { in sata_txlt_start_stop_unit()
4587 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_read_capacity() local
4607 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_read_capacity()
4608 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_read_capacity()
4610 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_read_capacity()
4618 sata_scsi_dmafree(NULL, scsipkt); in sata_txlt_read_capacity()
4652 scsipkt->pkt_state |= STATE_XFERRED_DATA; in sata_txlt_read_capacity()
4653 scsipkt->pkt_resid = 0; in sata_txlt_read_capacity()
4663 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_read_capacity()
4665 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_read_capacity()
4666 scsipkt->pkt_comp != NULL) { in sata_txlt_read_capacity()
4697 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_read_capacity16() local
4720 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_read_capacity16()
4721 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_read_capacity16()
4730 sata_scsi_dmafree(NULL, scsipkt); in sata_txlt_read_capacity16()
4733 if ((scsipkt->pkt_cdbp[1] & 0x1f) != in sata_txlt_read_capacity16()
4742 if ((scsipkt->pkt_cdbp[2] != 0) || in sata_txlt_read_capacity16()
4743 (scsipkt->pkt_cdbp[3] != 0) || in sata_txlt_read_capacity16()
4744 (scsipkt->pkt_cdbp[4] != 0) || in sata_txlt_read_capacity16()
4745 (scsipkt->pkt_cdbp[5] != 0) || in sata_txlt_read_capacity16()
4746 (scsipkt->pkt_cdbp[6] != 0) || in sata_txlt_read_capacity16()
4747 (scsipkt->pkt_cdbp[7] != 0) || in sata_txlt_read_capacity16()
4748 (scsipkt->pkt_cdbp[8] != 0) || in sata_txlt_read_capacity16()
4749 (scsipkt->pkt_cdbp[9] != 0)) { in sata_txlt_read_capacity16()
4757 if (scsipkt->pkt_cdbp[14] & 0x1) { in sata_txlt_read_capacity16()
4764 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_read_capacity16()
4841 scsipkt->pkt_state |= STATE_XFERRED_DATA; in sata_txlt_read_capacity16()
4842 scsipkt->pkt_resid = 0; in sata_txlt_read_capacity16()
4854 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_read_capacity16()
4856 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_read_capacity16()
4857 scsipkt->pkt_comp != NULL) { in sata_txlt_read_capacity16()
4885 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_unmap() local
4926 bdlen = scsipkt->pkt_cdbp[7]; in sata_txlt_unmap()
4927 bdlen = (bdlen << 8) + scsipkt->pkt_cdbp[8] - paramlen; in sata_txlt_unmap()
5054 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_mode_sense() local
5088 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_mode_sense()
5089 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_mode_sense()
5092 pc = scsipkt->pkt_cdbp[2] >> 6; in sata_txlt_mode_sense()
5101 sata_scsi_dmafree(NULL, scsipkt); in sata_txlt_mode_sense()
5105 if (!(scsipkt->pkt_cdbp[1] & 8)) { in sata_txlt_mode_sense()
5106 if (scsipkt->pkt_cdbp[0] == SCMD_MODE_SENSE_G1 && in sata_txlt_mode_sense()
5107 (scsipkt->pkt_cdbp[1] & LLBAA)) in sata_txlt_mode_sense()
5139 if ((scsipkt->pkt_cdbp[1] & 0x08) == 0) { in sata_txlt_mode_sense()
5207 switch (scsipkt->pkt_cdbp[2] & 0x3f) { in sata_txlt_mode_sense()
5217 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_mode_sense()
5261 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_mode_sense()
5279 if (scsipkt->pkt_cdbp[0] == SCMD_MODE_SENSE) { in sata_txlt_mode_sense()
5280 alc_len = scsipkt->pkt_cdbp[4]; in sata_txlt_mode_sense()
5282 alc_len = scsipkt->pkt_cdbp[7]; in sata_txlt_mode_sense()
5283 alc_len = (alc_len << 8) | scsipkt->pkt_cdbp[8]; in sata_txlt_mode_sense()
5295 scsipkt->pkt_state |= STATE_XFERRED_DATA; in sata_txlt_mode_sense()
5296 scsipkt->pkt_resid = alc_len > count ? alc_len - count : 0; in sata_txlt_mode_sense()
5298 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_mode_sense()
5304 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_mode_sense()
5306 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_mode_sense()
5307 scsipkt->pkt_comp != NULL) { in sata_txlt_mode_sense()
5356 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_mode_select() local
5381 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_mode_select()
5382 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_mode_select()
5384 nointr_flag = scsipkt->pkt_flags & FLAG_NOINTR; in sata_txlt_mode_select()
5387 if (! (scsipkt->pkt_cdbp[1] & 0x10)) { /* No support for PF bit = 0 */ in sata_txlt_mode_select()
5388 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_mode_select()
5395 if (scsipkt->pkt_cdbp[0] == SCMD_MODE_SELECT) { in sata_txlt_mode_select()
5396 pllen = scsipkt->pkt_cdbp[4]; in sata_txlt_mode_select()
5398 pllen = scsipkt->pkt_cdbp[7]; in sata_txlt_mode_select()
5399 pllen = (pllen << 8) | scsipkt->pkt_cdbp[7]; in sata_txlt_mode_select()
5402 *scsipkt->pkt_scbp = STATUS_GOOD; /* Presumed outcome */ in sata_txlt_mode_select()
5407 scsipkt->pkt_state |= STATE_XFERRED_DATA; in sata_txlt_mode_select()
5408 scsipkt->pkt_resid = 0; in sata_txlt_mode_select()
5417 if (scsipkt->pkt_cdbp[0] == SCMD_MODE_SELECT) { in sata_txlt_mode_select()
5439 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_mode_select()
5440 scsipkt->pkt_comp != NULL) { in sata_txlt_mode_select()
5441 scsipkt->pkt_flags |= FLAG_NOINTR; in sata_txlt_mode_select()
5453 if (scsipkt->pkt_cdbp[1] & 0x01) { in sata_txlt_mode_select()
5454 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_mode_select()
5560 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_mode_select()
5622 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_mode_select()
5624 scsipkt->pkt_reason = CMD_INCOMPLETE; in sata_txlt_mode_select()
5630 scsipkt->pkt_flags &= ~FLAG_NOINTR; in sata_txlt_mode_select()
5631 scsipkt->pkt_flags |= nointr_flag; in sata_txlt_mode_select()
5634 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_mode_select()
5636 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_mode_select()
5637 scsipkt->pkt_comp != NULL) { in sata_txlt_mode_select()
5668 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_ata_pass_thru() local
5685 if (scsipkt->pkt_cdbp[2] & SATL_APT_BM_T_DIR) in sata_txlt_ata_pass_thru()
5691 if (((scsipkt->pkt_cdbp[1] >> 5) & 0x7) != 0) { in sata_txlt_ata_pass_thru()
5697 if (((scsipkt->pkt_cdbp[2] >> 6) & 0x3) != 0) { in sata_txlt_ata_pass_thru()
5703 switch ((scsipkt->pkt_cdbp[1] >> 1) & 0xf) { in sata_txlt_ata_pass_thru()
5732 sata_scsi_dmafree(NULL, scsipkt); in sata_txlt_ata_pass_thru()
5750 sata_scsi_dmafree(NULL, scsipkt); in sata_txlt_ata_pass_thru()
5770 switch ((uint_t)scsipkt->pkt_cdbp[0]) { in sata_txlt_ata_pass_thru()
5772 scmd->satacmd_lba_low_lsb = scsipkt->pkt_cdbp[5]; in sata_txlt_ata_pass_thru()
5773 scmd->satacmd_lba_mid_lsb = scsipkt->pkt_cdbp[6]; in sata_txlt_ata_pass_thru()
5774 scmd->satacmd_lba_high_lsb = scsipkt->pkt_cdbp[7]; in sata_txlt_ata_pass_thru()
5776 scmd->satacmd_features_reg = scsipkt->pkt_cdbp[3]; in sata_txlt_ata_pass_thru()
5777 scmd->satacmd_sec_count_lsb = scsipkt->pkt_cdbp[4]; in sata_txlt_ata_pass_thru()
5779 scmd->satacmd_device_reg = scsipkt->pkt_cdbp[8]; in sata_txlt_ata_pass_thru()
5780 scmd->satacmd_cmd_reg = scsipkt->pkt_cdbp[9]; in sata_txlt_ata_pass_thru()
5784 scmd->satacmd_device_reg = scsipkt->pkt_cdbp[13]; in sata_txlt_ata_pass_thru()
5785 scmd->satacmd_cmd_reg = scsipkt->pkt_cdbp[14]; in sata_txlt_ata_pass_thru()
5787 scmd->satacmd_lba_low_lsb = scsipkt->pkt_cdbp[8]; in sata_txlt_ata_pass_thru()
5788 scmd->satacmd_lba_mid_lsb = scsipkt->pkt_cdbp[10]; in sata_txlt_ata_pass_thru()
5789 scmd->satacmd_lba_high_lsb = scsipkt->pkt_cdbp[12]; in sata_txlt_ata_pass_thru()
5791 scmd->satacmd_features_reg = scsipkt->pkt_cdbp[4]; in sata_txlt_ata_pass_thru()
5792 scmd->satacmd_sec_count_lsb = scsipkt->pkt_cdbp[6]; in sata_txlt_ata_pass_thru()
5794 if (scsipkt->pkt_cdbp[1] & SATL_APT_BM_EXTEND) { in sata_txlt_ata_pass_thru()
5798 scmd->satacmd_lba_low_msb = scsipkt->pkt_cdbp[7]; in sata_txlt_ata_pass_thru()
5799 scmd->satacmd_lba_mid_msb = scsipkt->pkt_cdbp[9]; in sata_txlt_ata_pass_thru()
5800 scmd->satacmd_lba_high_msb = scsipkt->pkt_cdbp[11]; in sata_txlt_ata_pass_thru()
5802 scmd->satacmd_features_reg_ext = scsipkt->pkt_cdbp[3]; in sata_txlt_ata_pass_thru()
5803 scmd->satacmd_sec_count_msb = scsipkt->pkt_cdbp[5]; in sata_txlt_ata_pass_thru()
5810 scsipkt->pkt_cdbp[0]); in sata_txlt_ata_pass_thru()
5814 if (scsipkt->pkt_cdbp[2] & SATL_APT_BM_CK_COND) { in sata_txlt_ata_pass_thru()
5831 switch (scsipkt->pkt_cdbp[2] & 0x03) { /* T_LENGTH field */ in sata_txlt_ata_pass_thru()
5838 if (((scsipkt->pkt_cdbp[2] >> 2) & 1) == 0) in sata_txlt_ata_pass_thru()
5847 if (((scsipkt->pkt_cdbp[2] >> 2) & 1) == 0) in sata_txlt_ata_pass_thru()
5897 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_log_sense() local
5932 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_log_sense()
5933 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_log_sense()
5936 pc = scsipkt->pkt_cdbp[2] >> 6; in sata_txlt_log_sense()
5937 page_code = scsipkt->pkt_cdbp[2] & 0x3f; in sata_txlt_log_sense()
5944 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
5963 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
5980 sata_scsi_dmafree(NULL, scsipkt); in sata_txlt_log_sense()
6008 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
6021 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
6030 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
6046 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
6055 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
6072 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
6081 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
6111 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
6120 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_log_sense()
6136 alc_len = scsipkt->pkt_cdbp[7]; in sata_txlt_log_sense()
6137 alc_len = (alc_len << 8) | scsipkt->pkt_cdbp[8]; in sata_txlt_log_sense()
6149 scsipkt->pkt_state |= STATE_XFERRED_DATA; in sata_txlt_log_sense()
6150 scsipkt->pkt_resid = alc_len > count ? alc_len - count : 0; in sata_txlt_log_sense()
6152 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_log_sense()
6158 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_log_sense()
6160 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_log_sense()
6161 scsipkt->pkt_comp != NULL) { in sata_txlt_log_sense()
6225 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_read() local
6250 switch ((uint_t)scsipkt->pkt_cdbp[0]) { in sata_txlt_read()
6253 lba = (scsipkt->pkt_cdbp[1] & 0x1f); in sata_txlt_read()
6254 lba = (lba << 8) | scsipkt->pkt_cdbp[2]; in sata_txlt_read()
6255 lba = (lba << 8) | scsipkt->pkt_cdbp[3]; in sata_txlt_read()
6256 sec_count = scsipkt->pkt_cdbp[4]; in sata_txlt_read()
6261 lba = scsipkt->pkt_cdbp[2]; in sata_txlt_read()
6262 lba = (lba << 8) | scsipkt->pkt_cdbp[3]; in sata_txlt_read()
6263 lba = (lba << 8) | scsipkt->pkt_cdbp[4]; in sata_txlt_read()
6264 lba = (lba << 8) | scsipkt->pkt_cdbp[5]; in sata_txlt_read()
6265 sec_count = scsipkt->pkt_cdbp[7]; in sata_txlt_read()
6266 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[8]; in sata_txlt_read()
6270 lba = scsipkt->pkt_cdbp[2]; in sata_txlt_read()
6271 lba = (lba << 8) | scsipkt->pkt_cdbp[3]; in sata_txlt_read()
6272 lba = (lba << 8) | scsipkt->pkt_cdbp[4]; in sata_txlt_read()
6273 lba = (lba << 8) | scsipkt->pkt_cdbp[5]; in sata_txlt_read()
6274 sec_count = scsipkt->pkt_cdbp[6]; in sata_txlt_read()
6275 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[7]; in sata_txlt_read()
6276 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[8]; in sata_txlt_read()
6277 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[9]; in sata_txlt_read()
6281 lba = scsipkt->pkt_cdbp[2]; in sata_txlt_read()
6282 lba = (lba << 8) | scsipkt->pkt_cdbp[3]; in sata_txlt_read()
6283 lba = (lba << 8) | scsipkt->pkt_cdbp[4]; in sata_txlt_read()
6284 lba = (lba << 8) | scsipkt->pkt_cdbp[5]; in sata_txlt_read()
6285 lba = (lba << 8) | scsipkt->pkt_cdbp[6]; in sata_txlt_read()
6286 lba = (lba << 8) | scsipkt->pkt_cdbp[7]; in sata_txlt_read()
6287 lba = (lba << 8) | scsipkt->pkt_cdbp[8]; in sata_txlt_read()
6288 lba = (lba << 8) | scsipkt->pkt_cdbp[9]; in sata_txlt_read()
6289 sec_count = scsipkt->pkt_cdbp[10]; in sata_txlt_read()
6290 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[11]; in sata_txlt_read()
6291 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[12]; in sata_txlt_read()
6292 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[13]; in sata_txlt_read()
6494 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_write() local
6519 switch ((uint_t)scsipkt->pkt_cdbp[0]) { in sata_txlt_write()
6522 lba = (scsipkt->pkt_cdbp[1] & 0x1f); in sata_txlt_write()
6523 lba = (lba << 8) | scsipkt->pkt_cdbp[2]; in sata_txlt_write()
6524 lba = (lba << 8) | scsipkt->pkt_cdbp[3]; in sata_txlt_write()
6525 sec_count = scsipkt->pkt_cdbp[4]; in sata_txlt_write()
6530 lba = scsipkt->pkt_cdbp[2]; in sata_txlt_write()
6531 lba = (lba << 8) | scsipkt->pkt_cdbp[3]; in sata_txlt_write()
6532 lba = (lba << 8) | scsipkt->pkt_cdbp[4]; in sata_txlt_write()
6533 lba = (lba << 8) | scsipkt->pkt_cdbp[5]; in sata_txlt_write()
6534 sec_count = scsipkt->pkt_cdbp[7]; in sata_txlt_write()
6535 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[8]; in sata_txlt_write()
6539 lba = scsipkt->pkt_cdbp[2]; in sata_txlt_write()
6540 lba = (lba << 8) | scsipkt->pkt_cdbp[3]; in sata_txlt_write()
6541 lba = (lba << 8) | scsipkt->pkt_cdbp[4]; in sata_txlt_write()
6542 lba = (lba << 8) | scsipkt->pkt_cdbp[5]; in sata_txlt_write()
6543 sec_count = scsipkt->pkt_cdbp[6]; in sata_txlt_write()
6544 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[7]; in sata_txlt_write()
6545 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[8]; in sata_txlt_write()
6546 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[9]; in sata_txlt_write()
6550 lba = scsipkt->pkt_cdbp[2]; in sata_txlt_write()
6551 lba = (lba << 8) | scsipkt->pkt_cdbp[3]; in sata_txlt_write()
6552 lba = (lba << 8) | scsipkt->pkt_cdbp[4]; in sata_txlt_write()
6553 lba = (lba << 8) | scsipkt->pkt_cdbp[5]; in sata_txlt_write()
6554 lba = (lba << 8) | scsipkt->pkt_cdbp[6]; in sata_txlt_write()
6555 lba = (lba << 8) | scsipkt->pkt_cdbp[7]; in sata_txlt_write()
6556 lba = (lba << 8) | scsipkt->pkt_cdbp[8]; in sata_txlt_write()
6557 lba = (lba << 8) | scsipkt->pkt_cdbp[9]; in sata_txlt_write()
6558 sec_count = scsipkt->pkt_cdbp[10]; in sata_txlt_write()
6559 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[11]; in sata_txlt_write()
6560 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[12]; in sata_txlt_write()
6561 sec_count = (sec_count << 8) | scsipkt->pkt_cdbp[13]; in sata_txlt_write()
6738 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_write_buffer() local
6747 mode = scsipkt->pkt_cdbp[1] & 0x1f; in sata_txlt_write_buffer()
6766 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_write_buffer()
6767 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_write_buffer()
6795 *scsipkt->pkt_scbp = STATUS_GOOD; /* Presumed outcome */ in sata_txlt_write_buffer()
6819 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_write_buffer()
6822 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_write_buffer()
6828 scsipkt->pkt_reason = CMD_INCOMPLETE; in sata_txlt_write_buffer()
6829 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_write_buffer()
6853 scsipkt->pkt_reason = CMD_TIMEOUT; in sata_txlt_write_buffer()
6854 scsipkt->pkt_statistics |= in sata_txlt_write_buffer()
6860 scsipkt->pkt_reason = CMD_ABORTED; in sata_txlt_write_buffer()
6861 scsipkt->pkt_statistics |= STAT_ABORTED; in sata_txlt_write_buffer()
6867 scsipkt->pkt_reason = CMD_RESET; in sata_txlt_write_buffer()
6868 scsipkt->pkt_statistics |= STAT_DEV_RESET; in sata_txlt_write_buffer()
6876 scsipkt->pkt_reason = CMD_TRAN_ERR; in sata_txlt_write_buffer()
6881 "scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_write_buffer()
6883 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0) in sata_txlt_write_buffer()
6885 scsi_hba_pkt_comp(scsipkt); in sata_txlt_write_buffer()
6891 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_write_buffer()
6895 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_write_buffer()
6896 scsipkt->pkt_comp != NULL) { in sata_txlt_write_buffer()
6925 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_reidentify_device() local
6958 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0) in sata_reidentify_device()
6959 scsi_hba_pkt_comp(scsipkt); in sata_reidentify_device()
6979 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0) in sata_reidentify_device()
6980 scsi_hba_pkt_comp(scsipkt); in sata_reidentify_device()
7307 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_lba_out_of_range() local
7310 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_lba_out_of_range()
7311 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_lba_out_of_range()
7313 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_lba_out_of_range()
7315 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_lba_out_of_range()
7321 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_lba_out_of_range()
7323 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_lba_out_of_range()
7324 scsipkt->pkt_comp != NULL) { in sata_txlt_lba_out_of_range()
7425 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_arq_sense() local
7430 scsipkt->pkt_state |= STATE_ARQ_DONE; in sata_arq_sense()
7431 arqs = (struct scsi_arq_status *)scsipkt->pkt_scbp; in sata_arq_sense()
7454 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_ata_pass_thru_illegal_cmd() local
7457 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_ata_pass_thru_illegal_cmd()
7458 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_ata_pass_thru_illegal_cmd()
7459 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_ata_pass_thru_illegal_cmd()
7466 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_ata_pass_thru_illegal_cmd()
7467 scsipkt->pkt_comp != NULL) { in sata_txlt_ata_pass_thru_illegal_cmd()
7495 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_unmap_nodata_cmd() local
7497 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_unmap_nodata_cmd()
7498 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_unmap_nodata_cmd()
7499 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_unmap_nodata_cmd()
7502 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_unmap_nodata_cmd()
7503 scsipkt->pkt_comp != NULL) { in sata_txlt_unmap_nodata_cmd()
7525 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_emul_rw_completion() local
7527 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_emul_rw_completion()
7529 scsipkt->pkt_reason = CMD_CMPLT; in sata_emul_rw_completion()
7530 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_emul_rw_completion()
7566 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_rw_completion() local
7573 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_rw_completion()
7575 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_rw_completion()
7576 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_rw_completion()
7593 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_rw_completion()
7595 scsipkt->pkt_reason = CMD_INCOMPLETE; in sata_txlt_rw_completion()
7596 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_rw_completion()
7678 scsipkt->pkt_reason = CMD_INCOMPLETE; in sata_txlt_rw_completion()
7682 scsipkt->pkt_reason = CMD_TIMEOUT; in sata_txlt_rw_completion()
7683 scsipkt->pkt_statistics |= in sata_txlt_rw_completion()
7689 scsipkt->pkt_reason = CMD_ABORTED; in sata_txlt_rw_completion()
7690 scsipkt->pkt_statistics |= STAT_ABORTED; in sata_txlt_rw_completion()
7695 scsipkt->pkt_reason = CMD_RESET; in sata_txlt_rw_completion()
7696 scsipkt->pkt_statistics |= STAT_DEV_RESET; in sata_txlt_rw_completion()
7704 scsipkt->pkt_reason = CMD_TRAN_ERR; in sata_txlt_rw_completion()
7709 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_txlt_rw_completion()
7711 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0) in sata_txlt_rw_completion()
7713 scsi_hba_pkt_comp(scsipkt); in sata_txlt_rw_completion()
7733 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_nodata_cmd_completion() local
7737 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0) in sata_txlt_nodata_cmd_completion()
7739 scsi_hba_pkt_comp(scsipkt); in sata_txlt_nodata_cmd_completion()
7751 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_apt_completion() local
7757 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_apt_completion()
7759 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_apt_completion()
7760 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_apt_completion()
7765 if (scsipkt->pkt_cdbp[2] & SATL_APT_BM_CK_COND) { in sata_txlt_apt_completion()
7766 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_apt_completion()
7781 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_apt_completion()
7783 scsipkt->pkt_reason = CMD_INCOMPLETE; in sata_txlt_apt_completion()
7784 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_apt_completion()
7837 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0) in sata_txlt_apt_completion()
7839 scsi_hba_pkt_comp(scsipkt); in sata_txlt_apt_completion()
7851 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_unmap_completion() local
7857 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_unmap_completion()
7859 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_unmap_completion()
7860 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_unmap_completion()
7871 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_unmap_completion()
7873 scsipkt->pkt_reason = CMD_INCOMPLETE; in sata_txlt_unmap_completion()
7874 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_unmap_completion()
7929 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0) in sata_txlt_unmap_completion()
7931 scsi_hba_pkt_comp(scsipkt); in sata_txlt_unmap_completion()
7944 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_fill_ata_return_desc() local
7946 (struct sata_apt_sense_data *)scsipkt->pkt_scbp; in sata_fill_ata_return_desc()
7952 if ((scsipkt->pkt_cdbp[0] == SPC3_CMD_ATA_COMMAND_PASS_THROUGH16) && in sata_fill_ata_return_desc()
7953 (scsipkt->pkt_cdbp[2] & SATL_APT_BM_EXTEND)) in sata_fill_ata_return_desc()
7956 scsipkt->pkt_state |= STATE_ARQ_DONE; in sata_fill_ata_return_desc()
7964 apt_sd->apt_rqpkt_resid = scsipkt->pkt_scblen - in sata_fill_ata_return_desc()
8013 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_set_arq_data() local
8016 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_set_arq_data()
8020 scsipkt->pkt_reason = CMD_CMPLT; in sata_set_arq_data()
8021 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_set_arq_data()
8024 scsipkt->pkt_reason = CMD_INCOMPLETE; in sata_set_arq_data()
8025 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_set_arq_data()
8049 scsipkt->pkt_reason = CMD_TIMEOUT; in sata_set_arq_data()
8050 scsipkt->pkt_statistics |= in sata_set_arq_data()
8056 scsipkt->pkt_reason = CMD_ABORTED; in sata_set_arq_data()
8057 scsipkt->pkt_statistics |= STAT_ABORTED; in sata_set_arq_data()
8063 scsipkt->pkt_reason = CMD_RESET; in sata_set_arq_data()
8064 scsipkt->pkt_statistics |= STAT_DEV_RESET; in sata_set_arq_data()
8072 scsipkt->pkt_reason = CMD_TRAN_ERR; in sata_set_arq_data()
8078 "Scsi_pkt completion reason %x\n", scsipkt->pkt_reason); in sata_set_arq_data()
8323 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_mode_select_page_8() local
8338 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_mode_select_page_8()
8403 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_mode_select_page_8()
8442 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_mode_select_page_8()
8497 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_mode_select_page_1c() local
8512 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_mode_select_page_1c()
8524 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_mode_select_page_1c()
8585 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_mode_select_page_30() local
8600 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_mode_select_page_30()
8665 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_mode_select_page_1a() local
8684 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_mode_select_page_1a()
9887 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_atapi() local
9897 union scsi_cdb *cdbp = (union scsi_cdb *)scsipkt->pkt_cdbp; in sata_txlt_atapi()
9934 cdblen = scsipkt->pkt_cdblen; in sata_txlt_atapi()
9957 switch ((uint_t)scsipkt->pkt_cdbp[0]) { in sata_txlt_atapi()
10074 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_txlt_atapi_completion() local
10083 scsipkt->pkt_state = STATE_GOT_BUS | STATE_GOT_TARGET | in sata_txlt_atapi_completion()
10089 scsipkt->pkt_state |= STATE_XFERRED_DATA; in sata_txlt_atapi_completion()
10090 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_atapi_completion()
10091 *scsipkt->pkt_scbp = STATUS_GOOD; in sata_txlt_atapi_completion()
10108 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_txlt_atapi_completion()
10120 scsipkt->pkt_reason = CMD_CMPLT; in sata_txlt_atapi_completion()
10138 scsipkt->pkt_reason, in sata_txlt_atapi_completion()
10152 scsipkt->pkt_reason = CMD_INCOMPLETE; in sata_txlt_atapi_completion()
10153 scsipkt->pkt_state &= ~(STATE_GOT_BUS | in sata_txlt_atapi_completion()
10160 scsipkt->pkt_reason = CMD_TIMEOUT; in sata_txlt_atapi_completion()
10161 scsipkt->pkt_statistics |= in sata_txlt_atapi_completion()
10171 scsipkt->pkt_reason = CMD_ABORTED; in sata_txlt_atapi_completion()
10172 scsipkt->pkt_statistics |= STAT_ABORTED; in sata_txlt_atapi_completion()
10177 scsipkt->pkt_reason = CMD_RESET; in sata_txlt_atapi_completion()
10178 scsipkt->pkt_statistics |= STAT_DEV_RESET; in sata_txlt_atapi_completion()
10192 scsipkt->pkt_reason = CMD_TRAN_ERR; in sata_txlt_atapi_completion()
10193 scsipkt->pkt_state &= ~(STATE_GOT_BUS | in sata_txlt_atapi_completion()
10203 if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0 && in sata_txlt_atapi_completion()
10204 scsipkt->pkt_comp != NULL) { in sata_txlt_atapi_completion()
10206 (*scsipkt->pkt_comp)(scsipkt); in sata_txlt_atapi_completion()
17809 struct scsi_pkt *scsipkt = spx->txlt_scsi_pkt; in sata_xlate_errors() local
17812 scsipkt->pkt_reason = CMD_INCOMPLETE; in sata_xlate_errors()
17813 *scsipkt->pkt_scbp = STATUS_CHECK; in sata_xlate_errors()
17838 scsipkt->pkt_reason = CMD_TIMEOUT; in sata_xlate_errors()
17839 scsipkt->pkt_statistics |= STAT_TIMEOUT | STAT_DEV_RESET; in sata_xlate_errors()
17844 scsipkt->pkt_reason = CMD_ABORTED; in sata_xlate_errors()
17845 scsipkt->pkt_statistics |= STAT_ABORTED; in sata_xlate_errors()
17854 scsipkt->pkt_reason = CMD_RESET; in sata_xlate_errors()
17855 scsipkt->pkt_statistics |= STAT_DEV_RESET; in sata_xlate_errors()
17859 scsipkt->pkt_reason = CMD_TRAN_ERR; in sata_xlate_errors()