scsi: ufs: Conditionally enable the BLK_MQ_F_BLOCKING flag
authorBart Van Assche <bvanassche@acm.org>
Mon, 29 May 2023 20:26:38 +0000 (13:26 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 31 May 2023 15:42:46 +0000 (11:42 -0400)
Prepare for adding code in ufshcd_queuecommand() that may sleep.

Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230529202640.11883-4-bvanassche@acm.org
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c

index 17d7bb875fee8355b796c2bc842a260ce8e44dbf..e093ce33887c52caa91099071bf2ea4420102d24 100644 (file)
@@ -10218,6 +10218,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
        host->max_channel = UFSHCD_MAX_CHANNEL;
        host->unique_id = host->host_no;
        host->max_cmd_len = UFS_CDB_SIZE;
+       host->queuecommand_may_block = !!(hba->caps & UFSHCD_CAP_CLK_GATING);
 
        hba->max_pwr_info.is_valid = false;