scsi: lpfc: Treat SCSI Write operation Underruns as an error
authorJames Smart <jsmart2021@gmail.com>
Tue, 30 Jan 2018 23:59:00 +0000 (15:59 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 12 Feb 2018 16:43:24 +0000 (11:43 -0500)
commit45634a86ca6e98dbcaddb763f8e90ad243057789
treeb8346166b7ec05ec3a86501d075a5ac7f7330952
parent8d731d1aa993c44fcf4de0dbd42059e00cf37102
scsi: lpfc: Treat SCSI Write operation Underruns as an error

Currently, write underruns (mismatch of amount transferred vs scsi
status and its residual) detected by the adapter are not being flagged
as an error. Its expected the target controls the data transfer and
would appropriately set the RSP values.  Only read underruns are treated
as errors.

Revise the SCSI error handling to treat write underruns as an error as
well.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_scsi.c