From: Asutosh Das <asutoshd@xxxxxxxxxxxxxx> UFS devices perform better when using SYNCHRONIZE CACHE command instead of the FUA flag. Hence this patch. Signed-off-by: Asutosh Das <asutoshd@xxxxxxxxxxxxxx> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> [ bvanassche: modified a source code comment ] --- drivers/ufs/core/ufshcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index bf3cb12ef02f..461aa51cfccc 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -5056,6 +5056,9 @@ static int ufshcd_slave_alloc(struct scsi_device *sdev) /* WRITE_SAME command is not supported */ sdev->no_write_same = 1; + /* Use SYNCHRONIZE CACHE instead of FUA to improve performance */ + sdev->sdev_bflags = BLIST_BROKEN_FUA; + ufshcd_lu_init(hba, sdev); ufshcd_setup_links(hba, sdev);