Lines Matching refs:dif
341 unsigned int dif, dix; in protection_mode_show() local
343 dif = scsi_host_dif_capable(sdp->host, sdkp->protection_type); in protection_mode_show()
347 dif = 0; in protection_mode_show()
351 if (!dif && !dix) in protection_mode_show()
354 return sprintf(buf, "%s%u\n", dix ? "dix" : "dif", dif); in protection_mode_show()
720 static unsigned int sd_prot_op(bool write, bool dix, bool dif) in sd_prot_op() argument
734 return ops[write << 2 | dix << 1 | dif]; in sd_prot_op()
779 unsigned int dix, unsigned int dif) in sd_setup_protect_cmnd() argument
783 unsigned int prot_op = sd_prot_op(rq_data_dir(rq), dix, dif); in sd_setup_protect_cmnd()
794 if (dif != T10_PI_TYPE3_PROTECTION) { /* DIX/DIF Type 0, 1, 2 */ in sd_setup_protect_cmnd()
801 if (dif) { /* DIX/DIF Type 1, 2, 3 */ in sd_setup_protect_cmnd()
811 scsi_set_prot_type(scmd, dif); in sd_setup_protect_cmnd()
1226 unsigned int dif; in sd_setup_read_write_cmnd() local
1273 dif = scsi_host_dif_capable(cmd->device->host, sdkp->protection_type); in sd_setup_read_write_cmnd()
1275 if (dif || dix) in sd_setup_read_write_cmnd()
1276 protect = sd_setup_protect_cmnd(cmd, dix, dif); in sd_setup_read_write_cmnd()