Merge tag 'omap-for-v5.4/fixes-rc1-signed' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / drivers / scsi / sd.c
index 4b925552458f54fd3083d05cc9a31f5c48caf59b..50928bc266eb24d5995affc32f7de12ec1ca49b2 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
@@ -1981,6 +1978,7 @@ static int sd_done(struct scsi_cmnd *SCpnt)
                        sd_printk(KERN_INFO, sdkp,
                                "Unaligned partial completion (resid=%u, sector_sz=%u)\n",
                                resid, sector_size);
+                       scsi_print_command(SCpnt);
                        resid = min(scsi_bufflen(SCpnt),
                                    round_up(resid, sector_size));
                        scsi_set_resid(SCpnt, resid);
@@ -2054,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;
 }