Merge tag 'for-5.4/post-2019-09-24' of git://git.kernel.dk/linux-block
[platform/kernel/linux-rpi.git] / drivers / scsi / sd.c
index 7623196..50928bc 100644 (file)
@@ -1211,9 +1211,6 @@ static blk_status_t sd_setup_read_write_cmnd(struct scsi_cmnd *cmd)
        dix = scsi_prot_sg_count(cmd);
        dif = scsi_host_dif_capable(cmd->device->host, sdkp->protection_type);
 
-       if (write && dix)
-               t10_pi_prepare(cmd->request, sdkp->protection_type);
-
        if (dif || dix)
                protect = sd_setup_protect_cmnd(cmd, dix, dif);
        else
@@ -2055,11 +2052,6 @@ static int sd_done(struct scsi_cmnd *SCpnt)
                                           "sd_done: completed %d of %d bytes\n",
                                           good_bytes, scsi_bufflen(SCpnt)));
 
-       if (rq_data_dir(SCpnt->request) == READ && scsi_prot_sg_count(SCpnt) &&
-           good_bytes)
-               t10_pi_complete(SCpnt->request, sdkp->protection_type,
-                               good_bytes / scsi_prot_interval(SCpnt));
-
        return good_bytes;
 }