Lines Matching refs:tf
793 static void ata_dump_status(unsigned id, struct ata_taskfile *tf) in ata_dump_status() argument
795 u8 stat = tf->command, err = tf->feature; in ata_dump_status()
979 struct ata_taskfile *tf = &qc->result_tf; in ata_gen_passthru_sense() local
993 tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { in ata_gen_passthru_sense()
994 ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature, in ata_gen_passthru_sense()
1018 desc[3] = tf->feature; /* == error reg */ in ata_gen_passthru_sense()
1019 desc[5] = tf->nsect; in ata_gen_passthru_sense()
1020 desc[7] = tf->lbal; in ata_gen_passthru_sense()
1021 desc[9] = tf->lbam; in ata_gen_passthru_sense()
1022 desc[11] = tf->lbah; in ata_gen_passthru_sense()
1023 desc[12] = tf->device; in ata_gen_passthru_sense()
1024 desc[13] = tf->command; /* == status reg */ in ata_gen_passthru_sense()
1030 if (tf->flags & ATA_TFLAG_LBA48) { in ata_gen_passthru_sense()
1032 desc[4] = tf->hob_nsect; in ata_gen_passthru_sense()
1033 desc[6] = tf->hob_lbal; in ata_gen_passthru_sense()
1034 desc[8] = tf->hob_lbam; in ata_gen_passthru_sense()
1035 desc[10] = tf->hob_lbah; in ata_gen_passthru_sense()
1053 struct ata_taskfile *tf = &qc->result_tf; in ata_gen_ata_sense() local
1070 tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { in ata_gen_ata_sense()
1071 ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature, in ata_gen_ata_sense()
1344 struct ata_taskfile *tf = &qc->tf; in ata_scsi_start_stop_xlat() local
1350 tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR; in ata_scsi_start_stop_xlat()
1351 tf->protocol = ATA_PROT_NODATA; in ata_scsi_start_stop_xlat()
1361 tf->nsect = 1; /* 1 sector, lba=0 */ in ata_scsi_start_stop_xlat()
1364 tf->flags |= ATA_TFLAG_LBA; in ata_scsi_start_stop_xlat()
1366 tf->lbah = 0x0; in ata_scsi_start_stop_xlat()
1367 tf->lbam = 0x0; in ata_scsi_start_stop_xlat()
1368 tf->lbal = 0x0; in ata_scsi_start_stop_xlat()
1369 tf->device |= ATA_LBA; in ata_scsi_start_stop_xlat()
1372 tf->lbal = 0x1; /* sect */ in ata_scsi_start_stop_xlat()
1373 tf->lbam = 0x0; /* cyl low */ in ata_scsi_start_stop_xlat()
1374 tf->lbah = 0x0; /* cyl high */ in ata_scsi_start_stop_xlat()
1377 tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ in ata_scsi_start_stop_xlat()
1391 tf->command = ATA_CMD_STANDBYNOW1; in ata_scsi_start_stop_xlat()
1428 struct ata_taskfile *tf = &qc->tf; in ata_scsi_flush_xlat() local
1430 tf->flags |= ATA_TFLAG_DEVICE; in ata_scsi_flush_xlat()
1431 tf->protocol = ATA_PROT_NODATA; in ata_scsi_flush_xlat()
1434 tf->command = ATA_CMD_FLUSH_EXT; in ata_scsi_flush_xlat()
1436 tf->command = ATA_CMD_FLUSH; in ata_scsi_flush_xlat()
1550 struct ata_taskfile *tf = &qc->tf; in ata_scsi_verify_xlat() local
1557 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in ata_scsi_verify_xlat()
1558 tf->protocol = ATA_PROT_NODATA; in ata_scsi_verify_xlat()
1579 tf->flags |= ATA_TFLAG_LBA; in ata_scsi_verify_xlat()
1583 tf->command = ATA_CMD_VERIFY; in ata_scsi_verify_xlat()
1584 tf->device |= (block >> 24) & 0xf; in ata_scsi_verify_xlat()
1590 tf->flags |= ATA_TFLAG_LBA48; in ata_scsi_verify_xlat()
1591 tf->command = ATA_CMD_VERIFY_EXT; in ata_scsi_verify_xlat()
1593 tf->hob_nsect = (n_block >> 8) & 0xff; in ata_scsi_verify_xlat()
1595 tf->hob_lbah = (block >> 40) & 0xff; in ata_scsi_verify_xlat()
1596 tf->hob_lbam = (block >> 32) & 0xff; in ata_scsi_verify_xlat()
1597 tf->hob_lbal = (block >> 24) & 0xff; in ata_scsi_verify_xlat()
1602 tf->nsect = n_block & 0xff; in ata_scsi_verify_xlat()
1604 tf->lbah = (block >> 16) & 0xff; in ata_scsi_verify_xlat()
1605 tf->lbam = (block >> 8) & 0xff; in ata_scsi_verify_xlat()
1606 tf->lbal = block & 0xff; in ata_scsi_verify_xlat()
1608 tf->device |= ATA_LBA; in ata_scsi_verify_xlat()
1632 tf->command = ATA_CMD_VERIFY; in ata_scsi_verify_xlat()
1633 tf->nsect = n_block & 0xff; /* Sector count 0 means 256 sectors */ in ata_scsi_verify_xlat()
1634 tf->lbal = sect; in ata_scsi_verify_xlat()
1635 tf->lbam = cyl; in ata_scsi_verify_xlat()
1636 tf->lbah = cyl >> 8; in ata_scsi_verify_xlat()
1637 tf->device |= head; in ata_scsi_verify_xlat()
1736 rc = ata_build_rw_tf(&qc->tf, qc->dev, block, n_block, tf_flags, in ata_scsi_rw_xlat()
2169 struct ata_taskfile tf; in ata_scsiop_inq_89() local
2171 memset(&tf, 0, sizeof(tf)); in ata_scsiop_inq_89()
2183 tf.command = ATA_DRDY; /* really, this is Status reg */ in ata_scsiop_inq_89()
2184 tf.lbal = 0x1; in ata_scsiop_inq_89()
2185 tf.nsect = 0x1; in ata_scsiop_inq_89()
2187 ata_tf_to_fis(&tf, 0, 1, &rbuf[36]); /* TODO: PMP? */ in ata_scsiop_inq_89()
2617 ap->ops->sff_tf_read(ap, &qc->tf); in atapi_request_sense()
2622 cmd->sense_buffer[2] = qc->tf.feature >> 4; in atapi_request_sense()
2635 qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in atapi_request_sense()
2636 qc->tf.command = ATA_CMD_PACKET; in atapi_request_sense()
2639 qc->tf.protocol = ATAPI_PROT_DMA; in atapi_request_sense()
2640 qc->tf.feature |= ATAPI_PKT_DMA; in atapi_request_sense()
2642 qc->tf.protocol = ATAPI_PROT_PIO; in atapi_request_sense()
2643 qc->tf.lbam = SCSI_SENSE_BUFFERSIZE; in atapi_request_sense()
2644 qc->tf.lbah = 0; in atapi_request_sense()
2763 qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in atapi_xlat()
2765 qc->tf.flags |= ATA_TFLAG_WRITE; in atapi_xlat()
2769 qc->tf.command = ATA_CMD_PACKET; in atapi_xlat()
2810 qc->tf.lbam = (nbytes & 0xFF); in atapi_xlat()
2811 qc->tf.lbah = (nbytes >> 8); in atapi_xlat()
2814 qc->tf.protocol = ATAPI_PROT_NODATA; in atapi_xlat()
2816 qc->tf.protocol = ATAPI_PROT_PIO; in atapi_xlat()
2819 qc->tf.protocol = ATAPI_PROT_DMA; in atapi_xlat()
2820 qc->tf.feature |= ATAPI_PKT_DMA; in atapi_xlat()
2825 qc->tf.feature |= ATAPI_DMADIR; in atapi_xlat()
2941 struct ata_taskfile *tf = &(qc->tf); in ata_scsi_pass_thru() local
2946 if ((tf->protocol = ata_scsi_map_proto(cdb[1])) == ATA_PROT_UNKNOWN) in ata_scsi_pass_thru()
2960 tf->hob_feature = cdb[3]; in ata_scsi_pass_thru()
2961 tf->hob_nsect = cdb[5]; in ata_scsi_pass_thru()
2962 tf->hob_lbal = cdb[7]; in ata_scsi_pass_thru()
2963 tf->hob_lbam = cdb[9]; in ata_scsi_pass_thru()
2964 tf->hob_lbah = cdb[11]; in ata_scsi_pass_thru()
2965 tf->flags |= ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
2967 tf->flags &= ~ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
2972 tf->feature = cdb[4]; in ata_scsi_pass_thru()
2973 tf->nsect = cdb[6]; in ata_scsi_pass_thru()
2974 tf->lbal = cdb[8]; in ata_scsi_pass_thru()
2975 tf->lbam = cdb[10]; in ata_scsi_pass_thru()
2976 tf->lbah = cdb[12]; in ata_scsi_pass_thru()
2977 tf->device = cdb[13]; in ata_scsi_pass_thru()
2978 tf->command = cdb[14]; in ata_scsi_pass_thru()
2983 tf->flags &= ~ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
2985 tf->feature = cdb[3]; in ata_scsi_pass_thru()
2986 tf->nsect = cdb[4]; in ata_scsi_pass_thru()
2987 tf->lbal = cdb[5]; in ata_scsi_pass_thru()
2988 tf->lbam = cdb[6]; in ata_scsi_pass_thru()
2989 tf->lbah = cdb[7]; in ata_scsi_pass_thru()
2990 tf->device = cdb[8]; in ata_scsi_pass_thru()
2991 tf->command = cdb[9]; in ata_scsi_pass_thru()
2995 tf->device = dev->devno ? in ata_scsi_pass_thru()
2996 tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1; in ata_scsi_pass_thru()
2998 switch (tf->command) { in ata_scsi_pass_thru()
3004 if (tf->protocol != ATA_PROT_PIO || tf->nsect != 1) in ata_scsi_pass_thru()
3053 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in ata_scsi_pass_thru()
3055 tf->flags |= ATA_TFLAG_WRITE; in ata_scsi_pass_thru()
3068 if (tf->protocol == ATA_PROT_DMA && dev->dma_mode == 0) in ata_scsi_pass_thru()
3072 if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf)) in ata_scsi_pass_thru()
3075 if (is_multi_taskfile(tf)) { in ata_scsi_pass_thru()
3093 if (tf->command == ATA_CMD_SET_FEATURES && in ata_scsi_pass_thru()
3094 tf->feature == SETFEATURES_XFER) in ata_scsi_pass_thru()
3112 if (tf->command >= 0x5C && tf->command <= 0x5F && !libata_allow_tpm) in ata_scsi_pass_thru()
3125 struct ata_taskfile *tf = &qc->tf; in ata_scsi_write_same_xlat() local
3158 tf->protocol = ATA_PROT_NCQ; in ata_scsi_write_same_xlat()
3159 tf->command = ATA_CMD_FPDMA_SEND; in ata_scsi_write_same_xlat()
3160 tf->hob_nsect = ATA_SUBCMD_FPDMA_SEND_DSM & 0x1f; in ata_scsi_write_same_xlat()
3161 tf->nsect = qc->tag << 3; in ata_scsi_write_same_xlat()
3162 tf->hob_feature = (size / 512) >> 8; in ata_scsi_write_same_xlat()
3163 tf->feature = size / 512; in ata_scsi_write_same_xlat()
3165 tf->auxiliary = 1; in ata_scsi_write_same_xlat()
3167 tf->protocol = ATA_PROT_DMA; in ata_scsi_write_same_xlat()
3168 tf->hob_feature = 0; in ata_scsi_write_same_xlat()
3169 tf->feature = ATA_DSM_TRIM; in ata_scsi_write_same_xlat()
3170 tf->hob_nsect = (size / 512) >> 8; in ata_scsi_write_same_xlat()
3171 tf->nsect = size / 512; in ata_scsi_write_same_xlat()
3172 tf->command = ATA_CMD_DSM; in ata_scsi_write_same_xlat()
3175 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48 | in ata_scsi_write_same_xlat()
3202 struct ata_taskfile *tf = &qc->tf; in ata_mselect_caching() local
3226 tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR; in ata_mselect_caching()
3227 tf->protocol = ATA_PROT_NODATA; in ata_mselect_caching()
3228 tf->nsect = 0; in ata_mselect_caching()
3229 tf->command = ATA_CMD_SET_FEATURES; in ata_mselect_caching()
3230 tf->feature = wce ? SETFEATURES_WC_ON : SETFEATURES_WC_OFF; in ata_mselect_caching()