1
linux/drivers/scsi/qla2xxx
Roland Dreier b5aff3d274 tcm_qla2xxx: Fix residual for underrun commands that fail
Suppose an initiator sends a DATA IN command with an allocation length
shorter than the FC transfer length -- we get a target message like

    TARGET_CORE[qla2xxx]: Expected Transfer Length: 256 does not match SCSI CDB Length: 0 for SAM Opcode: 0x12

In that case, the target core adjusts the data_length and sets
se_cmd->residual_count for the underrun.  But now suppose that command
fails and we end up in tcm_qla2xxx_queue_status() -- that function
unconditionally overwrites residual_count with the already adjusted
data_length, and the initiator will burp with a message like

    qla2xxx [0000:00:06.0]-301d:0: Dropped frame(s) detected (0x100 of 0x100 bytes).

Fix this by adding on to the existing underflow residual count instead.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
Cc: Chad Dupuis <chad.dupuis@qlogic.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2013-06-14 01:12:56 -07:00
..
Kconfig [SCSI] qla2xxx: Update firmware link in Kconfig file. 2013-05-10 07:47:53 -07:00
Makefile [SCSI] qla2xxx: Enhancements to support ISPFx00. 2013-04-11 15:42:04 -07:00
qla_attr.c [SCSI] qla2xxx: Enhancements to support ISPFx00. 2013-04-11 15:42:04 -07:00
qla_bsg.c [SCSI] qla2xxx: Obtain loopback iteration count from bsg request. 2013-04-11 15:48:42 -07:00
qla_bsg.h [SCSI] qla2xxx: Enhancements to support ISPFx00. 2013-04-11 15:42:04 -07:00
qla_dbg.c [SCSI] qla2xxx: Enhancements to support ISPFx00. 2013-04-11 15:42:04 -07:00
qla_dbg.h [SCSI] qla2xxx: Update the copyright information. 2013-02-22 12:49:22 +00:00
qla_def.h [SCSI] qla2xxx: Obtain loopback iteration count from bsg request. 2013-04-11 15:48:42 -07:00
qla_devtbl.h
qla_dfs.c [SCSI] qla2xxx: Update the copyright information. 2013-02-22 12:49:22 +00:00
qla_fw.h [SCSI] qla2xxx: Update the copyright information. 2013-02-22 12:49:22 +00:00
qla_gbl.h [SCSI] qla2xxx: Enhancements to support ISPFx00. 2013-04-11 15:42:04 -07:00
qla_gs.c [SCSI] qla2xxx: Enhancements to support ISPFx00. 2013-04-11 15:42:04 -07:00
qla_init.c [SCSI] qla2xxx: Enhancements to support ISPFx00. 2013-04-11 15:42:04 -07:00
qla_inline.h [SCSI] qla2xxx: Enhancements to support ISPFx00. 2013-04-11 15:42:04 -07:00
qla_iocb.c [SCSI] qla2xxx: Enhancements to support ISPFx00. 2013-04-11 15:42:04 -07:00
qla_isr.c [SCSI] qla2xxx: Remove duplicated include form qla_isr.c 2013-04-11 15:44:52 -07:00
qla_mbx.c [SCSI] qla2xxx: Obtain loopback iteration count from bsg request. 2013-04-11 15:48:42 -07:00
qla_mid.c [SCSI] qla2xxx: Update the copyright information. 2013-02-22 12:49:22 +00:00
qla_mr.c [SCSI] qla2xxx: fix sparse warning "large integer implicitly truncated to unsigned type" 2013-05-02 15:53:58 -07:00
qla_mr.h [SCSI] qla2xxx: Enhancements to support ISPFx00. 2013-04-11 15:42:04 -07:00
qla_nx.c [SCSI] qla2xxx: Update the copyright information. 2013-02-22 12:49:22 +00:00
qla_nx.h [SCSI] qla2xxx: Update the copyright information. 2013-02-22 12:49:22 +00:00
qla_os.c Merge branch 'misc' into for-linus 2013-05-10 07:53:40 -07:00
qla_settings.h [SCSI] qla2xxx: Update the copyright information. 2013-02-22 12:49:22 +00:00
qla_sup.c [SCSI] qla2xxx: Update the copyright information. 2013-02-22 12:49:22 +00:00
qla_target.c qla2xxx: Remove unused function 2013-04-25 01:05:23 -07:00
qla_target.h qla2xxx: Remove unused function 2013-04-25 01:05:23 -07:00
qla_version.h [SCSI] qla2xxx: Update the driver version to 8.05.00.03-k. 2013-04-11 15:49:41 -07:00
tcm_qla2xxx.c tcm_qla2xxx: Fix residual for underrun commands that fail 2013-06-14 01:12:56 -07:00
tcm_qla2xxx.h tcm_qla2xxx: Format VPD page 83h SCSI name string according to SPC 2012-10-26 12:29:46 -07:00