ieee1394: iso and async streams: s/g list fix
authorJens Axboe <jens.axboe@oracle.com>
Sun, 4 Nov 2007 08:44:56 +0000 (09:44 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 4 Nov 2007 13:31:16 +0000 (14:31 +0100)
Torsten Kaiser wrote:
> Looking that calltrace upwards, it seems replacing the
> memset(dma->sglist,...) with sg_init_table(...) would fix the BUG_ON()
> as that inits the SG_MAGIC.

Tested-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/ieee1394/dma.c

index f5f4983dfbf3db5cc85fc77522ddc510e6839504..7c4eb39b70241ef55f2bcc6ff4e7330acdc03938 100644 (file)
@@ -103,8 +103,7 @@ int dma_region_alloc(struct dma_region *dma, unsigned long n_bytes,
                goto err;
        }
 
-       /* just to be safe - this will become unnecessary once sglist->address goes away */
-       memset(dma->sglist, 0, dma->n_pages * sizeof(*dma->sglist));
+       sg_init_table(dma->sglist, dma->n_pages);
 
        /* fill scatter/gather list with pages */
        for (i = 0; i < dma->n_pages; i++) {