diff options
author | Prasanna Mumbai <prasanna.mumbai@qlogic.com> | 2011-05-18 02:17:06 -0400 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-24 12:39:29 -0400 |
commit | 6d78bd56be54286a72413db82d87fc371867629f (patch) | |
tree | 8c7d09eee7b8cd8622d8af8e401ac244c482b10e /drivers/scsi | |
parent | 68d92ebf598e205619dea753a9a990aef4ab8f7a (diff) |
[SCSI] qla4xxx: Complete the cmd if sense_len is zero
Complete the cmd if sense length is zero. For cases where sense
data spans across multiple iocb's by FW, we need to hold on to the
I/O (ha->status_srb != NULL) till we have processed them all and
copied the sense data from internal buffer to scsi_cmd sense buffer.
Signed-off-by: Prasanna Mumbai <prasanna.mumbai@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_isr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c index 67d6651cdb36..0e72921c752d 100644 --- a/drivers/scsi/qla4xxx/ql4_isr.c +++ b/drivers/scsi/qla4xxx/ql4_isr.c | |||
@@ -25,9 +25,14 @@ static void qla4xxx_copy_sense(struct scsi_qla_host *ha, | |||
25 | 25 | ||
26 | memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); | 26 | memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); |
27 | sense_len = le16_to_cpu(sts_entry->senseDataByteCnt); | 27 | sense_len = le16_to_cpu(sts_entry->senseDataByteCnt); |
28 | if (sense_len == 0) | 28 | if (sense_len == 0) { |
29 | DEBUG2(ql4_printk(KERN_INFO, ha, "scsi%ld:%d:%d:%d: %s:" | ||
30 | " sense len 0\n", ha->host_no, | ||
31 | cmd->device->channel, cmd->device->id, | ||
32 | cmd->device->lun, __func__)); | ||
33 | ha->status_srb = NULL; | ||
29 | return; | 34 | return; |
30 | 35 | } | |
31 | /* Save total available sense length, | 36 | /* Save total available sense length, |
32 | * not to exceed cmd's sense buffer size */ | 37 | * not to exceed cmd's sense buffer size */ |
33 | sense_len = min_t(uint16_t, sense_len, SCSI_SENSE_BUFFERSIZE); | 38 | sense_len = min_t(uint16_t, sense_len, SCSI_SENSE_BUFFERSIZE); |