scsi: core: take the DMA max mapping size into account
[linux-2.6-microblaze.git] / drivers / scsi / advansys.c
index d375844..b87de8d 100644 (file)
@@ -7714,7 +7714,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;