summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohank@serverengines.com>2010-01-07 01:50:19 +0530
committerJames Bottomley <James.Bottomley@suse.de>2010-02-08 18:26:01 -0600
commit48bd86cf213a5780346b603b703c4b83978611a8 (patch)
treed776c915c93188624eeb008bb003cfded766bd27 /drivers/scsi/be2iscsi
parente4b8972c6172950ce226afdf7a921098f7672d5c (diff)
downloadop-kernel-dev-48bd86cf213a5780346b603b703c4b83978611a8.zip
op-kernel-dev-48bd86cf213a5780346b603b703c4b83978611a8.tar.gz
[SCSI] be2iscsi: Fixing Bug for multiple SGEs
The patch fixes a but where the sg_next is not assigned and hence the first sge was being resused wrongly Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/be2iscsi')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 9fc4446..d611a13 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -1711,7 +1711,8 @@ hwi_write_sgl(struct iscsi_wrb *pwrb, struct scatterlist *sg,
io_task->bhs_pa.u.a32.address_hi);
l_sg = sg;
- for (index = 0; (index < num_sg) && (index < 2); index++, sg_next(sg)) {
+ for (index = 0; (index < num_sg) && (index < 2); index++,
+ sg = sg_next(sg)) {
if (index == 0) {
sg_len = sg_dma_len(sg);
addr = (u64) sg_dma_address(sg);
@@ -1755,7 +1756,7 @@ hwi_write_sgl(struct iscsi_wrb *pwrb, struct scatterlist *sg,
psgl++;
psgl++;
offset = 0;
- for (index = 0; index < num_sg; index++, sg_next(sg), psgl++) {
+ for (index = 0; index < num_sg; index++, sg = sg_next(sg), psgl++) {
sg_len = sg_dma_len(sg);
addr = (u64) sg_dma_address(sg);
AMAP_SET_BITS(struct amap_iscsi_sge, addr_lo, psgl,
OpenPOWER on IntegriCloud