Skip to content

scsi command timeout fixes

Hannes Reinecke linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2scsi_error: set DID_TIME_OUT correctlydrivers/scsi/scsi_error.c+5 -52 replies
2/2scsi: Do not complete timed-out commanddrivers/scsi/scsi.c drivers/scsi/scsi_error.c drivers/scsi/scsi_priv.h+7 -24 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchEwan D. Milne
1/2
2/2R-b

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

Read the v1 thread

Cover letter [PATCH 0/2] scsi command timeout fixes

Hi all,

I've received reports claiming they're seeing a double command completion occasionally when a command timeout happens.

Delving into it I found this this indeed might happening; reason being that the LLDD will only be informed about a timed-out command by calling scsi_try_to_abort_command(). Anytime before that the LLDD is free to assume the command is valid and might call scsi_done() on it. Which then will lead to interesting issues in the error handler.

And while debugging this I've found we're setting DID_TIME_OUT incorrectly, which might lead to spurious command timeout detection.

Hannes Reinecke (2):
scsi_error: set DID_TIME_OUT correctly
scsi: Do not complete timed-out command

 drivers/scsi/scsi.c       |  2 ++
 drivers/scsi/scsi_error.c | 16 +++++++++-------
 drivers/scsi/scsi_priv.h  |  1 +
 3 files changed, 12 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.12.4