Skip to content

scsi: target: Set correct residual data

Anastasia Kovaleva linux-scsi target-devel 2 versions – Applied

Status from this message: Applied to 5.12/scsi-staging, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/23 patches 3 repliesApplied
  2. v1 posting 1/23 patches 11 repliesSuperseded

Patches in v1 posting 2/2 Applied

#Subject and filesSizeRepliesApplied
1/3scsi: target: core: Set residuals for 4Kn devicesdrivers/target/target_core_transport.c+0 -110 replies
2/3scsi: target: core: Signal WRITE residualsdrivers/target/target_core_transport.c+20 -140 replies
3/3scsi: target: core: Change ASCQ for residual writedrivers/target/target_core_transport.c include/target/target_core_base.h+8 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchBart Van Assche
1/3Based-on-patch-by
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RESEND PATCH 0/3] scsi: target: Set correct residual data

Hi Martin,
Please apply the changes to 5.11/scsi-queue at your earliest convenience.

The series changes the behavior of the target in regard to processing commands with overflow/underflow in accordance with the standarts.

The target driver used to process the DMA_TO_DEVICE commands with residuals (in particular, WRITE command) incorrectly. The target response contained neither a residual count, nor an OVERFLOW/UNDERFLOW bit. Such behavior did not comply with the RFC 7143. Also the returned ASC and ASCQ were incorrect according to FCP-4, and residuals were not set for the 4Kn devices.

This patches fix the major inconsistances in processing these kind of commands.

This patch series has been tested with a modified libiscsi testing library.
The link to the pull request:
https://github.com/sahlberg/libiscsi/pull/345

Write10Residuals, Write12Residuals, Write16Residuals tests have passed.

Thanks,
Anastasia

Anastasia Kovaleva (2):
scsi: target: core: Signal WRITE residuals
scsi: target: core: Change ASCQ for residual write

Roman Bolshakov (1):
scsi: target: core: Set residuals for 4Kn devices

 drivers/target/target_core_transport.c | 53 +++++++++++++-------------
 include/target/target_core_base.h      |  1 +
 2 files changed, 28 insertions(+), 26 deletions(-)
Signature · 1 line
2.24.3 (Apple Git-128)