RE: [PATCH 2/3] scsi: ufs: initialize max_lu_supported while booting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> >               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.
> 





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux