RE: [PATCH v6 2/3] scsi: ufs: Maximum RTT supported by the host driver

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

 



> 
> On 5/26/24 01:16, Avri Altman wrote:
> > -     rtt = min_t(int, dev_info->rtt_cap, hba->nortt);
> > +     if (hba->vops && hba->vops->max_num_rtt)
> > +             rtt = hba->vops->max_num_rtt;
> > +     else
> > +             rtt = min_t(int, dev_info->rtt_cap, hba->nortt);
> > +
> 
> Shouldn't what the controller supports be compared with what the device
> supports, e.g. as follows?
> 
> min_t(int, dev_info->rtt_cap, hba->vops->max_num_rtt ? : hba->nortt);
Yes, this is an option too.
The one that I proposed allows to entirely overrides the negotiation.
I think your suggestion is better.
Will change.

> 
> >   struct ufs_hba_variant_ops {
> >       const char *name;
> > +     int     max_num_rtt;
> 
> Hmm ... why 'int' instead of an unsigned type? If the type would be changed
> into 'u8' (the type of rtt_cap) then the above min_t() can be changed into
> min().
Nortt is 0 based, meaning it can be 256, which some of the platforms in the market do use,  so u8 is not enough.

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