From: Lorenzo Bianconi <lorenzo@kernel.org>
To: netdev@vger.kernel.org
Cc: nbd@nbd.name, john@phrozen.org, sean.wang@mediatek.com,
Mark-MC.Lee@mediatek.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
matthias.bgg@gmail.com, linux-mediatek@lists.infradead.org,
lorenzo.bianconi@redhat.com, Bo.Jiao@mediatek.com,
sujuan.chen@mediatek.com, ryder.Lee@mediatek.com,
evelyn.tsai@mediatek.com, devicetree@vger.kernel.org,
robh+dt@kernel.org, daniel@makrotopia.org,
krzysztof.kozlowski+dt@linaro.org,
angelogioacchino.delregno@collabora.com
Subject: [PATCH v4 net-next 5/8] net: ethernet: mtk_wed: rename tx_wdma array in rx_wdma
Date: Sat, 5 Nov 2022 23:36:20 +0100 [thread overview]
Message-ID: <e5ca37ab77ea54feac0f1c1bbf9edfa22117f18c.1667687249.git.lorenzo@kernel.org> (raw)
In-Reply-To: <cover.1667687249.git.lorenzo@kernel.org>
Rename tx_wdma queue array in rx_wdma since this is rx side of wdma soc.
Moreover rename mtk_wed_wdma_ring_setup routine in
mtk_wed_wdma_rx_ring_setup()
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/ethernet/mediatek/mtk_wed.c | 16 ++++++++--------
include/linux/soc/mediatek/mtk_wed.h | 3 ++-
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c
index 9c9dd17332b6..e904596e67de 100644
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
@@ -253,8 +253,8 @@ mtk_wed_free_tx_rings(struct mtk_wed_device *dev)
for (i = 0; i < ARRAY_SIZE(dev->tx_ring); i++)
mtk_wed_free_ring(dev, &dev->tx_ring[i]);
- for (i = 0; i < ARRAY_SIZE(dev->tx_wdma); i++)
- mtk_wed_free_ring(dev, &dev->tx_wdma[i]);
+ for (i = 0; i < ARRAY_SIZE(dev->rx_wdma); i++)
+ mtk_wed_free_ring(dev, &dev->rx_wdma[i]);
}
static void
@@ -688,10 +688,10 @@ mtk_wed_ring_alloc(struct mtk_wed_device *dev, struct mtk_wed_ring *ring,
}
static int
-mtk_wed_wdma_ring_setup(struct mtk_wed_device *dev, int idx, int size)
+mtk_wed_wdma_rx_ring_setup(struct mtk_wed_device *dev, int idx, int size)
{
u32 desc_size = sizeof(struct mtk_wdma_desc) * dev->hw->version;
- struct mtk_wed_ring *wdma = &dev->tx_wdma[idx];
+ struct mtk_wed_ring *wdma = &dev->rx_wdma[idx];
if (mtk_wed_ring_alloc(dev, wdma, MTK_WED_WDMA_RING_SIZE, desc_size))
return -ENOMEM;
@@ -805,9 +805,9 @@ mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)
{
int i;
- for (i = 0; i < ARRAY_SIZE(dev->tx_wdma); i++)
- if (!dev->tx_wdma[i].desc)
- mtk_wed_wdma_ring_setup(dev, i, 16);
+ for (i = 0; i < ARRAY_SIZE(dev->rx_wdma); i++)
+ if (!dev->rx_wdma[i].desc)
+ mtk_wed_wdma_rx_ring_setup(dev, i, 16);
mtk_wed_hw_init(dev);
mtk_wed_configure_irq(dev, irq_mask);
@@ -916,7 +916,7 @@ mtk_wed_tx_ring_setup(struct mtk_wed_device *dev, int idx, void __iomem *regs)
sizeof(*ring->desc)))
return -ENOMEM;
- if (mtk_wed_wdma_ring_setup(dev, idx, MTK_WED_WDMA_RING_SIZE))
+ if (mtk_wed_wdma_rx_ring_setup(dev, idx, MTK_WED_WDMA_RING_SIZE))
return -ENOMEM;
ring->reg_base = MTK_WED_RING_TX(idx);
diff --git a/include/linux/soc/mediatek/mtk_wed.h b/include/linux/soc/mediatek/mtk_wed.h
index 2cc2f1e43ba9..956978320f8b 100644
--- a/include/linux/soc/mediatek/mtk_wed.h
+++ b/include/linux/soc/mediatek/mtk_wed.h
@@ -7,6 +7,7 @@
#include <linux/pci.h>
#define MTK_WED_TX_QUEUES 2
+#define MTK_WED_RX_QUEUES 2
struct mtk_wed_hw;
struct mtk_wdma_desc;
@@ -66,7 +67,7 @@ struct mtk_wed_device {
struct mtk_wed_ring tx_ring[MTK_WED_TX_QUEUES];
struct mtk_wed_ring txfree_ring;
- struct mtk_wed_ring tx_wdma[MTK_WED_TX_QUEUES];
+ struct mtk_wed_ring rx_wdma[MTK_WED_RX_QUEUES];
struct {
int size;
--
2.38.1
next prev parent reply other threads:[~2022-11-05 22:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 22:36 [PATCH v4 net-next 0/8] introduce WED RX support to MT7986 SoC Lorenzo Bianconi
2022-11-05 22:36 ` [PATCH v4 net-next 1/8] arm64: dts: mediatek: mt7986: add support for RX Wireless Ethernet Dispatch Lorenzo Bianconi
2022-11-05 22:36 ` [PATCH v4 net-next 2/8] dt-bindings: net: mediatek: add WED RX binding for MT7986 eth driver Lorenzo Bianconi
2022-11-10 20:09 ` Rob Herring
2022-11-11 0:56 ` Lorenzo Bianconi
2022-11-05 22:36 ` [PATCH v4 net-next 3/8] net: ethernet: mtk_wed: introduce wed mcu support Lorenzo Bianconi
2022-11-05 22:36 ` [PATCH v4 net-next 4/8] net: ethernet: mtk_wed: introduce wed wo support Lorenzo Bianconi
2022-11-05 22:36 ` Lorenzo Bianconi [this message]
2022-11-05 22:36 ` [PATCH v4 net-next 6/8] net: ethernet: mtk_wed: add configure " Lorenzo Bianconi
2022-11-05 22:36 ` [PATCH v4 net-next 7/8] net: ethernet: mtk_wed: add rx mib counters Lorenzo Bianconi
2022-11-05 22:36 ` [PATCH v4 net-next 8/8] MAINTAINERS: update MEDIATEK ETHERNET entry Lorenzo Bianconi
2022-11-09 15:03 ` [PATCH v4 net-next 0/8] introduce WED RX support to MT7986 SoC Lorenzo Bianconi
2022-11-09 19:05 ` Jakub Kicinski
2022-11-09 19:24 ` Matthias Brugger
2022-11-09 19:26 ` Lorenzo Bianconi
2022-11-09 19:24 ` Lorenzo Bianconi
2022-11-10 5:33 ` Kalle Valo
2022-11-11 8:20 ` patchwork-bot+netdevbpf
2022-11-11 8:44 ` Matthias Brugger
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=e5ca37ab77ea54feac0f1c1bbf9edfa22117f18c.1667687249.git.lorenzo@kernel.org \
--to=lorenzo@kernel.org \
--cc=Bo.Jiao@mediatek.com \
--cc=Mark-MC.Lee@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=evelyn.tsai@mediatek.com \
--cc=john@phrozen.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=ryder.Lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=sujuan.chen@mediatek.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;
as well as URLs for NNTP newsgroup(s).