]> err.no Git - linux-2.6/commitdiff
m68k: sg fallout
authorGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 24 Oct 2007 06:55:40 +0000 (08:55 +0200)
committerJens Axboe <axboe@carl.home.kernel.dk>
Wed, 24 Oct 2007 06:55:40 +0000 (08:55 +0200)
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
arch/m68k/kernel/dma.c
drivers/scsi/atari_NCR5380.c
drivers/scsi/sun3x_esp.c
net/ieee80211/ieee80211_crypt_tkip.c
net/ieee80211/ieee80211_crypt_wep.c

index ef490e1ce6002bae783774c77dc13b207191962f..6f8c080dd9f9d24979f23adefb086810b7c2ae65 100644 (file)
@@ -9,10 +9,10 @@
 #include <linux/dma-mapping.h>
 #include <linux/device.h>
 #include <linux/kernel.h>
+#include <linux/scatterlist.h>
 #include <linux/vmalloc.h>
 
 #include <asm/pgalloc.h>
-#include <asm/scatterlist.h>
 
 void *dma_alloc_coherent(struct device *dev, size_t size,
                         dma_addr_t *handle, gfp_t flag)
index d1780980fb206ad633d3ab71acbf7cfbb95a2c09..a9680b5e8ac642b11979dfc24f4b7ff789822be9 100644 (file)
@@ -477,10 +477,9 @@ static void merge_contiguous_buffers(Scsi_Cmnd *cmd)
 
        for (endaddr = virt_to_phys(cmd->SCp.ptr + cmd->SCp.this_residual - 1) + 1;
             cmd->SCp.buffers_residual &&
-            virt_to_phys(page_address(cmd->SCp.buffer[1].page) +
-                         cmd->SCp.buffer[1].offset) == endaddr;) {
+            virt_to_phys(sg_virt(&cmd->SCp.buffer[1])) == endaddr;) {
                MER_PRINTK("VTOP(%p) == %08lx -> merging\n",
-                          page_address(cmd->SCp.buffer[1].page), endaddr);
+                          page_address(sg_page(&cmd->SCp.buffer[1])), endaddr);
 #if (NDEBUG & NDEBUG_MERGING)
                ++cnt;
 #endif
index 80fb3f88af2edd937ebdf2df51e8f4efcca67ee3..1bc41907a03817c206db14357ccf11976a2843a6 100644 (file)
@@ -332,8 +332,8 @@ static void dma_mmu_get_scsi_sgl (struct NCR_ESP *esp, Scsi_Cmnd *sp)
     struct scatterlist *sg = sp->SCp.buffer;
 
     while (sz >= 0) {
-           sg[sz].dma_address = dvma_map((unsigned long)page_address(sg[sz].page) +
-                                          sg[sz].offset, sg[sz].length);
+           sg[sz].dma_address = dvma_map((unsigned long)sg_virt(&sg[sz]),
+                                         sg[sz].length);
            sz--;
     }
     sp->SCp.ptr=(char *)((unsigned long)sp->SCp.buffer->dma_address);
index 811777682e2b94ea876edab53ac5005d0ee63969..74d017520a23c62f10b98927daca98f4c7afcf1d 100644 (file)
@@ -25,7 +25,7 @@
 #include <net/ieee80211.h>
 
 #include <linux/crypto.h>
-#include <asm/scatterlist.h>
+#include <linux/scatterlist.h>
 #include <linux/crc32.h>
 
 MODULE_AUTHOR("Jouni Malinen");
index 9693429489ed700f83d2cdc2fcae1ea043658f47..866fc04c44f9c989d64bd543e3a10224db78c11c 100644 (file)
@@ -22,7 +22,7 @@
 #include <net/ieee80211.h>
 
 #include <linux/crypto.h>
-#include <asm/scatterlist.h>
+#include <linux/scatterlist.h>
 #include <linux/crc32.h>
 
 MODULE_AUTHOR("Jouni Malinen");