lkml.org 
[lkml]   [2020]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 1/8] scsi: ufs: enable WriteBooster on some pre-3.1 UFS devices
From
Date
Hi Avri,
On Mon, 2020-05-04 at 22:33 +0800, Stanley Chu wrote:
> Hi Avri,
>
> On Mon, 2020-05-04 at 10:37 +0000, Avri Altman wrote:
> > >
> > > static void ufshcd_wb_probe(struct ufs_hba *hba, u8 *desc_buf)
> > > {
> > > + if (!ufshcd_is_wb_allowed(hba))
> > > + return;
> > > +
> > > + if (hba->desc_size.dev_desc <=
> > > DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP)
> > Should be
> > DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP + 4
>
> I think this description length check is redundant because the device
> quirk shall be added only after WriteBooster supportat is confirmed in
> attached UFS device. So I will remove this in next version.

Sorry this statement is incorrect because this kind on devices may have
short (without DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP field) before
firmware upgrading. So the checking for descriptor length is still
required to avoid out-of-boundary access in below codes.

I will add it back in next version and also fix the length.

Thanks,
Stanley Chu

> >
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek
>

\
 
 \ /
  Last update: 2020-05-08 01:51    [W:0.043 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site