]> www.infradead.org Git - users/hch/block.git/commitdiff
ufs-exynos: move setting the the dma alignment to the init method
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Mar 2024 02:41:17 +0000 (12:41 +1000)
committerChristoph Hellwig <hch@lst.de>
Tue, 9 Apr 2024 05:37:14 +0000 (07:37 +0200)
Use the SCSI host's dma_alignment field and set it in ->init and remove
the now unused config_scsi_dev method.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/ufs/core/ufshcd.c
drivers/ufs/host/ufs-exynos.c
include/ufs/ufshcd.h

index 823bc28c0cb034abb25b58efaeb2485bd4d23160..9ec12de905429ffd856ad12521b2df47d73e3f41 100644 (file)
@@ -5280,9 +5280,6 @@ static int ufshcd_slave_configure(struct scsi_device *sdev)
         */
        sdev->silence_suspend = 1;
 
-       if (hba->vops && hba->vops->config_scsi_dev)
-               hba->vops->config_scsi_dev(sdev);
-
        ufshcd_crypto_register(hba, q);
 
        return 0;
index 734d40f99e31e6baa53e5256039b5429a62f2ef4..7ffc28e227842083c73c332681c702a6d370eca9 100644 (file)
@@ -1187,6 +1187,8 @@ static int exynos_ufs_init(struct ufs_hba *hba)
                goto out;
        exynos_ufs_specify_phy_time_attr(ufs);
        exynos_ufs_config_smu(ufs);
+
+       hba->host->dma_alignment = SZ_4K - 1;
        return 0;
 
 out:
@@ -1510,11 +1512,6 @@ static int fsd_ufs_pre_link(struct exynos_ufs *ufs)
        return 0;
 }
 
-static void exynos_ufs_config_scsi_dev(struct scsi_device *sdev)
-{
-       blk_queue_update_dma_alignment(sdev->request_queue, SZ_4K - 1);
-}
-
 static int fsd_ufs_post_link(struct exynos_ufs *ufs)
 {
        int i;
@@ -1583,7 +1580,6 @@ static const struct ufs_hba_variant_ops ufs_hba_exynos_ops = {
        .hibern8_notify                 = exynos_ufs_hibern8_notify,
        .suspend                        = exynos_ufs_suspend,
        .resume                         = exynos_ufs_resume,
-       .config_scsi_dev                = exynos_ufs_config_scsi_dev,
 };
 
 static struct ufs_hba_variant_ops ufs_hba_exynosauto_vh_ops = {
index a35e12f8e68baa8b1baf45d5234dff62af91813e..93afb726213f0ca0bcc57c82a1de71d2707e1612 100644 (file)
@@ -374,7 +374,6 @@ struct ufs_hba_variant_ops {
        int     (*get_outstanding_cqs)(struct ufs_hba *hba,
                                       unsigned long *ocqs);
        int     (*config_esi)(struct ufs_hba *hba);
-       void    (*config_scsi_dev)(struct scsi_device *sdev);
 };
 
 /* clock gating state  */