diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2008-09-24 05:00:22 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-09-28 18:10:40 -0400 |
commit | c9eeb248f3b44939532a9716bc06413383aa5d63 (patch) | |
tree | 551add90abf50c42b6a3ffcdf487a49ed9dfd2c4 /drivers | |
parent | 44ea91c597ae4641d9ac21b8bbba0795d2f4261e (diff) |
[SCSI] qlogicpti: fix sg list traversal error in continuation entries
The current sg list traversal logic for the continuation entries
doesn't advance the list pointer once all seven slots are used, so the
next continuation entry (if there is one) wrongly begins again at the
start of the sg list.
Fix by advancing the sg pointer after the for_each_sg().
Reported-by: Meelis Roos <mroos@ut.ee>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qlogicpti.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 4a1cf6377f6c..905350896725 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
@@ -914,6 +914,7 @@ static inline int load_cmd(struct scsi_cmnd *Cmnd, struct Command_Entry *cmd, | |||
914 | ds[i].d_count = sg_dma_len(s); | 914 | ds[i].d_count = sg_dma_len(s); |
915 | } | 915 | } |
916 | sg_count -= n; | 916 | sg_count -= n; |
917 | sg = s; | ||
917 | } | 918 | } |
918 | } else { | 919 | } else { |
919 | cmd->dataseg[0].d_base = 0; | 920 | cmd->dataseg[0].d_base = 0; |