scsi: lpfc: Honor module parameter lpfc_use_adisc
[linux-2.6-microblaze.git] / drivers / scsi / advansys.c
index 926311c..a242a62 100644 (file)
@@ -7710,7 +7710,7 @@ adv_get_sglist(struct asc_board *boardp, adv_req_t *reqp,
                                sg_block->sg_ptr = 0L; /* Last ADV_SG_BLOCK in list. */
                                return ADV_SUCCESS;
                        }
-                       slp++;
+                       slp = sg_next(slp);
                }
                sg_block->sg_cnt = NO_OF_SG_PER_BLOCK;
                prev_sg_block = sg_block;