On Thu, Jan 23, 2025 at 02:25:15PM +0900, Kunihiko Hayashi wrote:
Hi Russell,specified
Thank you for your comment.
On 2025/01/21 19:25, Russell King (Oracle) wrote:
On Tue, Jan 21, 2025 at 01:41:35PM +0900, Kunihiko Hayashi wrote:
This series includes patches that checks the devicetree properties,
the number of MTL queues and FIFO size values, and if these
limit tovalues exceed the value contained in the hardware capabilities,
specifiedthe values from the capabilities.
And this sets hardware capability values if FIFO sizes are not
hasand removes redundant lines.
I think you also indeed to explain why (and possibly understand) - if
there are hardware capabilities that describe these parameters - it
needsbeen necessary to have them in firmware as well.
There are two scenarios I can think of why these would be duplicated:
1. firmware/platform capabilities are there to correct wrong values
provided by the hardware.
2. firmware/platform capabilities are there to reduce the parameters
below hardware maximums.
Which it is affects whether your patch is correct or not, and thus
to be mentioned.
I think scenario 2 applies in this case.
In light of my other reply
(https://lore.kernel.org/r/Z4_ZilVFKacuAUE8@xxxxxxxxxxxxxxxxxxxxx) I
don't think either of my two above applies, and the driver is designed
to allow platform code to override the hardware value, or to provide
the value if there is no hardware value.
My suggestion, therefore, would be (e.g.):
if (priv->dma_cap.rx_fifo_size &&
priv->plat->rx_fifo_size > priv->dma_cap.rx_fifo_size) {
dev_warn(priv->device,
"Rx FIFO size exceeds dma capability (%d)\n",
priv->plat->rx_fifo_size);
priv->plat->rx_fifo_size = priv->dma_cap.rx_fifo_size;
}
if we still want to limit it to the hardware provided capability, where
that is provided.