Re: [PATCH V2] scsi: save/restore command resid for error handling

2019-09-30 Thread Damien Le Moal
On 2019/09/30 17:42, Finn Thain wrote: > On Sat, 28 Sep 2019, Damien Le Moal wrote: > >> When a non-passthrough command is terminated with CHECK CONDITION, >> request sense is executed by hijacking the command descriptor. Since >> scsi_eh_prep_cmnd() and scsi_eh_restore_cmnd() do not save/restore

Re: [PATCH V2] scsi: save/restore command resid for error handling

2019-09-30 Thread Finn Thain
On Sat, 28 Sep 2019, Damien Le Moal wrote: > When a non-passthrough command is terminated with CHECK CONDITION, > request sense is executed by hijacking the command descriptor. Since > scsi_eh_prep_cmnd() and scsi_eh_restore_cmnd() do not save/restore the > original command resid, the value return

[PATCH V2] scsi: save/restore command resid for error handling

2019-09-27 Thread Damien Le Moal
When a non-passthrough command is terminated with CHECK CONDITION, request sense is executed by hijacking the command descriptor. Since scsi_eh_prep_cmnd() and scsi_eh_restore_cmnd() do not save/restore the original command resid, the value returned on failure of the original command is lost and re