scsi: ufs: Add quirk to enable host controller without PH configuration
authorjongmin jeong <jjmin.jeong@samsung.com>
Mon, 18 Oct 2021 12:42:03 +0000 (21:42 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 28 Oct 2021 03:10:10 +0000 (23:10 -0400)
Samsung ExynosAuto v9 SoC virtual hosts do not support device management.
Add a quirk to skip the physical host interface configuration part that
cannot be performed in the virtual host.

Link: https://lore.kernel.org/r/20211018124216.153072-3-chanho61.park@samsung.com
Cc: James E.J. Bottomley <jejb@linux.ibm.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Suggested-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: jongmin jeong <jjmin.jeong@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h

index dc7ce9eef0c783e429dc5f26586e0da80998d3ce..f5ba8f953b8761a468ef39570686db2c572ea1b4 100644 (file)
@@ -8031,6 +8031,9 @@ static int ufshcd_probe_hba(struct ufs_hba *hba, bool init_dev_params)
        if (ret)
                goto out;
 
+       if (hba->quirks & UFSHCD_QUIRK_SKIP_PH_CONFIGURATION)
+               goto out;
+
        /* Debug counters initialization */
        ufshcd_clear_dbg_ufs_stats(hba);
 
index e67181a013e360c303c5d35f6af396e26da30569..4ceb3c7e65b4b9092b38693a8ce8a9effd0c2ae9 100644 (file)
@@ -595,6 +595,12 @@ enum ufshcd_quirks {
         * support UIC command
         */
        UFSHCD_QUIRK_BROKEN_UIC_CMD                     = 1 << 15,
+
+       /*
+        * This quirk needs to be enabled if the host controller cannot
+        * support physical host configuration.
+        */
+       UFSHCD_QUIRK_SKIP_PH_CONFIGURATION              = 1 << 16,
 };
 
 enum ufshcd_caps {