Lines Matching refs:dif
398 unsigned int dif, dix;
400 dif = scsi_host_dif_capable(sdp->host, sdkp->protection_type);
404 dif = 0;
408 if (!dif && !dix)
411 return sprintf(buf, "%s%u\n", dix ? "dix" : "dif", dif);
726 * write and whether dix and dif are enabled.
728 static unsigned int sd_prot_op(bool write, bool dix, bool dif)
730 /* Lookup table: bit 2 (write), bit 1 (dix), bit 0 (dif) */
731 static const unsigned int ops[] = { /* wrt dix dif */
742 return ops[write << 2 | dix << 1 | dif];
787 unsigned int dix, unsigned int dif)
791 unsigned int prot_op = sd_prot_op(rq_data_dir(rq), dix, dif);
802 if (dif != T10_PI_TYPE3_PROTECTION) { /* DIX/DIF Type 0, 1, 2 */
809 if (dif) { /* DIX/DIF Type 1, 2, 3 */
819 scsi_set_prot_type(scmd, dif);
1224 unsigned int dif;
1265 dif = scsi_host_dif_capable(cmd->device->host, sdkp->protection_type);
1268 if (dif || dix)
1269 protect = sd_setup_protect_cmnd(cmd, dix, dif);