]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
firewire: fw-sbp2: prepare for s/g chaining
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 15 Jan 2008 20:10:50 +0000 (21:10 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 30 Jan 2008 21:22:22 +0000 (22:22 +0100)
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-sbp2.c

index 2108cd92451bc06ef22f6ffc824e3371e7d048c9..8281ad94bd8ca68462ba76615cf5d750029be18d 100644 (file)
@@ -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))) {