From: Vladimir Oltean <olteanv@gmail.com>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jens Axboe <axboe@kernel.dk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [net-next PATCH v3 06/14] net: dsa: qca8k: move mib init function to common code
Date: Tue, 26 Jul 2022 03:13:59 +0300 [thread overview]
Message-ID: <20220726001359.m2sfsvyph2rufqly@skbuf> (raw)
In-Reply-To: <20220723141845.10570-7-ansuelsmth@gmail.com>
On Sat, Jul 23, 2022 at 04:18:37PM +0200, Christian Marangi wrote:
> The same mib function is used by drivers based on qca8k family switch.
> Move it to common code to make it accessible also by other drivers.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> diff --git a/drivers/net/dsa/qca/qca8k-common.c b/drivers/net/dsa/qca/qca8k-common.c
> index 2f96f1d4b921..9e9e3f0b7179 100644
> --- a/drivers/net/dsa/qca/qca8k-common.c
> +++ b/drivers/net/dsa/qca/qca8k-common.c
> @@ -138,3 +138,39 @@ int qca8k_bulk_write(struct qca8k_priv *priv, u32 reg, u32 *val, int len)
>
> return 0;
> }
> +
> +int
> +qca8k_busy_wait(struct qca8k_priv *priv, u32 reg, u32 mask)
Can take up a single line.
> +{
> + u32 val;
> +
> + return regmap_read_poll_timeout(priv->regmap, reg, val, !(val & mask), 0,
> + QCA8K_BUSY_WAIT_TIMEOUT * USEC_PER_MSEC);
> +}
next prev parent reply other threads:[~2022-07-26 0:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-23 14:18 [net-next PATCH v3 00/14] net: dsa: qca8k: code split for qca8k Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 01/14] net: dsa: qca8k: cache match data to speed up access Christian Marangi
2022-07-24 22:30 ` Vladimir Oltean
2022-07-24 20:27 ` Christian Marangi
2022-07-24 23:06 ` Vladimir Oltean
2022-07-24 20:42 ` Christian Marangi
2022-07-24 23:18 ` Vladimir Oltean
2022-07-24 20:49 ` Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 02/14] net: dsa: qca8k: make mib autocast feature optional Christian Marangi
2022-07-24 22:33 ` Vladimir Oltean
2022-07-24 20:29 ` Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 03/14] net: dsa: qca8k: move mib struct to common code Christian Marangi
2022-07-23 23:52 ` kernel test robot
2022-07-23 14:18 ` [net-next PATCH v3 04/14] net: dsa: qca8k: move qca8k read/write/rmw and reg table " Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 05/14] net: dsa: qca8k: move qca8k bulk read/write helper " Christian Marangi
2022-07-26 0:11 ` Vladimir Oltean
2022-07-23 14:18 ` [net-next PATCH v3 06/14] net: dsa: qca8k: move mib init function " Christian Marangi
2022-07-26 0:13 ` Vladimir Oltean [this message]
2022-07-23 14:18 ` [net-next PATCH v3 07/14] net: dsa: qca8k: move port set status/eee/ethtool stats " Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 08/14] net: dsa: qca8k: move bridge functions " Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 09/14] net: dsa: qca8k: move set age/MTU/port enable/disable " Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 10/14] net: dsa: qca8k: move port FDB/MDB function " Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 11/14] net: dsa: qca8k: move port mirror functions " Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 12/14] net: dsa: qca8k: move port VLAN " Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 13/14] net: dsa: qca8k: move port LAG " Christian Marangi
2022-07-23 14:18 ` [net-next PATCH v3 14/14] net: dsa: qca8k: move read_switch_id function " Christian Marangi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220726001359.m2sfsvyph2rufqly@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=axboe@kernel.dk \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox