[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 5 May 2021 02:53:02 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Ansuel Smith <ansuelsmth@...il.com>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH net-next v3 10/20] net: dsa: qca8k: add priority
tweak to qca8337 switch
On Wed, May 05, 2021 at 12:29:04AM +0200, Ansuel Smith wrote:
> The port 5 of the ar8337 have some problem in flood condition. The
> original legacy driver had some specific buffer and priority settings
> for the different port suggested by the QCA switch team. Add this
> missing settings to improve switch stability under load condition.
> The packet priority tweak and the rx delay is specific to qca8337.
> Limit this changes to qca8337 as now we also support 8327 switch.
>
> Signed-off-by: Ansuel Smith <ansuelsmth@...il.com>
> ---
> drivers/net/dsa/qca8k.c | 54 +++++++++++++++++++++++++++++++++++++++--
> drivers/net/dsa/qca8k.h | 24 ++++++++++++++++++
> 2 files changed, 76 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
> index 17c6fd4afa7d..9e034c445085 100644
> --- a/drivers/net/dsa/qca8k.c
> +++ b/drivers/net/dsa/qca8k.c
> @@ -783,7 +783,12 @@ static int
> qca8k_setup(struct dsa_switch *ds)
> {
> struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
> + const struct qca8k_match_data *data;
> int ret, i;
> + u32 mask;
> +
> + /* get the switches ID from the compatible */
> + data = of_device_get_match_data(priv->dev);
You have already done this once in probe. Either store data in qca8k_priv,
or add the id to qca8K_priv.
Andrew
Powered by blists - more mailing lists