• Bart Van Assche's avatar
    scsi: ufs: core: Enable DMA clustering · 13f87983
    Bart Van Assche authored
    All UFS host controllers support DMA clustering. Hence enable DMA
    clustering.
    
    Notes:
    
     - The max_segment_size parameter implements the 256 KiB limit for the
       PRDT. The dma_boundary parameter represents a boundary that must not be
       crossed by DMA scatter/gather lists. I'm not aware of any restrictions
       on DMA scatter/gather lists in the UFSHCI specification other than the
       256 KiB limit for the PRDT and the 32-bit address restriction for
       controllers that only support 32-bits DMA. The latter restriction is
       already handled by ufshcd_set_dma_mask().
    
     - Without patch "scsi: ufs: exynos: Fix the maximum segment size", this
       patch breaks support for the Exynos controller.
    
    The history of the dma_boundary parameter in the UFS driver is as
    follows:
    
     * The initial UFS driver did not set the dma_boundary parameter.
    
     * Commit 4dd4130a ("scsi: make sure all drivers set the use_clustering
       flag") set the .use_clustering flag.
    
     * Commit 4af14d11 ("scsi: remove the use_clustering flag") removed the
       use_clustering flag and set the dma_boundary parameter instead.
    
    Cc: Avri Altman <avri.altman@wdc.com>
    Cc: Alim Akhtar <alim.akhtar@samsung.com>
    Cc: Kiwoong Kim <kwmad.kim@samsung.com>
    Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
    Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Reviewed-by: default avatarAlim Akhtar <alim.akhtar@samsung.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    13f87983
ufshcd.c 280 KB