summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-22 08:54:06 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-22 08:54:06 -1000
commit67e5b2fad4e9848a954fd97de0509ec5cb6e6d47 (patch)
tree2aeb8a41d628fbbabebf407079b62cf0283b58ce /drivers/scsi
parent70a3067d55b31839720db1502eafd76f36a8c1af (diff)
parent58807a524782744aed5fb7b8fefac7134721331a (diff)
downloadlinux-3.10-67e5b2fad4e9848a954fd97de0509ec5cb6e6d47.tar.gz
linux-3.10-67e5b2fad4e9848a954fd97de0509ec5cb6e6d47.tar.bz2
linux-3.10-67e5b2fad4e9848a954fd97de0509ec5cb6e6d47.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger: "Included is the recent tcm_qla2xxx residual underrun length fix from Roland, along with Joern's iscsi-target patch for session_lock breakage within iscsit_stop_time2retain_timer() code. Both are CC'ed to stable. The remaining two are specific to recent iscsi-target + iser conversion changes. One drops some left-over debug noise, and Andy's patch fixes configfs attribute handling during an explicit network portal feature bit disable when iser-target is unsupported." * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: iscsi-target: Remove left over v3.10-rc debug printks target/iscsi: Fix op=disable + error handling cases in np_store_iser tcm_qla2xxx: Fix residual for underrun commands that fail target/iscsi: don't corrupt bh_count in iscsit_stop_time2retain_timer()
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 7a3870f385f..66b0b26a138 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -688,8 +688,12 @@ static int tcm_qla2xxx_queue_status(struct se_cmd *se_cmd)
* For FCP_READ with CHECK_CONDITION status, clear cmd->bufflen
* for qla_tgt_xmit_response LLD code
*/
+ if (se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) {
+ se_cmd->se_cmd_flags &= ~SCF_OVERFLOW_BIT;
+ se_cmd->residual_count = 0;
+ }
se_cmd->se_cmd_flags |= SCF_UNDERFLOW_BIT;
- se_cmd->residual_count = se_cmd->data_length;
+ se_cmd->residual_count += se_cmd->data_length;
cmd->bufflen = 0;
}