* [PATCH v1 net-next] net: stmmac: Enable dwmac4 jumbo frame more than 8KiB
@ 2019-07-03 16:59 Voon Weifeng
2019-07-04 19:33 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Voon Weifeng @ 2019-07-03 16:59 UTC (permalink / raw)
To: David S. Miller, Maxime Coquelin
Cc: netdev, linux-kernel, Jose Abreu, Giuseppe Cavallaro,
Andrew Lunn, Alexandre Torgue, Ong Boon Leong, Voon Weifeng
From: Weifeng Voon <weifeng.voon@intel.com>
Enable GMAC v4.xx and beyond to support 16KiB buffer.
Signed-off-by: Weifeng Voon <weifeng.voon@intel.com>
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
index cf6436d3d6c7..dbde23e7e169 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
@@ -443,6 +443,15 @@ static void dwmac4_clear(struct dma_desc *p)
p->des3 = 0;
}
+static int set_16kib_bfsize(int mtu)
+{
+ int ret = 0;
+
+ if (unlikely(mtu >= BUF_SIZE_8KiB))
+ ret = BUF_SIZE_16KiB;
+ return ret;
+}
+
const struct stmmac_desc_ops dwmac4_desc_ops = {
.tx_status = dwmac4_wrback_get_tx_status,
.rx_status = dwmac4_wrback_get_rx_status,
@@ -469,4 +478,6 @@ static void dwmac4_clear(struct dma_desc *p)
.clear = dwmac4_clear,
};
-const struct stmmac_mode_ops dwmac4_ring_mode_ops = { };
+const struct stmmac_mode_ops dwmac4_ring_mode_ops = {
+ .set_16kib_bfsize = set_16kib_bfsize,
+};
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 net-next] net: stmmac: Enable dwmac4 jumbo frame more than 8KiB
2019-07-03 16:59 [PATCH v1 net-next] net: stmmac: Enable dwmac4 jumbo frame more than 8KiB Voon Weifeng
@ 2019-07-04 19:33 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-07-04 19:33 UTC (permalink / raw)
To: weifeng.voon
Cc: mcoquelin.stm32, netdev, linux-kernel, joabreu, peppe.cavallaro,
andrew, alexandre.torgue, boon.leong.ong
From: Voon Weifeng <weifeng.voon@intel.com>
Date: Thu, 4 Jul 2019 00:59:10 +0800
> From: Weifeng Voon <weifeng.voon@intel.com>
>
> Enable GMAC v4.xx and beyond to support 16KiB buffer.
>
> Signed-off-by: Weifeng Voon <weifeng.voon@intel.com>
> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-04 19:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-03 16:59 [PATCH v1 net-next] net: stmmac: Enable dwmac4 jumbo frame more than 8KiB Voon Weifeng
2019-07-04 19:33 ` David Miller
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).