Lines Matching refs:tf
221 const struct ata_taskfile *tf) in ata_scsi_set_sense_information() argument
225 information = ata_tf_read_block(tf, dev); in ata_scsi_set_sense_information()
856 struct ata_taskfile *tf = &qc->result_tf; in ata_gen_passthru_sense() local
868 tf->status & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { in ata_gen_passthru_sense()
869 ata_to_sense_error(qc->ap->print_id, tf->status, tf->error, in ata_gen_passthru_sense()
898 desc[3] = tf->error; in ata_gen_passthru_sense()
899 desc[5] = tf->nsect; in ata_gen_passthru_sense()
900 desc[7] = tf->lbal; in ata_gen_passthru_sense()
901 desc[9] = tf->lbam; in ata_gen_passthru_sense()
902 desc[11] = tf->lbah; in ata_gen_passthru_sense()
903 desc[12] = tf->device; in ata_gen_passthru_sense()
904 desc[13] = tf->status; in ata_gen_passthru_sense()
910 if (tf->flags & ATA_TFLAG_LBA48) { in ata_gen_passthru_sense()
912 desc[4] = tf->hob_nsect; in ata_gen_passthru_sense()
913 desc[6] = tf->hob_lbal; in ata_gen_passthru_sense()
914 desc[8] = tf->hob_lbam; in ata_gen_passthru_sense()
915 desc[10] = tf->hob_lbah; in ata_gen_passthru_sense()
919 desc[0] = tf->error; in ata_gen_passthru_sense()
920 desc[1] = tf->status; in ata_gen_passthru_sense()
921 desc[2] = tf->device; in ata_gen_passthru_sense()
922 desc[3] = tf->nsect; in ata_gen_passthru_sense()
924 if (tf->flags & ATA_TFLAG_LBA48) { in ata_gen_passthru_sense()
926 if (tf->hob_nsect) in ata_gen_passthru_sense()
928 if (tf->hob_lbal || tf->hob_lbam || tf->hob_lbah) in ata_gen_passthru_sense()
931 desc[9] = tf->lbal; in ata_gen_passthru_sense()
932 desc[10] = tf->lbam; in ata_gen_passthru_sense()
933 desc[11] = tf->lbah; in ata_gen_passthru_sense()
951 struct ata_taskfile *tf = &qc->result_tf; in ata_gen_ata_sense() local
968 tf->status & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { in ata_gen_ata_sense()
969 ata_to_sense_error(qc->ap->print_id, tf->status, tf->error, in ata_gen_ata_sense()
975 tf->status, qc->err_mask); in ata_gen_ata_sense()
1211 struct ata_taskfile *tf = &qc->tf; in ata_scsi_start_stop_xlat() local
1221 tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR; in ata_scsi_start_stop_xlat()
1222 tf->protocol = ATA_PROT_NODATA; in ata_scsi_start_stop_xlat()
1238 tf->nsect = 1; /* 1 sector, lba=0 */ in ata_scsi_start_stop_xlat()
1241 tf->flags |= ATA_TFLAG_LBA; in ata_scsi_start_stop_xlat()
1243 tf->lbah = 0x0; in ata_scsi_start_stop_xlat()
1244 tf->lbam = 0x0; in ata_scsi_start_stop_xlat()
1245 tf->lbal = 0x0; in ata_scsi_start_stop_xlat()
1246 tf->device |= ATA_LBA; in ata_scsi_start_stop_xlat()
1249 tf->lbal = 0x1; /* sect */ in ata_scsi_start_stop_xlat()
1250 tf->lbam = 0x0; /* cyl low */ in ata_scsi_start_stop_xlat()
1251 tf->lbah = 0x0; /* cyl high */ in ata_scsi_start_stop_xlat()
1254 tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ in ata_scsi_start_stop_xlat()
1268 tf->command = ATA_CMD_STANDBYNOW1; in ata_scsi_start_stop_xlat()
1304 struct ata_taskfile *tf = &qc->tf; in ata_scsi_flush_xlat() local
1306 tf->flags |= ATA_TFLAG_DEVICE; in ata_scsi_flush_xlat()
1307 tf->protocol = ATA_PROT_NODATA; in ata_scsi_flush_xlat()
1310 tf->command = ATA_CMD_FLUSH_EXT; in ata_scsi_flush_xlat()
1312 tf->command = ATA_CMD_FLUSH; in ata_scsi_flush_xlat()
1404 struct ata_taskfile *tf = &qc->tf; in ata_scsi_verify_xlat() local
1412 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in ata_scsi_verify_xlat()
1413 tf->protocol = ATA_PROT_NODATA; in ata_scsi_verify_xlat()
1443 tf->flags |= ATA_TFLAG_LBA; in ata_scsi_verify_xlat()
1447 tf->command = ATA_CMD_VERIFY; in ata_scsi_verify_xlat()
1448 tf->device |= (block >> 24) & 0xf; in ata_scsi_verify_xlat()
1454 tf->flags |= ATA_TFLAG_LBA48; in ata_scsi_verify_xlat()
1455 tf->command = ATA_CMD_VERIFY_EXT; in ata_scsi_verify_xlat()
1457 tf->hob_nsect = (n_block >> 8) & 0xff; in ata_scsi_verify_xlat()
1459 tf->hob_lbah = (block >> 40) & 0xff; in ata_scsi_verify_xlat()
1460 tf->hob_lbam = (block >> 32) & 0xff; in ata_scsi_verify_xlat()
1461 tf->hob_lbal = (block >> 24) & 0xff; in ata_scsi_verify_xlat()
1466 tf->nsect = n_block & 0xff; in ata_scsi_verify_xlat()
1468 tf->lbah = (block >> 16) & 0xff; in ata_scsi_verify_xlat()
1469 tf->lbam = (block >> 8) & 0xff; in ata_scsi_verify_xlat()
1470 tf->lbal = block & 0xff; in ata_scsi_verify_xlat()
1472 tf->device |= ATA_LBA; in ata_scsi_verify_xlat()
1493 tf->command = ATA_CMD_VERIFY; in ata_scsi_verify_xlat()
1494 tf->nsect = n_block & 0xff; /* Sector count 0 means 256 sectors */ in ata_scsi_verify_xlat()
1495 tf->lbal = sect; in ata_scsi_verify_xlat()
1496 tf->lbam = cyl; in ata_scsi_verify_xlat()
1497 tf->lbah = cyl >> 8; in ata_scsi_verify_xlat()
1498 tf->device |= head; in ata_scsi_verify_xlat()
2685 qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in atapi_xlat()
2687 qc->tf.flags |= ATA_TFLAG_WRITE; in atapi_xlat()
2690 qc->tf.command = ATA_CMD_PACKET; in atapi_xlat()
2731 qc->tf.lbam = (nbytes & 0xFF); in atapi_xlat()
2732 qc->tf.lbah = (nbytes >> 8); in atapi_xlat()
2735 qc->tf.protocol = ATAPI_PROT_NODATA; in atapi_xlat()
2737 qc->tf.protocol = ATAPI_PROT_PIO; in atapi_xlat()
2740 qc->tf.protocol = ATAPI_PROT_DMA; in atapi_xlat()
2741 qc->tf.feature |= ATAPI_PKT_DMA; in atapi_xlat()
2746 qc->tf.feature |= ATAPI_DMADIR; in atapi_xlat()
2884 struct ata_taskfile *tf = &(qc->tf); in ata_scsi_pass_thru() local
2895 tf->protocol = ata_scsi_map_proto(cdb[1 + cdb_offset]); in ata_scsi_pass_thru()
2896 if (tf->protocol == ATA_PROT_UNKNOWN) { in ata_scsi_pass_thru()
2911 if (ata_is_ncq(tf->protocol)) in ata_scsi_pass_thru()
2912 tf->protocol = ATA_PROT_NCQ_NODATA; in ata_scsi_pass_thru()
2916 tf->flags |= ATA_TFLAG_LBA; in ata_scsi_pass_thru()
2930 tf->hob_feature = cdb[3]; in ata_scsi_pass_thru()
2931 tf->hob_nsect = cdb[5]; in ata_scsi_pass_thru()
2932 tf->hob_lbal = cdb[7]; in ata_scsi_pass_thru()
2933 tf->hob_lbam = cdb[9]; in ata_scsi_pass_thru()
2934 tf->hob_lbah = cdb[11]; in ata_scsi_pass_thru()
2935 tf->flags |= ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
2937 tf->flags &= ~ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
2942 tf->feature = cdb[4]; in ata_scsi_pass_thru()
2943 tf->nsect = cdb[6]; in ata_scsi_pass_thru()
2944 tf->lbal = cdb[8]; in ata_scsi_pass_thru()
2945 tf->lbam = cdb[10]; in ata_scsi_pass_thru()
2946 tf->lbah = cdb[12]; in ata_scsi_pass_thru()
2947 tf->device = cdb[13]; in ata_scsi_pass_thru()
2948 tf->command = cdb[14]; in ata_scsi_pass_thru()
2954 tf->flags &= ~ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
2956 tf->feature = cdb[3]; in ata_scsi_pass_thru()
2957 tf->nsect = cdb[4]; in ata_scsi_pass_thru()
2958 tf->lbal = cdb[5]; in ata_scsi_pass_thru()
2959 tf->lbam = cdb[6]; in ata_scsi_pass_thru()
2960 tf->lbah = cdb[7]; in ata_scsi_pass_thru()
2961 tf->device = cdb[8]; in ata_scsi_pass_thru()
2962 tf->command = cdb[9]; in ata_scsi_pass_thru()
2971 tf->hob_feature = cdb[20]; in ata_scsi_pass_thru()
2972 tf->hob_nsect = cdb[22]; in ata_scsi_pass_thru()
2973 tf->hob_lbal = cdb[16]; in ata_scsi_pass_thru()
2974 tf->hob_lbam = cdb[15]; in ata_scsi_pass_thru()
2975 tf->hob_lbah = cdb[14]; in ata_scsi_pass_thru()
2976 tf->flags |= ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
2978 tf->flags &= ~ATA_TFLAG_LBA48; in ata_scsi_pass_thru()
2980 tf->feature = cdb[21]; in ata_scsi_pass_thru()
2981 tf->nsect = cdb[23]; in ata_scsi_pass_thru()
2982 tf->lbal = cdb[19]; in ata_scsi_pass_thru()
2983 tf->lbam = cdb[18]; in ata_scsi_pass_thru()
2984 tf->lbah = cdb[17]; in ata_scsi_pass_thru()
2985 tf->device = cdb[24]; in ata_scsi_pass_thru()
2986 tf->command = cdb[25]; in ata_scsi_pass_thru()
2987 tf->auxiliary = get_unaligned_be32(&cdb[28]); in ata_scsi_pass_thru()
2992 if (ata_is_ncq(tf->protocol)) in ata_scsi_pass_thru()
2993 tf->nsect = qc->hw_tag << 3; in ata_scsi_pass_thru()
2996 tf->device = dev->devno ? in ata_scsi_pass_thru()
2997 tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1; in ata_scsi_pass_thru()
2999 switch (tf->command) { in ata_scsi_pass_thru()
3005 if (tf->protocol != ATA_PROT_PIO || tf->nsect != 1) { in ata_scsi_pass_thru()
3056 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; in ata_scsi_pass_thru()
3058 tf->flags |= ATA_TFLAG_WRITE; in ata_scsi_pass_thru()
3071 if (tf->protocol == ATA_PROT_DMA && !ata_dma_enabled(dev)) { in ata_scsi_pass_thru()
3077 if (ata_is_ncq(tf->protocol) && !ata_ncq_enabled(dev)) { in ata_scsi_pass_thru()
3083 if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf)) { in ata_scsi_pass_thru()
3088 if (is_multi_taskfile(tf)) { in ata_scsi_pass_thru()
3106 if (tf->command == ATA_CMD_SET_FEATURES && in ata_scsi_pass_thru()
3107 tf->feature == SETFEATURES_XFER) { in ata_scsi_pass_thru()
3127 if (tf->command >= 0x5C && tf->command <= 0x5F && !libata_allow_tpm) { in ata_scsi_pass_thru()
3206 struct ata_taskfile *tf = &qc->tf; in ata_scsi_write_same_xlat() local
3270 tf->protocol = ATA_PROT_NCQ; in ata_scsi_write_same_xlat()
3271 tf->command = ATA_CMD_FPDMA_SEND; in ata_scsi_write_same_xlat()
3272 tf->hob_nsect = ATA_SUBCMD_FPDMA_SEND_DSM & 0x1f; in ata_scsi_write_same_xlat()
3273 tf->nsect = qc->hw_tag << 3; in ata_scsi_write_same_xlat()
3274 tf->hob_feature = (size / 512) >> 8; in ata_scsi_write_same_xlat()
3275 tf->feature = size / 512; in ata_scsi_write_same_xlat()
3277 tf->auxiliary = 1; in ata_scsi_write_same_xlat()
3279 tf->protocol = ATA_PROT_DMA; in ata_scsi_write_same_xlat()
3280 tf->hob_feature = 0; in ata_scsi_write_same_xlat()
3281 tf->feature = ATA_DSM_TRIM; in ata_scsi_write_same_xlat()
3282 tf->hob_nsect = (size / 512) >> 8; in ata_scsi_write_same_xlat()
3283 tf->nsect = size / 512; in ata_scsi_write_same_xlat()
3284 tf->command = ATA_CMD_DSM; in ata_scsi_write_same_xlat()
3287 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48 | in ata_scsi_write_same_xlat()
3475 struct ata_taskfile *tf = &qc->tf; in ata_scsi_zbc_in_xlat() local
3514 tf->protocol = ATA_PROT_NCQ; in ata_scsi_zbc_in_xlat()
3515 tf->command = ATA_CMD_FPDMA_RECV; in ata_scsi_zbc_in_xlat()
3516 tf->hob_nsect = ATA_SUBCMD_FPDMA_RECV_ZAC_MGMT_IN & 0x1f; in ata_scsi_zbc_in_xlat()
3517 tf->nsect = qc->hw_tag << 3; in ata_scsi_zbc_in_xlat()
3518 tf->feature = sect & 0xff; in ata_scsi_zbc_in_xlat()
3519 tf->hob_feature = (sect >> 8) & 0xff; in ata_scsi_zbc_in_xlat()
3520 tf->auxiliary = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES | (options << 8); in ata_scsi_zbc_in_xlat()
3522 tf->command = ATA_CMD_ZAC_MGMT_IN; in ata_scsi_zbc_in_xlat()
3523 tf->feature = ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES; in ata_scsi_zbc_in_xlat()
3524 tf->protocol = ATA_PROT_DMA; in ata_scsi_zbc_in_xlat()
3525 tf->hob_feature = options; in ata_scsi_zbc_in_xlat()
3526 tf->hob_nsect = (sect >> 8) & 0xff; in ata_scsi_zbc_in_xlat()
3527 tf->nsect = sect & 0xff; in ata_scsi_zbc_in_xlat()
3529 tf->device = ATA_LBA; in ata_scsi_zbc_in_xlat()
3530 tf->lbah = (block >> 16) & 0xff; in ata_scsi_zbc_in_xlat()
3531 tf->lbam = (block >> 8) & 0xff; in ata_scsi_zbc_in_xlat()
3532 tf->lbal = block & 0xff; in ata_scsi_zbc_in_xlat()
3533 tf->hob_lbah = (block >> 40) & 0xff; in ata_scsi_zbc_in_xlat()
3534 tf->hob_lbam = (block >> 32) & 0xff; in ata_scsi_zbc_in_xlat()
3535 tf->hob_lbal = (block >> 24) & 0xff; in ata_scsi_zbc_in_xlat()
3537 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48; in ata_scsi_zbc_in_xlat()
3558 struct ata_taskfile *tf = &qc->tf; in ata_scsi_zbc_out_xlat() local
3603 tf->protocol = ATA_PROT_NCQ_NODATA; in ata_scsi_zbc_out_xlat()
3604 tf->command = ATA_CMD_NCQ_NON_DATA; in ata_scsi_zbc_out_xlat()
3605 tf->feature = ATA_SUBCMD_NCQ_NON_DATA_ZAC_MGMT_OUT; in ata_scsi_zbc_out_xlat()
3606 tf->nsect = qc->hw_tag << 3; in ata_scsi_zbc_out_xlat()
3607 tf->auxiliary = sa | ((u16)all << 8); in ata_scsi_zbc_out_xlat()
3609 tf->protocol = ATA_PROT_NODATA; in ata_scsi_zbc_out_xlat()
3610 tf->command = ATA_CMD_ZAC_MGMT_OUT; in ata_scsi_zbc_out_xlat()
3611 tf->feature = sa; in ata_scsi_zbc_out_xlat()
3612 tf->hob_feature = all; in ata_scsi_zbc_out_xlat()
3614 tf->lbah = (block >> 16) & 0xff; in ata_scsi_zbc_out_xlat()
3615 tf->lbam = (block >> 8) & 0xff; in ata_scsi_zbc_out_xlat()
3616 tf->lbal = block & 0xff; in ata_scsi_zbc_out_xlat()
3617 tf->hob_lbah = (block >> 40) & 0xff; in ata_scsi_zbc_out_xlat()
3618 tf->hob_lbam = (block >> 32) & 0xff; in ata_scsi_zbc_out_xlat()
3619 tf->hob_lbal = (block >> 24) & 0xff; in ata_scsi_zbc_out_xlat()
3620 tf->device = ATA_LBA; in ata_scsi_zbc_out_xlat()
3621 tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48; in ata_scsi_zbc_out_xlat()
3649 struct ata_taskfile *tf = &qc->tf; in ata_mselect_caching() local
3680 tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR; in ata_mselect_caching()
3681 tf->protocol = ATA_PROT_NODATA; in ata_mselect_caching()
3682 tf->nsect = 0; in ata_mselect_caching()
3683 tf->command = ATA_CMD_SET_FEATURES; in ata_mselect_caching()
3684 tf->feature = wce ? SETFEATURES_WC_ON : SETFEATURES_WC_OFF; in ata_mselect_caching()
3739 struct ata_taskfile *tf = &qc->tf; in ata_mselect_control_ata_feature() local
3773 tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR; in ata_mselect_control_ata_feature()
3774 tf->protocol = ATA_PROT_NODATA; in ata_mselect_control_ata_feature()
3775 tf->command = ATA_CMD_SET_FEATURES; in ata_mselect_control_ata_feature()
3776 tf->feature = SETFEATURES_CDL; in ata_mselect_control_ata_feature()
3777 tf->nsect = cdl_action; in ata_mselect_control_ata_feature()
4000 struct ata_taskfile *tf = &qc->tf; in ata_scsi_security_inout_xlat() local
4030 tf->protocol = dma ? ATA_PROT_DMA : ATA_PROT_PIO; in ata_scsi_security_inout_xlat()
4031 tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR | ATA_TFLAG_LBA; in ata_scsi_security_inout_xlat()
4033 tf->flags |= ATA_TFLAG_WRITE; in ata_scsi_security_inout_xlat()
4034 tf->command = ata_scsi_trusted_op(len, send, dma); in ata_scsi_security_inout_xlat()
4035 tf->feature = secp; in ata_scsi_security_inout_xlat()
4036 tf->lbam = spsp & 0xff; in ata_scsi_security_inout_xlat()
4037 tf->lbah = spsp >> 8; in ata_scsi_security_inout_xlat()
4040 tf->nsect = len & 0xff; in ata_scsi_security_inout_xlat()
4041 tf->lbal = len >> 8; in ata_scsi_security_inout_xlat()
4044 tf->lbah = (1 << 7); in ata_scsi_security_inout_xlat()