forked from openwrt/openwrt
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lantiq: replace patches with version accepted upstream
Replace recently added patches with version accepted upstream. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
- Loading branch information
Showing
5 changed files
with
116 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 7 additions & 5 deletions
12
...ake-a-burst-length-configurable-in-.patch → ...ake-the-burst-length-configurable-b.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
...ux/lantiq/patches-5.10/0711-v5.16-net-lantiq_xrx200-Hardcode-the-burst-length-value.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
From 7e553c44f09a8f536090904c6db5b8c9dbafa03b Mon Sep 17 00:00:00 2001 | ||
From: Aleksander Jan Bajkowski <olek2@wp.pl> | ||
Date: Tue, 26 Oct 2021 22:59:01 +0200 | ||
Subject: [PATCH] net: lantiq_xrx200: Hardcode the burst length value | ||
|
||
All SoCs with this IP core support 8 burst length. Hauke | ||
suggested to hardcode this value and simplify the driver. | ||
|
||
Link: https://lkml.org/lkml/2021/9/14/1533 | ||
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> | ||
Signed-off-by: David S. Miller <davem@davemloft.net> | ||
--- | ||
drivers/net/ethernet/lantiq_xrx200.c | 21 ++++----------------- | ||
1 file changed, 4 insertions(+), 17 deletions(-) | ||
|
||
--- a/drivers/net/ethernet/lantiq_xrx200.c | ||
+++ b/drivers/net/ethernet/lantiq_xrx200.c | ||
@@ -23,6 +23,7 @@ | ||
#define XRX200_DMA_DATA_LEN 0x600 | ||
#define XRX200_DMA_RX 0 | ||
#define XRX200_DMA_TX 1 | ||
+#define XRX200_DMA_BURST_LEN 8 | ||
|
||
/* cpu port mac */ | ||
#define PMAC_RX_IPG 0x0024 | ||
@@ -71,9 +72,6 @@ struct xrx200_priv { | ||
struct net_device *net_dev; | ||
struct device *dev; | ||
|
||
- int tx_burst_len; | ||
- int rx_burst_len; | ||
- | ||
__iomem void *pmac_reg; | ||
}; | ||
|
||
@@ -320,7 +318,7 @@ static netdev_tx_t xrx200_start_xmit(str | ||
goto err_drop; | ||
|
||
/* dma needs to start on a burst length value aligned address */ | ||
- byte_offset = mapping % (priv->tx_burst_len * 4); | ||
+ byte_offset = mapping % (XRX200_DMA_BURST_LEN * 4); | ||
|
||
desc->addr = mapping - byte_offset; | ||
/* Make sure the address is written before we give it to HW */ | ||
@@ -372,7 +370,8 @@ static int xrx200_dma_init(struct xrx200 | ||
int ret = 0; | ||
int i; | ||
|
||
- ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len); | ||
+ ltq_dma_init_port(DMA_PORT_ETOP, XRX200_DMA_BURST_LEN, | ||
+ XRX200_DMA_BURST_LEN); | ||
|
||
ch_rx->dma.nr = XRX200_DMA_RX; | ||
ch_rx->dma.dev = priv->dev; | ||
@@ -490,18 +489,6 @@ static int xrx200_probe(struct platform_ | ||
if (err) | ||
eth_hw_addr_random(net_dev); | ||
|
||
- err = device_property_read_u32(dev, "lantiq,tx-burst-length", &priv->tx_burst_len); | ||
- if (err < 0) { | ||
- dev_err(dev, "unable to read tx-burst-length property\n"); | ||
- return err; | ||
- } | ||
- | ||
- err = device_property_read_u32(dev, "lantiq,rx-burst-length", &priv->rx_burst_len); | ||
- if (err < 0) { | ||
- dev_err(dev, "unable to read rx-burst-length property\n"); | ||
- return err; | ||
- } | ||
- | ||
/* bring up the dma engine and IP core */ | ||
err = xrx200_dma_init(priv); | ||
if (err) |
26 changes: 26 additions & 0 deletions
26
...linux/lantiq/patches-5.10/0712-v5.16-net-ethernet-lantiq_etop-Fix-compilation-error.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 68eabc348148ae051631e8dab13c3b1a85c82896 Mon Sep 17 00:00:00 2001 | ||
From: Aleksander Jan Bajkowski <olek2@wp.pl> | ||
Date: Tue, 9 Nov 2021 23:23:54 +0100 | ||
Subject: [PATCH] net: ethernet: lantiq_etop: Fix compilation error | ||
|
||
This fixes the error detected when compiling the driver. | ||
|
||
Fixes: 14d4e308e0aa ("net: lantiq: configure the burst length in ethernet drivers") | ||
Reported-by: kernel test robot <lkp@intel.com> | ||
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> | ||
Signed-off-by: David S. Miller <davem@davemloft.net> | ||
--- | ||
drivers/net/ethernet/lantiq_etop.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/drivers/net/ethernet/lantiq_etop.c | ||
+++ b/drivers/net/ethernet/lantiq_etop.c | ||
@@ -402,7 +402,7 @@ ltq_etop_dma_init(struct net_device *dev | ||
int rx = priv->rx_irq - LTQ_DMA_ETOP; | ||
int err; | ||
|
||
- ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len); | ||
+ ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, priv->rx_burst_len); | ||
|
||
priv->txch.dma.nr = tx; | ||
priv->txch.dma.dev = &priv->pdev->dev; |