Commit 89e637c
scsi: RDMA/srp: Fix residual handling
Although the code for residual handling in the SRP initiator follows the
SCSI documentation, that documentation has never been correct. Because
scsi_finish_command() starts from the data buffer length and subtracts the
residual, scsi_set_resid() must not be called if a residual overflow
occurs. Hence remove the scsi_set_resid() calls from the SRP initiator if a
residual overflow occurrs.
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Fixes: 9237f04 ("scsi: core: Fix scsi_get/set_resid() interface")
Fixes: e714531 ("IB/srp: Fix residual handling")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230724200843.3376570-3-bvanassche@acm.org
Acked-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 2903265 commit 89e637c
1 file changed
+0
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1979 | 1979 | | |
1980 | 1980 | | |
1981 | 1981 | | |
1982 | | - | |
1983 | | - | |
1984 | 1982 | | |
1985 | 1983 | | |
1986 | | - | |
1987 | | - | |
1988 | 1984 | | |
1989 | 1985 | | |
1990 | 1986 | | |
| |||
0 commit comments