>>>>> "Shivasharan" == Shivasharan S <[email protected]> 
>>>>> writes:

Shivasharan> Fixing issue of not setting residual bytes correctly.

@@ -1464,6 +1465,15 @@ map_cmd_status(struct fusion_context *fusion,
                               SCSI_SENSE_BUFFERSIZE);
                        scmd->result |= DRIVER_SENSE << 24;
                }
+
+               /*
+                * If the  IO request is partially completed, then MR FW will
+                * update "io_request->DataLength" field with actual number of
+                * bytes transferred.Driver will set residual bytes count in
+                * SCSI command structure.
+                */
+               resid = (scsi_bufflen(scmd) - data_length);
+               scsi_set_resid(scmd, resid);

Is data_length guaranteed to be a multiple of the logical block size?
Otherwise you need to tweak the residual like we just did for mpt3sas.

-- 
Martin K. Petersen      Oracle Linux Engineering

Reply via email to