iommu code merges sg segments without considering lld's sg segment restrictions. iommu code can't access to the limitations because they are in request_queue. This patch adds max_segment_size to device structure. seg_boundary_mask will be added too later. Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> --- include/linux/device.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/linux/device.h b/include/linux/device.h index 3a38d1f..8046b60 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -443,6 +443,13 @@ struct device { struct dma_coherent_mem *dma_mem; /* internal for coherent mem override */ + + /* + * a low level driver may set these to teach IOMMU code about + * sg limitations. + */ + unsigned int max_segment_size; + /* arch specific additions */ struct dev_archdata archdata; -- 1.5.2.4 - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html