Skip to content

Commit 67144d3

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
scsi: ufs: ufs-exynos: Move setting the the DMA alignment to the init method
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> Link: https://lore.kernel.org/r/20240409143748.980206-9-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> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 5b7dfbe commit 67144d3

3 files changed

Lines changed: 2 additions & 10 deletions

File tree

drivers/ufs/core/ufshcd.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5274,9 +5274,6 @@ static int ufshcd_slave_configure(struct scsi_device *sdev)
52745274
*/
52755275
sdev->silence_suspend = 1;
52765276

5277-
if (hba->vops && hba->vops->config_scsi_dev)
5278-
hba->vops->config_scsi_dev(sdev);
5279-
52805277
ufshcd_crypto_register(hba, q);
52815278

52825279
return 0;

drivers/ufs/host/ufs-exynos.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,8 @@ static int exynos_ufs_init(struct ufs_hba *hba)
11871187
goto out;
11881188
exynos_ufs_specify_phy_time_attr(ufs);
11891189
exynos_ufs_config_smu(ufs);
1190+
1191+
hba->host->dma_alignment = SZ_4K - 1;
11901192
return 0;
11911193

11921194
out:
@@ -1510,11 +1512,6 @@ static int fsd_ufs_pre_link(struct exynos_ufs *ufs)
15101512
return 0;
15111513
}
15121514

1513-
static void exynos_ufs_config_scsi_dev(struct scsi_device *sdev)
1514-
{
1515-
blk_queue_update_dma_alignment(sdev->request_queue, SZ_4K - 1);
1516-
}
1517-
15181515
static int fsd_ufs_post_link(struct exynos_ufs *ufs)
15191516
{
15201517
int i;
@@ -1583,7 +1580,6 @@ static const struct ufs_hba_variant_ops ufs_hba_exynos_ops = {
15831580
.hibern8_notify = exynos_ufs_hibern8_notify,
15841581
.suspend = exynos_ufs_suspend,
15851582
.resume = exynos_ufs_resume,
1586-
.config_scsi_dev = exynos_ufs_config_scsi_dev,
15871583
};
15881584

15891585
static struct ufs_hba_variant_ops ufs_hba_exynosauto_vh_ops = {

include/ufs/ufshcd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ struct ufs_hba_variant_ops {
374374
int (*get_outstanding_cqs)(struct ufs_hba *hba,
375375
unsigned long *ocqs);
376376
int (*config_esi)(struct ufs_hba *hba);
377-
void (*config_scsi_dev)(struct scsi_device *sdev);
378377
};
379378

380379
/* clock gating state */

0 commit comments

Comments
 (0)