From: Diogo Ivo <diogo.ivo@siemens.com>
To: danishanwar@ti.com, rogerq@kernel.org, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
andrew@lunn.ch, hkallweit1@gmail.com,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org
Cc: Diogo Ivo <diogo.ivo@siemens.com>, jan.kiszka@siemens.com
Subject: [PATCH net-next v5 07/10] net: ti: icssg-prueth: Adjust the number of TX channels for SR1.0
Date: Tue, 26 Mar 2024 11:06:57 +0000 [thread overview]
Message-ID: <20240326110709.26165-8-diogo.ivo@siemens.com> (raw)
In-Reply-To: <20240326110709.26165-1-diogo.ivo@siemens.com>
As SR1.0 uses the current higher priority channel to send commands to
the firmware, take this into account when setting/getting the number
of channels to/from the user.
Based on the work of Roger Quadros in TI's 5.10 SDK [1].
[1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y
Co-developed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: MD Danish Anwar <danishanwar@ti.com>
---
Changes in v5:
- Restrict number of TX channels to 1 to avoid timeouts
- Added Reviewed-by tag from Danish
Changes in v4:
- Add Reviewed-by from Roger
Changes in v3:
- Address Roger's comments on SR1.0 handling
drivers/net/ethernet/ti/icssg/icssg_ethtool.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/ethernet/ti/icssg/icssg_ethtool.c b/drivers/net/ethernet/ti/icssg/icssg_ethtool.c
index 9a7dd7efcf69..ca20325d4d3e 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_ethtool.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_ethtool.c
@@ -142,6 +142,9 @@ static int emac_set_channels(struct net_device *ndev,
emac->tx_ch_num = ch->tx_count;
+ if (emac->is_sr1)
+ emac->tx_ch_num++;
+
return 0;
}
@@ -152,8 +155,17 @@ static void emac_get_channels(struct net_device *ndev,
ch->max_rx = 1;
ch->max_tx = PRUETH_MAX_TX_QUEUES;
+
+ /* Disable multiple TX channels due to timeouts
+ * when using more than one queue */
+ if (emac->is_sr1)
+ ch->max_tx = 1;
+
ch->rx_count = 1;
ch->tx_count = emac->tx_ch_num;
+
+ if (emac->is_sr1)
+ ch->tx_count--;
}
static const struct ethtool_rmon_hist_range emac_rmon_ranges[] = {
--
2.44.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-03-26 12:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 11:06 [PATCH net-next v5 00/10] Support ICSSG-based Ethernet on AM65x SR1.0 devices Diogo Ivo
2024-03-26 11:06 ` [PATCH net-next v5 01/10] dt-bindings: net: Add support for AM65x SR1.0 in ICSSG Diogo Ivo
2024-03-26 11:06 ` [PATCH net-next v5 03/10] net: ti: icssg-prueth: Move common functions into a separate file Diogo Ivo
2024-03-26 11:06 ` [PATCH net-next v5 04/10] net: ti: icssg-prueth: Add SR1.0-specific configuration bits Diogo Ivo
2024-03-26 11:06 ` [PATCH net-next v5 05/10] net: ti: icssg-prueth: Add SR1.0-specific description bits Diogo Ivo
2024-03-26 11:06 ` [PATCH net-next v5 06/10] net: ti: icssg-prueth: Adjust IPG configuration for SR1.0 Diogo Ivo
2024-03-26 11:06 ` Diogo Ivo [this message]
2024-03-26 11:06 ` [PATCH net-next v5 08/10] net: ti: icssg-prueth: Add functions to configure SR1.0 packet classifier Diogo Ivo
2024-03-26 11:06 ` [PATCH net-next v5 09/10] net: ti: icssg-prueth: Modify common functions for SR1.0 Diogo Ivo
2024-03-26 11:07 ` [PATCH net-next v5 10/10] net: ti: icssg-prueth: Add ICSSG Ethernet driver for AM65x SR1.0 platforms Diogo Ivo
2024-03-27 15:03 ` Simon Horman
-- strict thread matches above, loose matches on Subject: below --
2024-03-20 14:42 [PATCH net-next v5 00/10] Support ICSSG-based Ethernet on AM65x SR1.0 devices Diogo Ivo
2024-03-20 14:42 ` [PATCH net-next v5 07/10] net: ti: icssg-prueth: Adjust the number of TX channels for SR1.0 Diogo Ivo
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=20240326110709.26165-8-diogo.ivo@siemens.com \
--to=diogo.ivo@siemens.com \
--cc=andrew@lunn.ch \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jan.kiszka@siemens.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).