• Home
  • Raw
  • Download

Lines Matching refs:tf

352 				    const struct ata_taskfile *tf)  in ata_scsi_set_sense_information()  argument
359 information = ata_tf_read_block(tf, dev); in ata_scsi_set_sense_information()
886 static void ata_dump_status(unsigned id, struct ata_taskfile *tf) in ata_dump_status() argument
888 u8 stat = tf->command, err = tf->feature; in ata_dump_status()
1071 struct ata_taskfile *tf = &qc->result_tf; in ata_gen_passthru_sense() local
1086 tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { in ata_gen_passthru_sense()
1087 ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature, in ata_gen_passthru_sense()
1117 desc[3] = tf->feature; /* == error reg */ in ata_gen_passthru_sense()
1118 desc[5] = tf->nsect; in ata_gen_passthru_sense()
1119 desc[7] = tf->lbal; in ata_gen_passthru_sense()
1120 desc[9] = tf->lbam; in ata_gen_passthru_sense()
1121 desc[11] = tf->lbah; in ata_gen_passthru_sense()
1122 desc[12] = tf->device; in ata_gen_passthru_sense()
1123 desc[13] = tf->command; /* == status reg */ in ata_gen_passthru_sense()
1129 if (tf->flags & ATA_TFLAG_LBA48) { in ata_gen_passthru_sense()
1131 desc[4] = tf->hob_nsect; in ata_gen_passthru_sense()
1132 desc[6] = tf->hob_lbal; in ata_gen_passthru_sense()
1133 desc[8] = tf->hob_lbam; in ata_gen_passthru_sense()
1134 desc[10] = tf->hob_lbah; in ata_gen_passthru_sense()
1138 desc[0] = tf->feature; in ata_gen_passthru_sense()
1139 desc[1] = tf->command; /* status */ in ata_gen_passthru_sense()
1140 desc[2] = tf->device; in ata_gen_passthru_sense()
1141 desc[3] = tf->nsect; in ata_gen_passthru_sense()
1143 if (tf->flags & ATA_TFLAG_LBA48) { in ata_gen_passthru_sense()
1145 if (tf->hob_nsect) in ata_gen_passthru_sense()
1147 if (tf->hob_lbal || tf->hob_lbam || tf->hob_lbah) in ata_gen_passthru_sense()
1150 desc[9] = tf->lbal; in ata_gen_passthru_sense()
1151 desc[10] = tf->lbam; in ata_gen_passthru_sense()
1152 desc[11] = tf->lbah; in ata_gen_passthru_sense()
1170 struct ata_taskfile *tf = &qc->result_tf; in ata_gen_ata_sense() local
1190 tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { in ata_gen_ata_sense()
1191 ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature, in ata_gen_ata_sense()
1197 tf->command, qc->err_mask); in ata_gen_ata_sense()
1461 struct ata_taskfile *tf = &qc->tf; in ata_scsi_start_stop_xlat() local
1471 tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR; in ata_scsi_start_stop_xlat()
1472 tf->protocol = ATA_PROT_NODATA; in ata_scsi_start_stop_xlat()
1488 tf->nsect = 1; /* 1 sector, lba=0 */ in ata_scsi_start_stop_xlat()
1491 tf->flags |= ATA_TFLAG_LBA; in ata_scsi_start_stop_xlat()
1493 tf->lbah = 0x0; in ata_scsi_start_stop_xlat()
1494 tf->lbam = 0x0; in ata_scsi_start_stop_xlat()
1495 tf->lbal = 0x0; in ata_scsi_start_stop_xlat()
1496 tf->device |= ATA_LBA; in ata_scsi_start_stop_xlat()
1499 tf->lbal = 0x1; /* sect */ in ata_scsi_start_stop_xlat()
1500 tf->lbam = 0x0; /* cyl low */ in ata_scsi_start_stop_xlat()
1501 tf->lbah = 0x0; /* cyl high */ in ata_scsi_start_stop_xlat()
1504 tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ in ata_scsi_start_stop_xlat()
1518 tf->command = ATA_CMD_STANDBYNOW1; in ata_scsi_start_stop_xlat()
1554 struct ata_taskfile *tf = &qc->tf; in ata_scsi_flush_xlat() local
1556 tf->flags |= ATA_TFLAG_DEVICE; in ata_scsi_flush_xlat()
1557 tf->protocol = ATA_PROT_NODATA; in ata_scsi_flush_xlat()
1560 tf->command = ATA_CMD_FLUSH_EXT; in ata_scsi_flush_xlat()
1562 tf->command = ATA_CMD_FLUSH; in ata_scsi_flush_xlat()
1676 struct ata_taskfile *tf = &qc->tf; in ata_scsi_verify_xlat() local
1684 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in ata_scsi_verify_xlat()
1685 tf->protocol = ATA_PROT_NODATA; in ata_scsi_verify_xlat()
1712 tf->flags |= ATA_TFLAG_LBA; in ata_scsi_verify_xlat()
1716 tf->command = ATA_CMD_VERIFY; in ata_scsi_verify_xlat()
1717 tf->device |= (block >> 24) & 0xf; in ata_scsi_verify_xlat()
1723 tf->flags |= ATA_TFLAG_LBA48; in ata_scsi_verify_xlat()
1724 tf->command = ATA_CMD_VERIFY_EXT; in ata_scsi_verify_xlat()
1726 tf->hob_nsect = (n_block >> 8) & 0xff; in ata_scsi_verify_xlat()
1728 tf->hob_lbah = (block >> 40) & 0xff; in ata_scsi_verify_xlat()
1729 tf->hob_lbam = (block >> 32) & 0xff; in ata_scsi_verify_xlat()
1730 tf->hob_lbal = (block >> 24) & 0xff; in ata_scsi_verify_xlat()
1735 tf->nsect = n_block & 0xff; in ata_scsi_verify_xlat()
1737 tf->lbah = (block >> 16) & 0xff; in ata_scsi_verify_xlat()
1738 tf->lbam = (block >> 8) & 0xff; in ata_scsi_verify_xlat()
1739 tf->lbal = block & 0xff; in ata_scsi_verify_xlat()
1741 tf->device |= ATA_LBA; in ata_scsi_verify_xlat()
1765 tf->command = ATA_CMD_VERIFY; in ata_scsi_verify_xlat()
1766 tf->nsect = n_block & 0xff; /* Sector count 0 means 256 sectors */ in ata_scsi_verify_xlat()
1767 tf->lbal = sect; in ata_scsi_verify_xlat()
1768 tf->lbam = cyl; in ata_scsi_verify_xlat()
1769 tf->lbah = cyl >> 8; in ata_scsi_verify_xlat()
1770 tf->device |= head; in ata_scsi_verify_xlat()
1899 rc = ata_build_rw_tf(&qc->tf, qc->dev, block, n_block, tf_flags, in ata_scsi_rw_xlat()
2348 struct ata_taskfile tf; in ata_scsiop_inq_89() local
2350 memset(&tf, 0, sizeof(tf)); in ata_scsiop_inq_89()
2362 tf.command = ATA_DRDY; /* really, this is Status reg */ in ata_scsiop_inq_89()
2363 tf.lbal = 0x1; in ata_scsiop_inq_89()
2364 tf.nsect = 0x1; in ata_scsiop_inq_89()
2366 ata_tf_to_fis(&tf, 0, 1, &rbuf[36]); /* TODO: PMP? */ in ata_scsiop_inq_89()
2820 ap->ops->sff_tf_read(ap, &qc->tf); in atapi_request_sense()
2825 cmd->sense_buffer[2] = qc->tf.feature >> 4; in atapi_request_sense()
2838 qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in atapi_request_sense()
2839 qc->tf.command = ATA_CMD_PACKET; in atapi_request_sense()
2842 qc->tf.protocol = ATAPI_PROT_DMA; in atapi_request_sense()
2843 qc->tf.feature |= ATAPI_PKT_DMA; in atapi_request_sense()
2845 qc->tf.protocol = ATAPI_PROT_PIO; in atapi_request_sense()
2846 qc->tf.lbam = SCSI_SENSE_BUFFERSIZE; in atapi_request_sense()
2847 qc->tf.lbah = 0; in atapi_request_sense()
2962 qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in atapi_xlat()
2964 qc->tf.flags |= ATA_TFLAG_WRITE; in atapi_xlat()
2968 qc->tf.command = ATA_CMD_PACKET; in atapi_xlat()
3009 qc->tf.lbam = (nbytes & 0xFF); in atapi_xlat()
3010 qc->tf.lbah = (nbytes >> 8); in atapi_xlat()
3013 qc->tf.protocol = ATAPI_PROT_NODATA; in atapi_xlat()
3015 qc->tf.protocol = ATAPI_PROT_PIO; in atapi_xlat()
3018 qc->tf.protocol = ATAPI_PROT_DMA; in atapi_xlat()
3019 qc->tf.feature |= ATAPI_PKT_DMA; in atapi_xlat()
3024 qc->tf.feature |= ATAPI_DMADIR; in atapi_xlat()
3144 struct ata_taskfile *tf = &(qc->tf); in ata_scsi_pass_thru() local
3155 tf->protocol = ata_scsi_map_proto(cdb[1 + cdb_offset]); in ata_scsi_pass_thru()
3156 if (tf->protocol == ATA_PROT_UNKNOWN) { in ata_scsi_pass_thru()
3161 if (ata_is_ncq(tf->protocol) && (cdb[2 + cdb_offset] & 0x3) == 0) in ata_scsi_pass_thru()
3162 tf->protocol = ATA_PROT_NCQ_NODATA; in ata_scsi_pass_thru()
3165 tf->flags |= ATA_TFLAG_LBA; in ata_scsi_pass_thru()
3178 tf->hob_feature = cdb[3]; in ata_scsi_pass_thru()
3179 tf->hob_nsect = cdb[5]; in ata_scsi_pass_thru()
3180 tf->hob_lbal = cdb[7]; in ata_scsi_pass_thru()
3181 tf->hob_lbam = cdb[9]; in ata_scsi_pass_thru()
3182 tf->hob_lbah = cdb[11]; in ata_scsi_pass_thru()
3183 tf->flags |= ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
3185 tf->flags &= ~ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
3190 tf->feature = cdb[4]; in ata_scsi_pass_thru()
3191 tf->nsect = cdb[6]; in ata_scsi_pass_thru()
3192 tf->lbal = cdb[8]; in ata_scsi_pass_thru()
3193 tf->lbam = cdb[10]; in ata_scsi_pass_thru()
3194 tf->lbah = cdb[12]; in ata_scsi_pass_thru()
3195 tf->device = cdb[13]; in ata_scsi_pass_thru()
3196 tf->command = cdb[14]; in ata_scsi_pass_thru()
3201 tf->flags &= ~ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
3203 tf->feature = cdb[3]; in ata_scsi_pass_thru()
3204 tf->nsect = cdb[4]; in ata_scsi_pass_thru()
3205 tf->lbal = cdb[5]; in ata_scsi_pass_thru()
3206 tf->lbam = cdb[6]; in ata_scsi_pass_thru()
3207 tf->lbah = cdb[7]; in ata_scsi_pass_thru()
3208 tf->device = cdb[8]; in ata_scsi_pass_thru()
3209 tf->command = cdb[9]; in ata_scsi_pass_thru()
3217 tf->hob_feature = cdb[20]; in ata_scsi_pass_thru()
3218 tf->hob_nsect = cdb[22]; in ata_scsi_pass_thru()
3219 tf->hob_lbal = cdb[16]; in ata_scsi_pass_thru()
3220 tf->hob_lbam = cdb[15]; in ata_scsi_pass_thru()
3221 tf->hob_lbah = cdb[14]; in ata_scsi_pass_thru()
3222 tf->flags |= ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
3224 tf->flags &= ~ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
3226 tf->feature = cdb[21]; in ata_scsi_pass_thru()
3227 tf->nsect = cdb[23]; in ata_scsi_pass_thru()
3228 tf->lbal = cdb[19]; in ata_scsi_pass_thru()
3229 tf->lbam = cdb[18]; in ata_scsi_pass_thru()
3230 tf->lbah = cdb[17]; in ata_scsi_pass_thru()
3231 tf->device = cdb[24]; in ata_scsi_pass_thru()
3232 tf->command = cdb[25]; in ata_scsi_pass_thru()
3233 tf->auxiliary = get_unaligned_be32(&cdb[28]); in ata_scsi_pass_thru()
3237 if (ata_is_ncq(tf->protocol)) in ata_scsi_pass_thru()
3238 tf->nsect = qc->hw_tag << 3; in ata_scsi_pass_thru()
3241 tf->device = dev->devno ? in ata_scsi_pass_thru()
3242 tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1; in ata_scsi_pass_thru()
3244 switch (tf->command) { in ata_scsi_pass_thru()
3250 if (tf->protocol != ATA_PROT_PIO || tf->nsect != 1) { in ata_scsi_pass_thru()
3301 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in ata_scsi_pass_thru()
3303 tf->flags |= ATA_TFLAG_WRITE; in ata_scsi_pass_thru()
3316 if (tf->protocol == ATA_PROT_DMA && dev->dma_mode == 0) { in ata_scsi_pass_thru()
3322 if (ata_is_ncq(tf->protocol) && !ata_ncq_enabled(dev)) { in ata_scsi_pass_thru()
3328 if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf)) { in ata_scsi_pass_thru()
3333 if (is_multi_taskfile(tf)) { in ata_scsi_pass_thru()
3351 if (tf->command == ATA_CMD_SET_FEATURES && in ata_scsi_pass_thru()
3352 tf->feature == SETFEATURES_XFER) { in ata_scsi_pass_thru()
3372 if (tf->command >= 0x5C && tf->command <= 0x5F && !libata_allow_tpm) { in ata_scsi_pass_thru()
3451 struct ata_taskfile *tf = &qc->tf; in ata_scsi_write_same_xlat() local
3515 tf->protocol = ATA_PROT_NCQ; in ata_scsi_write_same_xlat()
3516 tf->command = ATA_CMD_FPDMA_SEND; in ata_scsi_write_same_xlat()
3517 tf->hob_nsect = ATA_SUBCMD_FPDMA_SEND_DSM & 0x1f; in ata_scsi_write_same_xlat()
3518 tf->nsect = qc->hw_tag << 3; in ata_scsi_write_same_xlat()
3519 tf->hob_feature = (size / 512) >> 8; in ata_scsi_write_same_xlat()
3520 tf->feature = size / 512; in ata_scsi_write_same_xlat()
3522 tf->auxiliary = 1; in ata_scsi_write_same_xlat()
3524 tf->protocol = ATA_PROT_DMA; in ata_scsi_write_same_xlat()
3525 tf->hob_feature = 0; in ata_scsi_write_same_xlat()
3526 tf->feature = ATA_DSM_TRIM; in ata_scsi_write_same_xlat()
3527 tf->hob_nsect = (size / 512) >> 8; in ata_scsi_write_same_xlat()
3528 tf->nsect = size / 512; in ata_scsi_write_same_xlat()
3529 tf->command = ATA_CMD_DSM; in ata_scsi_write_same_xlat()
3532 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48 | in ata_scsi_write_same_xlat()
3696 struct ata_taskfile *tf = &qc->tf; in ata_scsi_zbc_in_xlat() local
3735 tf->protocol = ATA_PROT_NCQ; in ata_scsi_zbc_in_xlat()
3736 tf->command = ATA_CMD_FPDMA_RECV; in ata_scsi_zbc_in_xlat()
3737 tf->hob_nsect = ATA_SUBCMD_FPDMA_RECV_ZAC_MGMT_IN & 0x1f; in ata_scsi_zbc_in_xlat()
3738 tf->nsect = qc->hw_tag << 3; in ata_scsi_zbc_in_xlat()
3739 tf->feature = sect & 0xff; in ata_scsi_zbc_in_xlat()
3740 tf->hob_feature = (sect >> 8) & 0xff; in ata_scsi_zbc_in_xlat()
3741 tf->auxiliary = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES | (options << 8); in ata_scsi_zbc_in_xlat()
3743 tf->command = ATA_CMD_ZAC_MGMT_IN; in ata_scsi_zbc_in_xlat()
3744 tf->feature = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES; in ata_scsi_zbc_in_xlat()
3745 tf->protocol = ATA_PROT_DMA; in ata_scsi_zbc_in_xlat()
3746 tf->hob_feature = options; in ata_scsi_zbc_in_xlat()
3747 tf->hob_nsect = (sect >> 8) & 0xff; in ata_scsi_zbc_in_xlat()
3748 tf->nsect = sect & 0xff; in ata_scsi_zbc_in_xlat()
3750 tf->device = ATA_LBA; in ata_scsi_zbc_in_xlat()
3751 tf->lbah = (block >> 16) & 0xff; in ata_scsi_zbc_in_xlat()
3752 tf->lbam = (block >> 8) & 0xff; in ata_scsi_zbc_in_xlat()
3753 tf->lbal = block & 0xff; in ata_scsi_zbc_in_xlat()
3754 tf->hob_lbah = (block >> 40) & 0xff; in ata_scsi_zbc_in_xlat()
3755 tf->hob_lbam = (block >> 32) & 0xff; in ata_scsi_zbc_in_xlat()
3756 tf->hob_lbal = (block >> 24) & 0xff; in ata_scsi_zbc_in_xlat()
3758 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48; in ata_scsi_zbc_in_xlat()
3779 struct ata_taskfile *tf = &qc->tf; in ata_scsi_zbc_out_xlat() local
3824 tf->protocol = ATA_PROT_NCQ_NODATA; in ata_scsi_zbc_out_xlat()
3825 tf->command = ATA_CMD_NCQ_NON_DATA; in ata_scsi_zbc_out_xlat()
3826 tf->feature = ATA_SUBCMD_NCQ_NON_DATA_ZAC_MGMT_OUT; in ata_scsi_zbc_out_xlat()
3827 tf->nsect = qc->hw_tag << 3; in ata_scsi_zbc_out_xlat()
3828 tf->auxiliary = sa | ((u16)all << 8); in ata_scsi_zbc_out_xlat()
3830 tf->protocol = ATA_PROT_NODATA; in ata_scsi_zbc_out_xlat()
3831 tf->command = ATA_CMD_ZAC_MGMT_OUT; in ata_scsi_zbc_out_xlat()
3832 tf->feature = sa; in ata_scsi_zbc_out_xlat()
3833 tf->hob_feature = all; in ata_scsi_zbc_out_xlat()
3835 tf->lbah = (block >> 16) & 0xff; in ata_scsi_zbc_out_xlat()
3836 tf->lbam = (block >> 8) & 0xff; in ata_scsi_zbc_out_xlat()
3837 tf->lbal = block & 0xff; in ata_scsi_zbc_out_xlat()
3838 tf->hob_lbah = (block >> 40) & 0xff; in ata_scsi_zbc_out_xlat()
3839 tf->hob_lbam = (block >> 32) & 0xff; in ata_scsi_zbc_out_xlat()
3840 tf->hob_lbal = (block >> 24) & 0xff; in ata_scsi_zbc_out_xlat()
3841 tf->device = ATA_LBA; in ata_scsi_zbc_out_xlat()
3842 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48; in ata_scsi_zbc_out_xlat()
3870 struct ata_taskfile *tf = &qc->tf; in ata_mselect_caching() local
3904 tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR; in ata_mselect_caching()
3905 tf->protocol = ATA_PROT_NODATA; in ata_mselect_caching()
3906 tf->nsect = 0; in ata_mselect_caching()
3907 tf->command = ATA_CMD_SET_FEATURES; in ata_mselect_caching()
3908 tf->feature = wce ? SETFEATURES_WC_ON : SETFEATURES_WC_OFF; in ata_mselect_caching()
4139 struct ata_taskfile *tf = &qc->tf; in ata_scsi_security_inout_xlat() local
4169 tf->protocol = dma ? ATA_PROT_DMA : ATA_PROT_PIO; in ata_scsi_security_inout_xlat()
4170 tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR | ATA_TFLAG_LBA; in ata_scsi_security_inout_xlat()
4172 tf->flags |= ATA_TFLAG_WRITE; in ata_scsi_security_inout_xlat()
4173 tf->command = ata_scsi_trusted_op(len, send, dma); in ata_scsi_security_inout_xlat()
4174 tf->feature = secp; in ata_scsi_security_inout_xlat()
4175 tf->lbam = spsp & 0xff; in ata_scsi_security_inout_xlat()
4176 tf->lbah = spsp >> 8; in ata_scsi_security_inout_xlat()
4179 tf->nsect = len & 0xff; in ata_scsi_security_inout_xlat()
4180 tf->lbal = len >> 8; in ata_scsi_security_inout_xlat()
4183 tf->lbah = (1 << 7); in ata_scsi_security_inout_xlat()