Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: ufs: ufs-mediatek: Configure individual LU queue flags

Previously, ufs vops config_scsi_dev was removed because there were no
users. ufs-mediatek needs it to configure the queue flags for each LU
individually. Therefore, bring it back and customize the queue flag as
required.

[mkp: fixed typo]

Signed-off-by: Ed Tsai <ed.tsai@mediatek.com>
Link: https://lore.kernel.org/r/20241008065950.23431-1-ed.tsai@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Ed Tsai and committed by
Martin K. Petersen
7670e74f 4b3b5815

+14
+3
drivers/ufs/core/ufshcd.c
··· 5235 5235 */ 5236 5236 sdev->silence_suspend = 1; 5237 5237 5238 + if (hba->vops && hba->vops->config_scsi_dev) 5239 + hba->vops->config_scsi_dev(sdev); 5240 + 5238 5241 ufshcd_crypto_register(hba, q); 5239 5242 5240 5243 return 0;
+10
drivers/ufs/host/ufs-mediatek.c
··· 1780 1780 return ufs_mtk_config_mcq(hba, true); 1781 1781 } 1782 1782 1783 + static void ufs_mtk_config_scsi_dev(struct scsi_device *sdev) 1784 + { 1785 + struct ufs_hba *hba = shost_priv(sdev->host); 1786 + 1787 + dev_dbg(hba->dev, "lu %llu scsi device configured", sdev->lun); 1788 + if (sdev->lun == 2) 1789 + blk_queue_flag_set(QUEUE_FLAG_SAME_FORCE, sdev->request_queue); 1790 + } 1791 + 1783 1792 /* 1784 1793 * struct ufs_hba_mtk_vops - UFS MTK specific variant operations 1785 1794 * ··· 1818 1809 .op_runtime_config = ufs_mtk_op_runtime_config, 1819 1810 .mcq_config_resource = ufs_mtk_mcq_config_resource, 1820 1811 .config_esi = ufs_mtk_config_esi, 1812 + .config_scsi_dev = ufs_mtk_config_scsi_dev, 1821 1813 }; 1822 1814 1823 1815 /**
+1
include/ufs/ufshcd.h
··· 386 386 int (*get_outstanding_cqs)(struct ufs_hba *hba, 387 387 unsigned long *ocqs); 388 388 int (*config_esi)(struct ufs_hba *hba); 389 + void (*config_scsi_dev)(struct scsi_device *sdev); 389 390 }; 390 391 391 392 /* clock gating state */