lkml.org 
[lkml]   [2020]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 2/3] scsi: ufs: initialize max_lu_supported while booting
Date

> > memset(&hba->dev_info, 0, sizeof(hba->dev_info));
> > + /* Init parameters according to UFS relevant descriptors */
> > + ret = ufshcd_init_device_param(hba);
> > + if (ret) {
> > + dev_err(hba->dev,
> > + "%s: Init of device param failed. err = %d\n",
> > + __func__, ret);
> > + goto out;
> > + }
> > +
> > if (!ufshcd_query_flag_retry(hba,
> UPIU_QUERY_OPCODE_READ_FLAG,
> > QUERY_FLAG_IDN_PWR_ON_WPE, &flag))
> > hba->dev_info.f_power_on_wp_en = flag;
>
> The context check in ufshcd_probe_hba() looks ugly to me. Has it been
> considered to move all code that is controlled by the if-statement with the
> context check into ufshcd_async_scan()?
As part of ufshcd_probe_hba we also read the device descriptor,
Which is, by spec, an optional stage of the boot process, right after the unipro boot sequence.
Might want to consider moving the call there, as an integral phase of obtaining device info.

Thanks,
Avri

>
> Thanks,
>
> Bart.
>

\
 
 \ /
  Last update: 2020-01-12 09:42    [W:0.061 / U:15.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site