projects
/
openwrt
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kernel: bump 5.15 to 5.15.132
[openwrt/openwrt.git]
/
target
/
linux
/
generic
/
backport-5.15
/
702-v5.19-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
diff --git
a/target/linux/generic/backport-5.15/702-v5.19-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
b/target/linux/generic/backport-5.15/702-v5.19-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
index afd78fdda29930d1e48e6aff29179fb5d0b06c17..3e7612b0d90c17a9d8e1949a2431f98c6e957f0b 100644
(file)
--- a/
target/linux/generic/backport-5.15/702-v5.19-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
+++ b/
target/linux/generic/backport-5.15/702-v5.19-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
@@
-20,7
+20,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <linux/clk.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <linux/clk.h>
-@@ -8
39,7 +840
,7 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -8
40,7 +841
,7 @@ static int mtk_init_fq_dma(struct mtk_et
dma_addr_t dma_addr;
int i;
dma_addr_t dma_addr;
int i;
@@
-29,7
+29,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
cnt * sizeof(struct mtk_tx_dma),
ð->phy_scratch_ring,
GFP_ATOMIC);
cnt * sizeof(struct mtk_tx_dma),
ð->phy_scratch_ring,
GFP_ATOMIC);
-@@ -85
1,10 +852
,10 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -85
2,10 +853
,10 @@ static int mtk_init_fq_dma(struct mtk_et
if (unlikely(!eth->scratch_head))
return -ENOMEM;
if (unlikely(!eth->scratch_head))
return -ENOMEM;
@@
-42,7
+42,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
return -ENOMEM;
phy_ring_tail = eth->phy_scratch_ring +
return -ENOMEM;
phy_ring_tail = eth->phy_scratch_ring +
-@@ -90
8,26 +909
,26 @@ static void mtk_tx_unmap(struct mtk_eth
+@@ -90
9,26 +910
,26 @@ static void mtk_tx_unmap(struct mtk_eth
{
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
if (tx_buf->flags & MTK_TX_FLAGS_SINGLE0) {
{
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
if (tx_buf->flags & MTK_TX_FLAGS_SINGLE0) {
@@
-73,7
+73,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
dma_unmap_addr(tx_buf, dma_addr1),
dma_unmap_len(tx_buf, dma_len1),
DMA_TO_DEVICE);
dma_unmap_addr(tx_buf, dma_addr1),
dma_unmap_len(tx_buf, dma_len1),
DMA_TO_DEVICE);
-@@ -100
5,9 +1006
,9 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -100
6,9 +1007
,9 @@ static int mtk_tx_map(struct sk_buff *sk
if (skb_vlan_tag_present(skb))
txd4 |= TX_DMA_INS_VLAN | skb_vlan_tag_get(skb);
if (skb_vlan_tag_present(skb))
txd4 |= TX_DMA_INS_VLAN | skb_vlan_tag_get(skb);
@@
-85,7
+85,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
return -ENOMEM;
WRITE_ONCE(itxd->txd1, mapped_addr);
return -ENOMEM;
WRITE_ONCE(itxd->txd1, mapped_addr);
-@@ -104
6,10 +1047
,10 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -104
7,10 +1048
,10 @@ static int mtk_tx_map(struct sk_buff *sk
frag_map_size = min(frag_size, MTK_TX_DMA_BUF_LEN);
frag_map_size = min(frag_size, MTK_TX_DMA_BUF_LEN);
@@
-98,7
+98,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
goto err_dma;
if (i == nr_frags - 1 &&
goto err_dma;
if (i == nr_frags - 1 &&
-@@ -133
0,18 +1331
,18 @@ static int mtk_poll_rx(struct napi_struc
+@@ -133
1,18 +1332
,18 @@ static int mtk_poll_rx(struct napi_struc
netdev->stats.rx_dropped++;
goto release_desc;
}
netdev->stats.rx_dropped++;
goto release_desc;
}
@@
-120,7
+120,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->buf_size, DMA_FROM_DEVICE);
/* receive data */
ring->buf_size, DMA_FROM_DEVICE);
/* receive data */
-@@ -161
4,7 +1615
,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -161
5,7 +1616
,7 @@ static int mtk_tx_alloc(struct mtk_eth *
if (!ring->buf)
goto no_tx_mem;
if (!ring->buf)
goto no_tx_mem;
@@
-129,7
+129,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
&ring->phys, GFP_ATOMIC);
if (!ring->dma)
goto no_tx_mem;
&ring->phys, GFP_ATOMIC);
if (!ring->dma)
goto no_tx_mem;
-@@ -163
2,7 +1633
,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -163
3,7 +1634
,7 @@ static int mtk_tx_alloc(struct mtk_eth *
* descriptors in ring->dma_pdma.
*/
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
* descriptors in ring->dma_pdma.
*/
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
@@
-138,7
+138,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
&ring->phys_pdma,
GFP_ATOMIC);
if (!ring->dma_pdma)
&ring->phys_pdma,
GFP_ATOMIC);
if (!ring->dma_pdma)
-@@ -169
1,7 +1692
,7 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -169
2,7 +1693
,7 @@ static void mtk_tx_clean(struct mtk_eth
}
if (ring->dma) {
}
if (ring->dma) {
@@
-147,7
+147,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
MTK_DMA_SIZE * sizeof(*ring->dma),
ring->dma,
ring->phys);
MTK_DMA_SIZE * sizeof(*ring->dma),
ring->dma,
ring->phys);
-@@ -1
699,7 +1700
,7 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -1
700,7 +1701
,7 @@ static void mtk_tx_clean(struct mtk_eth
}
if (ring->dma_pdma) {
}
if (ring->dma_pdma) {
@@
-156,7
+156,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
MTK_DMA_SIZE * sizeof(*ring->dma_pdma),
ring->dma_pdma,
ring->phys_pdma);
MTK_DMA_SIZE * sizeof(*ring->dma_pdma),
ring->dma_pdma,
ring->phys_pdma);
-@@ -174
7,18 +1748
,18 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -174
8,18 +1749
,18 @@ static int mtk_rx_alloc(struct mtk_eth *
return -ENOMEM;
}
return -ENOMEM;
}
@@
-178,7
+178,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
return -ENOMEM;
ring->dma[i].rxd1 = (unsigned int)dma_addr;
return -ENOMEM;
ring->dma[i].rxd1 = (unsigned int)dma_addr;
-@@ -179
4,7 +1795
,7 @@ static void mtk_rx_clean(struct mtk_eth
+@@ -179
5,7 +1796
,7 @@ static void mtk_rx_clean(struct mtk_eth
continue;
if (!ring->dma[i].rxd1)
continue;
continue;
if (!ring->dma[i].rxd1)
continue;
@@
-187,7
+187,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->dma[i].rxd1,
ring->buf_size,
DMA_FROM_DEVICE);
ring->dma[i].rxd1,
ring->buf_size,
DMA_FROM_DEVICE);
-@@ -180
5,7 +1806
,7 @@ static void mtk_rx_clean(struct mtk_eth
+@@ -180
6,7 +1807
,7 @@ static void mtk_rx_clean(struct mtk_eth
}
if (ring->dma) {
}
if (ring->dma) {
@@
-196,7
+196,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->dma_size * sizeof(*ring->dma),
ring->dma,
ring->phys);
ring->dma_size * sizeof(*ring->dma),
ring->dma,
ring->phys);
-@@ -216
1,7 +2162
,7 @@ static void mtk_dma_free(struct mtk_eth
+@@ -216
5,7 +2166
,7 @@ static void mtk_dma_free(struct mtk_eth
if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) {
if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) {
@@
-205,7
+205,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
MTK_DMA_SIZE * sizeof(struct mtk_tx_dma),
eth->scratch_ring,
eth->phy_scratch_ring);
MTK_DMA_SIZE * sizeof(struct mtk_tx_dma),
eth->scratch_ring,
eth->phy_scratch_ring);
-@@ -251
1,6 +2512
,8 @@ static void mtk_dim_tx(struct work_struc
+@@ -251
7,6 +2518
,8 @@ static void mtk_dim_tx(struct work_struc
static int mtk_hw_init(struct mtk_eth *eth)
{
static int mtk_hw_init(struct mtk_eth *eth)
{
@@
-214,7
+214,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, ð->state))
int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, ð->state))
-@@ -252
3,6 +2526
,10 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -252
9,6 +2532
,10 @@ static int mtk_hw_init(struct mtk_eth *e
if (ret)
goto err_disable_pm;
if (ret)
goto err_disable_pm;
@@
-225,7
+225,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
ret = device_reset(eth->dev);
if (ret) {
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
ret = device_reset(eth->dev);
if (ret) {
-@@ -307
6,6 +3083
,35 @@ free_netdev:
+@@ -307
5,6 +3082
,35 @@ free_netdev:
return err;
}
return err;
}
@@
-261,7
+261,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_probe(struct platform_device *pdev)
{
struct device_node *mac_np;
static int mtk_probe(struct platform_device *pdev)
{
struct device_node *mac_np;
-@@ -308
9,6 +3125
,7 @@ static int mtk_probe(struct platform_dev
+@@ -308
8,6 +3124
,7 @@ static int mtk_probe(struct platform_dev
eth->soc = of_device_get_match_data(&pdev->dev);
eth->dev = &pdev->dev;
eth->soc = of_device_get_match_data(&pdev->dev);
eth->dev = &pdev->dev;
@@
-269,7
+269,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
eth->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(eth->base))
return PTR_ERR(eth->base);
eth->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(eth->base))
return PTR_ERR(eth->base);
-@@ -313
7,6 +3174
,16 @@ static int mtk_probe(struct platform_dev
+@@ -313
6,6 +3173
,16 @@ static int mtk_probe(struct platform_dev
}
}
}
}
@@
-288,7
+288,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
GFP_KERNEL);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
GFP_KERNEL);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -46
2,6 +462
,12 @@
+@@ -46
3,6 +463
,12 @@
#define RSTCTRL_FE BIT(6)
#define RSTCTRL_PPE BIT(31)
#define RSTCTRL_FE BIT(6)
#define RSTCTRL_PPE BIT(31)
@@
-301,7
+301,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* SGMII subsystem config registers */
/* Register to auto-negotiation restart */
#define SGMSYS_PCS_CONTROL_1 0x0
/* SGMII subsystem config registers */
/* Register to auto-negotiation restart */
#define SGMSYS_PCS_CONTROL_1 0x0
-@@ -8
79,6 +885
,7 @@ struct mtk_sgmii {
+@@ -8
80,6 +886
,7 @@ struct mtk_sgmii {
/* struct mtk_eth - This is the main datasructure for holding the state
* of the driver
* @dev: The device pointer
/* struct mtk_eth - This is the main datasructure for holding the state
* of the driver
* @dev: The device pointer
@@
-309,7
+309,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
* @base: The mapped register i/o base
* @page_lock: Make sure that register operations are atomic
* @tx_irq__lock: Make sure that IRQ register operations are atomic
* @base: The mapped register i/o base
* @page_lock: Make sure that register operations are atomic
* @tx_irq__lock: Make sure that IRQ register operations are atomic
-@@ -92
2,6 +929
,7 @@ struct mtk_sgmii {
+@@ -92
3,6 +930
,7 @@ struct mtk_sgmii {
struct mtk_eth {
struct device *dev;
struct mtk_eth {
struct device *dev;
@@
-317,7
+317,7
@@
Signed-off-by: Felix Fietkau <nbd@nbd.name>
void __iomem *base;
spinlock_t page_lock;
spinlock_t tx_irq_lock;
void __iomem *base;
spinlock_t page_lock;
spinlock_t tx_irq_lock;
-@@ -102
0,6 +1028
,7 @@ int mtk_gmac_rgmii_path_setup(struct mtk
+@@ -102
1,6 +1029
,7 @@ int mtk_gmac_rgmii_path_setup(struct mtk
int mtk_eth_offload_init(struct mtk_eth *eth);
int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type,
void *type_data);
int mtk_eth_offload_init(struct mtk_eth *eth);
int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type,
void *type_data);