Message ID | 3cf3e93696510922b775d8887ca8408dd384648b.1599285983.git.kwmad.kim@samsung.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | ufs: introduce skipping manual flush for wb | expand |
On Sat, 2020-09-05 at 15:06 +0900, Kiwoong Kim wrote: [...] > + > + /* > + * This quirk needs to disable manual flush for write booster > + */ > + UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL = 1 << 11, You can't have 1 << 11 it's already taken by: 8da76f71fef7 scsi: ufs-pci: Add quirk for broken auto-hibernate for Intel EHL /* * This quirk needs to disable manual flush for write booster */ UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL = 1 << 11, I take it 1 << 12 is OK? James
> [...] > > + > > + /* > > + * This quirk needs to disable manual flush for write booster > > + */ > > + UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL = 1 << 11, > > You can't have 1 << 11 it's already taken by: > > 8da76f71fef7 scsi: ufs-pci: Add quirk for broken auto-hibernate for Intel > EHL > > /* > * This quirk needs to disable manual flush for write booster > */ > UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL = 1 << 11, > > I take it 1 << 12 is OK? > > James > Sure, no problem. Thanks. Kiwoong Kim
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 64bd59c..54a2259 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5307,6 +5307,9 @@ static int ufshcd_wb_toggle_flush_during_h8(struct ufs_hba *hba, bool set) static inline void ufshcd_wb_toggle_flush(struct ufs_hba *hba, bool enable) { + if (hba->quirks & UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL) + return; + if (enable) ufshcd_wb_buf_flush_enable(hba); else diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 02bd405..e99efee 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -531,6 +531,11 @@ enum ufshcd_quirks { * OCS FATAL ERROR with device error through sense data */ UFSHCD_QUIRK_BROKEN_OCS_FATAL_ERROR = 1 << 10, + + /* + * This quirk needs to disable manual flush for write booster + */ + UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL = 1 << 11, }; enum ufshcd_caps {