File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -5107,8 +5107,8 @@ static int ufshcd_slave_configure(struct scsi_device *sdev)
51075107 ufshcd_hpb_configure (hba , sdev );
51085108
51095109 blk_queue_update_dma_pad (q , PRDT_DATA_BYTE_COUNT_PAD - 1 );
5110- if (hba -> quirks & UFSHCD_QUIRK_ALIGN_SG_WITH_PAGE_SIZE )
5111- blk_queue_update_dma_alignment (q , PAGE_SIZE - 1 );
5110+ if (hba -> quirks & UFSHCD_QUIRK_4KB_DMA_ALIGNMENT )
5111+ blk_queue_update_dma_alignment (q , 4096 - 1 );
51125112 /*
51135113 * Block runtime-pm until all consumers are added.
51145114 * Refer ufshcd_setup_links().
@@ -8724,7 +8724,6 @@ static struct scsi_host_template ufshcd_driver_template = {
87248724 .max_host_blocked = 1 ,
87258725 .track_queue_depth = 1 ,
87268726 .sdev_groups = ufshcd_driver_groups ,
8727- .dma_boundary = PAGE_SIZE - 1 ,
87288727 .rpm_autosuspend_delay = RPM_AUTOSUSPEND_DELAY_MS ,
87298728};
87308729
Original file line number Diff line number Diff line change @@ -1300,6 +1300,14 @@ static int exynos_ufs_hce_enable_notify(struct ufs_hba *hba,
13001300
13011301 switch (status ) {
13021302 case PRE_CHANGE :
1303+ /*
1304+ * The maximum segment size must be set after scsi_host_alloc()
1305+ * has been called and before LUN scanning starts
1306+ * (ufshcd_async_scan()). Note: this callback may also be called
1307+ * from other functions than ufshcd_init().
1308+ */
1309+ hba -> host -> max_segment_size = 4096 ;
1310+
13031311 if (ufs -> drv_data -> pre_hce_enable ) {
13041312 ret = ufs -> drv_data -> pre_hce_enable (ufs );
13051313 if (ret )
@@ -1673,7 +1681,7 @@ static const struct exynos_ufs_drv_data exynos_ufs_drvs = {
16731681 UFSHCD_QUIRK_BROKEN_OCS_FATAL_ERROR |
16741682 UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL |
16751683 UFSHCD_QUIRK_SKIP_DEF_UNIPRO_TIMEOUT_SETTING |
1676- UFSHCD_QUIRK_ALIGN_SG_WITH_PAGE_SIZE ,
1684+ UFSHCD_QUIRK_4KB_DMA_ALIGNMENT ,
16771685 .opts = EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL |
16781686 EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL |
16791687 EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX |
Original file line number Diff line number Diff line change @@ -583,9 +583,9 @@ enum ufshcd_quirks {
583583 UFSHCD_QUIRK_SKIP_DEF_UNIPRO_TIMEOUT_SETTING = 1 << 13 ,
584584
585585 /*
586- * This quirk allows only sg entries aligned with page size .
586+ * Align DMA SG entries on a 4 KiB boundary .
587587 */
588- UFSHCD_QUIRK_ALIGN_SG_WITH_PAGE_SIZE = 1 << 14 ,
588+ UFSHCD_QUIRK_4KB_DMA_ALIGNMENT = 1 << 14 ,
589589
590590 /*
591591 * This quirk needs to be enabled if the host controller does not
You can’t perform that action at this time.
0 commit comments