From: Simon Horman <horms@kernel.org>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [net-next] net: ethernet: rtsn: Add support for Renesas Ethernet-TSN
Date: Thu, 18 Apr 2024 19:32:07 +0100 [thread overview]
Message-ID: <20240418183207.GL3975545@kernel.org> (raw)
In-Reply-To: <20240414135937.1139611-1-niklas.soderlund+renesas@ragnatech.se>
+ Arnd
On Sun, Apr 14, 2024 at 03:59:37PM +0200, Niklas Söderlund wrote:
> Add initial support for Renesas Ethernet-TSN End-station device of R-Car
> V4H. The Ethernet End-station can connect to an Ethernet network using a
> 10 Mbps, 100 Mbps, or 1 Gbps full-duplex link via MII/GMII/RMII/RGMII.
> Depending on the connected PHY.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
...
> diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig
> index b03fae7a0f72..ea4aca5f406f 100644
> --- a/drivers/net/ethernet/renesas/Kconfig
> +++ b/drivers/net/ethernet/renesas/Kconfig
> @@ -58,4 +58,15 @@ config RENESAS_GEN4_PTP
> help
> Renesas R-Car Gen4 gPTP device driver.
>
> +config RTSN
> + tristate "Renesas Ethernet-TSN support"
> + depends on ARCH_RENESAS || COMPILE_TEST
Hi Niklas,
I think that the use of __iowbm() means that this will not
compile for many architectures: grep indicates it
is only defined for arm, arm64, and arc.
Perhaps COMPILE_TEST should be qualified somehow?
> + depends on PTP_1588_CLOCK
> + select CRC32
> + select MII
> + select PHYLIB
> + select RENESAS_GEN4_PTP
> + help
> + Renesas Ethernet-TSN device driver.
> +
> endif # NET_VENDOR_RENESAS
...
> diff --git a/drivers/net/ethernet/renesas/rtsn.c b/drivers/net/ethernet/renesas/rtsn.c
>
...
> +static int rtsn_poll(struct napi_struct *napi, int budget)
> +{
> + struct rtsn_private *priv;
> + struct net_device *ndev;
> + unsigned long flags;
> + int quota = budget;
> +
> + ndev = napi->dev;
> + priv = netdev_priv(ndev);
> +
> + /* Processing RX Descriptor Ring */
> + if (rtsn_rx(ndev, "a))
> + goto out;
> +
> + /* Processing TX Descriptor Ring */
> + spin_lock_irqsave(&priv->lock, flags);
> + rtsn_tx_free(ndev, true);
> + netif_wake_subqueue(ndev, 0);
> + spin_unlock_irqrestore(&priv->lock, flags);
> +
> + napi_complete(napi);
> +
> + /* Re-enable TX/RX interrupts */
> + spin_lock_irqsave(&priv->lock, flags);
> + rtsn_ctrl_data_irq(priv, true);
> + __iowmb();
> + spin_unlock_irqrestore(&priv->lock, flags);
> +out:
> + return budget - quota;
> +}
...
next prev parent reply other threads:[~2024-04-18 18:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-14 13:59 [net-next] net: ethernet: rtsn: Add support for Renesas Ethernet-TSN Niklas Söderlund
2024-04-15 7:34 ` Paul Barker
2024-04-16 8:36 ` Niklas Söderlund
2024-04-15 22:55 ` Andrew Lunn
2024-04-16 8:58 ` Niklas Söderlund
2024-04-16 13:05 ` Andrew Lunn
2024-04-19 8:16 ` Geert Uytterhoeven
2024-04-19 12:56 ` Andrew Lunn
2024-05-03 10:20 ` Niklas Söderlund
2024-05-03 11:59 ` Andrew Lunn
2024-05-03 13:30 ` Niklas Söderlund
2024-05-06 1:51 ` Andrew Lunn
2024-05-06 14:05 ` Niklas Söderlund
2024-05-06 17:43 ` Geert Uytterhoeven
2024-05-06 18:26 ` Niklas Söderlund
2024-05-06 20:00 ` Andrew Lunn
2024-05-07 11:18 ` Niklas Söderlund
2024-05-06 19:53 ` Andrew Lunn
2024-05-07 11:14 ` Niklas Söderlund
2024-04-18 18:32 ` Simon Horman [this message]
2024-04-18 19:03 ` Arnd Bergmann
2024-05-03 8:50 ` Niklas Söderlund
2024-04-18 18:35 ` Simon Horman
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=20240418183207.GL3975545@kernel.org \
--to=horms@kernel.org \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=pabeni@redhat.com \
--cc=yoshihiro.shimoda.uh@renesas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.