Commit:     d22a6966b8029913fac37d078ab2403898d94c63
Parent:     67ec11cf968241c9ae907f8817b6ac74d4dd71d7
Author:     FUJITA Tomonori <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:28:13 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:11 2008 -0800

    iommu sg merging: add accessors for segment_boundary_mask in 
    This adds new accessors for segment_boundary_mask in device_dma_parameters
    structure in the same way I did for max_segment_size.  So we can easily 
    where to place struct device_dma_parameters in the future.
    dma_get_segment boundary returns 0xffffffff if dma_parms in struct device
    isn't set up properly.  0xffffffff is the default value used in the block
    layer and the scsi mid layer.
    Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]>
    Cc: James Bottomley <[EMAIL PROTECTED]>
    Cc: Jens Axboe <[EMAIL PROTECTED]>
    Cc: Jeff Garzik <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 include/linux/dma-mapping.h |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index df3a361..3320307 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -75,6 +75,21 @@ static inline unsigned int dma_set_max_seg_size(struct 
device *dev,
                return -EIO;
+static inline unsigned long dma_get_seg_boundary(struct device *dev)
+       return dev->dma_parms ?
+               dev->dma_parms->segment_boundary_mask : 0xffffffff;
+static inline int dma_set_seg_boundary(struct device *dev, unsigned long mask)
+       if (dev->dma_parms) {
+               dev->dma_parms->segment_boundary_mask = mask;
+               return 0;
+       } else
+               return -EIO;
 /* flags for the coherent memory api */
 #define        DMA_MEMORY_MAP                  0x01
 #define DMA_MEMORY_IO                  0x02
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to