From: Stefan Richter Date: Tue, 15 Jan 2008 20:10:50 +0000 (+0100) Subject: firewire: fw-sbp2: prepare for s/g chaining X-Git-Tag: v3.12-rc1~23961^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7811da2d94d8e1f77015ec9afa4575ddc9981a4;p=kernel%2Fkernel-generic.git firewire: fw-sbp2: prepare for s/g chaining Signed-off-by: Stefan Richter --- diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 2108cd9..8281ad9 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c @@ -1107,9 +1107,9 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device, * elements larger than 65535 bytes, some IOMMUs may merge sg elements * during DMA mapping, and Linux currently doesn't prevent this. */ - for (i = 0, j = 0; i < count; i++) { - sg_len = sg_dma_len(sg + i); - sg_addr = sg_dma_address(sg + i); + for (i = 0, j = 0; i < count; i++, sg = sg_next(sg)) { + sg_len = sg_dma_len(sg); + sg_addr = sg_dma_address(sg); while (sg_len) { /* FIXME: This won't get us out of the pinch. */ if (unlikely(j >= ARRAY_SIZE(orb->page_table))) {