Re: [PATCH v4] ufs: core: print UFSHCD capabilities in controller's sysfs node

From: Daniil Lunev
Date: Mon Aug 01 2022 - 17:31:20 EST


HI Bart
> The above sentence is not complete. Did you perhaps want to write "are
> supported by the host controller" instead of "status"?
Will fix it in the next version.

> I don't think the above documentation is correct. My understanding is
> that the UFSHCD_CAP_CLK_SCALING flag indicates whether or not the host
> controller supports clock scaling. It does not indicate whether or not
> clock scaling is enabled.
Ah, right, there is a control for it in sysfs, it is just hidden in
ufshcd.c I was under
a wrong impression that it is like the writebooster capability that
has quite a bit of
conditions for staying present. WIll fix it in the next version.

> Please change "can not / can be enabled" into "is not supported by the
> host controller / is supported by the host controller".
That would be incorrect. The "caps" variable semantics is a bit weird
in the sense
that it is used at times to convey "active" capabilities, not just
supported one. For
example, for the writebooster capability to be present in caps, first
controller driver
should indicate it is ready to support it, then the part that is
attached to the host
controller has to indicate support in the device descriptor, then WB has to be
configured and its lifetime should not be exhausted. If any of those parameters
are not satisfied, the capability will be removed from the set despite generally
being supported. I am not sure how to properly word it, but just
saying "controller
supports it" would becounter-factual (especially since the controller
doesn't really
knows anything about writebooster per-ce, it is part's functionality).
What would
be suggested wording in that case?

--Daniil