]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-frv/scatterlist.h
Add buffer head related helper functions
[linux-2.6-omap-h63xx.git] / include / asm-frv / scatterlist.h
index 53dade7b2e167b3c6a54973f7ef7aa06d0c84a34..2e7143b5a7ad2921109e4bbf1ec3a4ec2d8d1e76 100644 (file)
@@ -4,24 +4,26 @@
 #include <asm/types.h>
 
 /*
- * Drivers must set either ->address or (preferred) ->page and ->offset
+ * Drivers must set either ->address or (preferred) page and ->offset
  * to indicate where data must be transferred to/from.
  *
- * Using ->page is recommended since it handles highmem data as well as
+ * Using page is recommended since it handles highmem data as well as
  * low mem. ->address is restricted to data which has a virtual mapping, and
- * it will go away in the future. Updating to ->page can be automated very
+ * it will go away in the future. Updating to page can be automated very
  * easily -- something like
  *
  * sg->address = some_ptr;
  *
  * can be rewritten as
  *
- * sg->page = virt_to_page(some_ptr);
- * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK;
+ * sg_set_buf(sg, some_ptr, length);
  *
  * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens
  */
 struct scatterlist {
+#ifdef CONFIG_DEBUG_SG
+       unsigned long   sg_magic;
+#endif
        unsigned long   page_link;
        unsigned int    offset;         /* for highmem, page offset */