kernel: bump 6.1 to 6.1.83 (#12036)

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.83

Manually rebased:
  mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch
  generic/pending-6.1/737-07-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
This commit is contained in:
Beginner 2024-03-29 10:21:13 +08:00 committed by GitHub
parent f56c9ece3c
commit bcd9f26694
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
86 changed files with 302 additions and 305 deletions

View File

@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .82 LINUX_VERSION-6.1 = .83
LINUX_KERNEL_HASH-6.1.82 = d150d2d9d416877668d8b56f75759f166168d192419eefaa942ed67225cbec06 LINUX_KERNEL_HASH-6.1.83 = 88b69611093613ce4494527685f833af0c31b986dcbeda7086f69f18f9e0b190

View File

@ -63,7 +63,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/gpio/Kconfig --- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig
@@ -1243,6 +1243,15 @@ config HTC_EGPIO @@ -1244,6 +1244,15 @@ config HTC_EGPIO
several HTC phones. It provides basic support for input several HTC phones. It provides basic support for input
pins, output pins, and IRQs. pins, output pins, and IRQs.

View File

@ -10,9 +10,9 @@ This reverts commit c0ea202fbc855d60bc4a0603ca52a9e80654b327.
--- a/drivers/usb/phy/phy-generic.c --- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c
@@ -265,13 +265,6 @@ int usb_phy_gen_create_phy(struct device @@ -272,13 +272,6 @@ int usb_phy_gen_create_phy(struct device
return -EPROBE_DEFER; return dev_err_probe(dev, PTR_ERR(nop->vbus_draw),
} "could not get vbus regulator\n");
- nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus"); - nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
- if (PTR_ERR(nop->vbus_draw) == -ENODEV) - if (PTR_ERR(nop->vbus_draw) == -ENODEV)

View File

@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4334,6 +4334,7 @@ static const struct mtk_soc_data mt7986_ @@ -4333,6 +4333,7 @@ static const struct mtk_soc_data mt7986_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7986_CLKS_BITMAP, .required_clks = MT7986_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View File

@ -12,7 +12,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3481,11 +3481,8 @@ static void mtk_pending_work(struct work @@ -3480,11 +3480,8 @@ static void mtk_pending_work(struct work
rtnl_lock(); rtnl_lock();
dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__); dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__);
@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
if (!eth->netdev[i]) if (!eth->netdev[i])
@@ -3519,7 +3516,7 @@ static void mtk_pending_work(struct work @@ -3518,7 +3515,7 @@ static void mtk_pending_work(struct work
dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__); dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__);

View File

@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3257,6 +3257,27 @@ static void mtk_set_mcr_max_rx(struct mt @@ -3256,6 +3256,27 @@ static void mtk_set_mcr_max_rx(struct mt
mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id)); mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
} }
@ -44,7 +44,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static int mtk_hw_init(struct mtk_eth *eth) static int mtk_hw_init(struct mtk_eth *eth)
{ {
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
@@ -3296,22 +3317,9 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3295,22 +3316,9 @@ static int mtk_hw_init(struct mtk_eth *e
return 0; return 0;
} }

View File

@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3278,7 +3278,54 @@ static void mtk_hw_reset(struct mtk_eth @@ -3277,7 +3277,54 @@ static void mtk_hw_reset(struct mtk_eth
0x3ffffff); 0x3ffffff);
} }
@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
{ {
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
ETHSYS_DMA_AG_MAP_PPE; ETHSYS_DMA_AG_MAP_PPE;
@@ -3317,7 +3364,12 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3316,7 +3363,12 @@ static int mtk_hw_init(struct mtk_eth *e
return 0; return 0;
} }
@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
/* Set FE to PDMAv2 if necessary */ /* Set FE to PDMAv2 if necessary */
@@ -3508,7 +3560,7 @@ static void mtk_pending_work(struct work @@ -3507,7 +3559,7 @@ static void mtk_pending_work(struct work
if (eth->dev->pins) if (eth->dev->pins)
pinctrl_select_state(eth->dev->pins->p, pinctrl_select_state(eth->dev->pins->p,
eth->dev->pins->default_state); eth->dev->pins->default_state);
@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* restart DMA and enable IRQs */ /* restart DMA and enable IRQs */
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@@ -4110,7 +4162,7 @@ static int mtk_probe(struct platform_dev @@ -4109,7 +4161,7 @@ static int mtk_probe(struct platform_dev
eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE); eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
INIT_WORK(&eth->pending_work, mtk_pending_work); INIT_WORK(&eth->pending_work, mtk_pending_work);

View File

@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2845,14 +2845,29 @@ static void mtk_dma_free(struct mtk_eth @@ -2844,14 +2844,29 @@ static void mtk_dma_free(struct mtk_eth
kfree(eth->scratch_head); kfree(eth->scratch_head);
} }
@ -48,7 +48,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
schedule_work(&eth->pending_work); schedule_work(&eth->pending_work);
} }
@@ -3332,15 +3347,17 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3331,15 +3346,17 @@ static int mtk_hw_init(struct mtk_eth *e
const struct mtk_reg_map *reg_map = eth->soc->reg_map; const struct mtk_reg_map *reg_map = eth->soc->reg_map;
int i, val, ret; int i, val, ret;
@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (eth->ethsys) if (eth->ethsys)
regmap_update_bits(eth->ethsys, ETHSYS_DMA_AG_MAP, dma_mask, regmap_update_bits(eth->ethsys, ETHSYS_DMA_AG_MAP, dma_mask,
@@ -3469,8 +3486,10 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3468,8 +3485,10 @@ static int mtk_hw_init(struct mtk_eth *e
return 0; return 0;
err_disable_pm: err_disable_pm:
@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return ret; return ret;
} }
@@ -3532,30 +3551,53 @@ static int mtk_do_ioctl(struct net_devic @@ -3531,30 +3550,53 @@ static int mtk_do_ioctl(struct net_devic
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (eth->dev->pins) if (eth->dev->pins)
pinctrl_select_state(eth->dev->pins->p, pinctrl_select_state(eth->dev->pins->p,
@@ -3566,15 +3608,19 @@ static void mtk_pending_work(struct work @@ -3565,15 +3607,19 @@ static void mtk_pending_work(struct work
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
if (!test_bit(i, &restart)) if (!test_bit(i, &restart))
continue; continue;

View File

@ -49,7 +49,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
}; };
/* strings used by ethtool */ /* strings used by ethtool */
@@ -3340,6 +3346,102 @@ static void mtk_hw_warm_reset(struct mtk @@ -3339,6 +3345,102 @@ static void mtk_hw_warm_reset(struct mtk
val, rst_mask); val, rst_mask);
} }
@ -152,7 +152,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static int mtk_hw_init(struct mtk_eth *eth, bool reset) static int mtk_hw_init(struct mtk_eth *eth, bool reset)
{ {
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
@@ -3658,6 +3760,7 @@ static int mtk_cleanup(struct mtk_eth *e @@ -3657,6 +3759,7 @@ static int mtk_cleanup(struct mtk_eth *e
mtk_unreg_dev(eth); mtk_unreg_dev(eth);
mtk_free_dev(eth); mtk_free_dev(eth);
cancel_work_sync(&eth->pending_work); cancel_work_sync(&eth->pending_work);
@ -160,7 +160,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return 0; return 0;
} }
@@ -4095,6 +4198,7 @@ static int mtk_probe(struct platform_dev @@ -4094,6 +4197,7 @@ static int mtk_probe(struct platform_dev
eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE; eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
INIT_WORK(&eth->rx_dim.work, mtk_dim_rx); INIT_WORK(&eth->rx_dim.work, mtk_dim_rx);
@ -168,7 +168,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE; eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
INIT_WORK(&eth->tx_dim.work, mtk_dim_tx); INIT_WORK(&eth->tx_dim.work, mtk_dim_tx);
@@ -4297,6 +4401,8 @@ static int mtk_probe(struct platform_dev @@ -4296,6 +4400,8 @@ static int mtk_probe(struct platform_dev
netif_napi_add(&eth->dummy_dev, &eth->rx_napi, mtk_napi_rx); netif_napi_add(&eth->dummy_dev, &eth->rx_napi, mtk_napi_rx);
platform_set_drvdata(pdev, eth); platform_set_drvdata(pdev, eth);

View File

@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3689,6 +3689,11 @@ static void mtk_pending_work(struct work @@ -3688,6 +3688,11 @@ static void mtk_pending_work(struct work
set_bit(MTK_RESETTING, &eth->state); set_bit(MTK_RESETTING, &eth->state);
mtk_prepare_for_reset(eth); mtk_prepare_for_reset(eth);
@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@@ -3726,6 +3731,8 @@ static void mtk_pending_work(struct work @@ -3725,6 +3730,8 @@ static void mtk_pending_work(struct work
clear_bit(MTK_RESETTING, &eth->state); clear_bit(MTK_RESETTING, &eth->state);

View File

@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -945,7 +945,7 @@ static int mtk_init_fq_dma(struct mtk_et @@ -944,7 +944,7 @@ static int mtk_init_fq_dma(struct mtk_et
{ {
const struct mtk_soc_data *soc = eth->soc; const struct mtk_soc_data *soc = eth->soc;
dma_addr_t phy_ring_tail; dma_addr_t phy_ring_tail;
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
dma_addr_t dma_addr; dma_addr_t dma_addr;
int i; int i;
@@ -2209,19 +2209,25 @@ static int mtk_tx_alloc(struct mtk_eth * @@ -2208,19 +2208,25 @@ static int mtk_tx_alloc(struct mtk_eth *
struct mtk_tx_ring *ring = &eth->tx_ring; struct mtk_tx_ring *ring = &eth->tx_ring;
int i, sz = soc->txrx.txd_size; int i, sz = soc->txrx.txd_size;
struct mtk_tx_dma_v2 *txd; struct mtk_tx_dma_v2 *txd;
@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
u32 next_ptr = ring->phys + next * sz; u32 next_ptr = ring->phys + next * sz;
txd = ring->dma + i * sz; txd = ring->dma + i * sz;
@@ -2241,22 +2247,22 @@ static int mtk_tx_alloc(struct mtk_eth * @@ -2240,22 +2246,22 @@ static int mtk_tx_alloc(struct mtk_eth *
* descriptors in ring->dma_pdma. * descriptors in ring->dma_pdma.
*/ */
if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->thresh = MAX_SKB_FRAGS; ring->thresh = MAX_SKB_FRAGS;
/* make sure that all changes to the dma ring are flushed before we /* make sure that all changes to the dma ring are flushed before we
@@ -2268,14 +2274,14 @@ static int mtk_tx_alloc(struct mtk_eth * @@ -2267,14 +2273,14 @@ static int mtk_tx_alloc(struct mtk_eth *
mtk_w32(eth, ring->phys, soc->reg_map->qdma.ctx_ptr); mtk_w32(eth, ring->phys, soc->reg_map->qdma.ctx_ptr);
mtk_w32(eth, ring->phys, soc->reg_map->qdma.dtx_ptr); mtk_w32(eth, ring->phys, soc->reg_map->qdma.dtx_ptr);
mtk_w32(eth, mtk_w32(eth,
@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
mtk_w32(eth, 0, MT7628_TX_CTX_IDX0); mtk_w32(eth, 0, MT7628_TX_CTX_IDX0);
mtk_w32(eth, MT7628_PST_DTX_IDX0, soc->reg_map->pdma.rst_idx); mtk_w32(eth, MT7628_PST_DTX_IDX0, soc->reg_map->pdma.rst_idx);
} }
@@ -2293,7 +2299,7 @@ static void mtk_tx_clean(struct mtk_eth @@ -2292,7 +2298,7 @@ static void mtk_tx_clean(struct mtk_eth
int i; int i;
if (ring->buf) { if (ring->buf) {
@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
mtk_tx_unmap(eth, &ring->buf[i], NULL, false); mtk_tx_unmap(eth, &ring->buf[i], NULL, false);
kfree(ring->buf); kfree(ring->buf);
ring->buf = NULL; ring->buf = NULL;
@@ -2301,14 +2307,14 @@ static void mtk_tx_clean(struct mtk_eth @@ -2300,14 +2306,14 @@ static void mtk_tx_clean(struct mtk_eth
if (ring->dma) { if (ring->dma) {
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,
@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->dma_pdma, ring->phys_pdma); ring->dma_pdma, ring->phys_pdma);
ring->dma_pdma = NULL; ring->dma_pdma = NULL;
} }
@@ -2833,7 +2839,7 @@ static void mtk_dma_free(struct mtk_eth @@ -2832,7 +2838,7 @@ static void mtk_dma_free(struct mtk_eth
netdev_reset_queue(eth->netdev[i]); netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) { if (eth->scratch_ring) {
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,

View File

@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4480,7 +4480,7 @@ static const struct mtk_soc_data mt7621_ @@ -4479,7 +4479,7 @@ static const struct mtk_soc_data mt7621_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP, .required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
@@ -4519,7 +4519,7 @@ static const struct mtk_soc_data mt7623_ @@ -4518,7 +4518,7 @@ static const struct mtk_soc_data mt7623_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,

View File

@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}, },
.gdm1_cnt = 0x1c00, .gdm1_cnt = 0x1c00,
.gdma_to_ppe = 0x3333, .gdma_to_ppe = 0x3333,
@@ -620,6 +624,75 @@ static void mtk_mac_link_down(struct phy @@ -619,6 +623,75 @@ static void mtk_mac_link_down(struct phy
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
} }
@ -130,7 +130,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static void mtk_mac_link_up(struct phylink_config *config, static void mtk_mac_link_up(struct phylink_config *config,
struct phy_device *phy, struct phy_device *phy,
unsigned int mode, phy_interface_t interface, unsigned int mode, phy_interface_t interface,
@@ -645,6 +718,8 @@ static void mtk_mac_link_up(struct phyli @@ -644,6 +717,8 @@ static void mtk_mac_link_up(struct phyli
break; break;
} }
@ -139,7 +139,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Configure duplex */ /* Configure duplex */
if (duplex == DUPLEX_FULL) if (duplex == DUPLEX_FULL)
mcr |= MAC_MCR_FORCE_DPX; mcr |= MAC_MCR_FORCE_DPX;
@@ -1106,7 +1181,8 @@ static void mtk_tx_set_dma_desc_v1(struc @@ -1105,7 +1180,8 @@ static void mtk_tx_set_dma_desc_v1(struc
WRITE_ONCE(desc->txd1, info->addr); WRITE_ONCE(desc->txd1, info->addr);
@ -149,7 +149,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (info->last) if (info->last)
data |= TX_DMA_LS0; data |= TX_DMA_LS0;
WRITE_ONCE(desc->txd3, data); WRITE_ONCE(desc->txd3, data);
@@ -1140,9 +1216,6 @@ static void mtk_tx_set_dma_desc_v2(struc @@ -1139,9 +1215,6 @@ static void mtk_tx_set_dma_desc_v2(struc
data |= TX_DMA_LS0; data |= TX_DMA_LS0;
WRITE_ONCE(desc->txd3, data); WRITE_ONCE(desc->txd3, data);
@ -159,7 +159,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
data = (mac->id + 1) << TX_DMA_FPORT_SHIFT_V2; /* forward port */ data = (mac->id + 1) << TX_DMA_FPORT_SHIFT_V2; /* forward port */
data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid);
WRITE_ONCE(desc->txd4, data); WRITE_ONCE(desc->txd4, data);
@@ -1186,11 +1259,12 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1185,11 +1258,12 @@ static int mtk_tx_map(struct sk_buff *sk
.gso = gso, .gso = gso,
.csum = skb->ip_summed == CHECKSUM_PARTIAL, .csum = skb->ip_summed == CHECKSUM_PARTIAL,
.vlan = skb_vlan_tag_present(skb), .vlan = skb_vlan_tag_present(skb),
@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct mtk_mac *mac = netdev_priv(dev); struct mtk_mac *mac = netdev_priv(dev);
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
const struct mtk_soc_data *soc = eth->soc; const struct mtk_soc_data *soc = eth->soc;
@@ -1198,8 +1272,10 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1197,8 +1271,10 @@ static int mtk_tx_map(struct sk_buff *sk
struct mtk_tx_dma *itxd_pdma, *txd_pdma; struct mtk_tx_dma *itxd_pdma, *txd_pdma;
struct mtk_tx_buf *itx_buf, *tx_buf; struct mtk_tx_buf *itx_buf, *tx_buf;
int i, n_desc = 1; int i, n_desc = 1;
@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
itxd = ring->next_free; itxd = ring->next_free;
itxd_pdma = qdma_to_pdma(ring, itxd); itxd_pdma = qdma_to_pdma(ring, itxd);
if (itxd == ring->last_free) if (itxd == ring->last_free)
@@ -1248,7 +1324,7 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1247,7 +1323,7 @@ static int mtk_tx_map(struct sk_buff *sk
memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
txd_info.size = min_t(unsigned int, frag_size, txd_info.size = min_t(unsigned int, frag_size,
soc->txrx.dma_max_len); soc->txrx.dma_max_len);
@ -193,7 +193,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 && txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 &&
!(frag_size - txd_info.size); !(frag_size - txd_info.size);
txd_info.addr = skb_frag_dma_map(eth->dma_dev, frag, txd_info.addr = skb_frag_dma_map(eth->dma_dev, frag,
@@ -1287,7 +1363,7 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1286,7 +1362,7 @@ static int mtk_tx_map(struct sk_buff *sk
txd_pdma->txd2 |= TX_DMA_LS1; txd_pdma->txd2 |= TX_DMA_LS1;
} }
@ -202,7 +202,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
skb_tx_timestamp(skb); skb_tx_timestamp(skb);
ring->next_free = mtk_qdma_phys_to_virt(ring, txd->txd2); ring->next_free = mtk_qdma_phys_to_virt(ring, txd->txd2);
@@ -1299,8 +1375,7 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1298,8 +1374,7 @@ static int mtk_tx_map(struct sk_buff *sk
wmb(); wmb();
if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
@ -212,7 +212,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
mtk_w32(eth, txd->txd2, soc->reg_map->qdma.ctx_ptr); mtk_w32(eth, txd->txd2, soc->reg_map->qdma.ctx_ptr);
} else { } else {
int next_idx; int next_idx;
@@ -1369,7 +1444,7 @@ static void mtk_wake_queue(struct mtk_et @@ -1368,7 +1443,7 @@ static void mtk_wake_queue(struct mtk_et
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
if (!eth->netdev[i]) if (!eth->netdev[i])
continue; continue;
@ -221,7 +221,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
} }
@@ -1393,7 +1468,7 @@ static netdev_tx_t mtk_start_xmit(struct @@ -1392,7 +1467,7 @@ static netdev_tx_t mtk_start_xmit(struct
tx_num = mtk_cal_txd_req(eth, skb); tx_num = mtk_cal_txd_req(eth, skb);
if (unlikely(atomic_read(&ring->free_count) <= tx_num)) { if (unlikely(atomic_read(&ring->free_count) <= tx_num)) {
@ -230,7 +230,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
netif_err(eth, tx_queued, dev, netif_err(eth, tx_queued, dev,
"Tx Ring full when queue awake!\n"); "Tx Ring full when queue awake!\n");
spin_unlock(&eth->page_lock); spin_unlock(&eth->page_lock);
@@ -1419,7 +1494,7 @@ static netdev_tx_t mtk_start_xmit(struct @@ -1418,7 +1493,7 @@ static netdev_tx_t mtk_start_xmit(struct
goto drop; goto drop;
if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) if (unlikely(atomic_read(&ring->free_count) <= ring->thresh))
@ -239,7 +239,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
spin_unlock(&eth->page_lock); spin_unlock(&eth->page_lock);
@@ -1586,10 +1661,12 @@ static int mtk_xdp_submit_frame(struct m @@ -1585,10 +1660,12 @@ static int mtk_xdp_submit_frame(struct m
struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf); struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf);
const struct mtk_soc_data *soc = eth->soc; const struct mtk_soc_data *soc = eth->soc;
struct mtk_tx_ring *ring = &eth->tx_ring; struct mtk_tx_ring *ring = &eth->tx_ring;
@ -252,7 +252,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}; };
int err, index = 0, n_desc = 1, nr_frags; int err, index = 0, n_desc = 1, nr_frags;
struct mtk_tx_buf *htx_buf, *tx_buf; struct mtk_tx_buf *htx_buf, *tx_buf;
@@ -1639,6 +1716,7 @@ static int mtk_xdp_submit_frame(struct m @@ -1638,6 +1715,7 @@ static int mtk_xdp_submit_frame(struct m
memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
txd_info.size = skb_frag_size(&sinfo->frags[index]); txd_info.size = skb_frag_size(&sinfo->frags[index]);
txd_info.last = index + 1 == nr_frags; txd_info.last = index + 1 == nr_frags;
@ -260,7 +260,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
data = skb_frag_address(&sinfo->frags[index]); data = skb_frag_address(&sinfo->frags[index]);
index++; index++;
@@ -1993,8 +2071,46 @@ rx_done: @@ -1992,8 +2070,46 @@ rx_done:
return done; return done;
} }
@ -308,7 +308,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
{ {
const struct mtk_reg_map *reg_map = eth->soc->reg_map; const struct mtk_reg_map *reg_map = eth->soc->reg_map;
struct mtk_tx_ring *ring = &eth->tx_ring; struct mtk_tx_ring *ring = &eth->tx_ring;
@@ -2026,12 +2142,9 @@ static int mtk_poll_tx_qdma(struct mtk_e @@ -2025,12 +2141,9 @@ static int mtk_poll_tx_qdma(struct mtk_e
break; break;
if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) { if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) {
@ -323,7 +323,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
budget--; budget--;
} }
mtk_tx_unmap(eth, tx_buf, &bq, true); mtk_tx_unmap(eth, tx_buf, &bq, true);
@@ -2050,7 +2163,7 @@ static int mtk_poll_tx_qdma(struct mtk_e @@ -2049,7 +2162,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
} }
static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget, static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget,
@ -332,7 +332,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
{ {
struct mtk_tx_ring *ring = &eth->tx_ring; struct mtk_tx_ring *ring = &eth->tx_ring;
struct mtk_tx_buf *tx_buf; struct mtk_tx_buf *tx_buf;
@@ -2068,12 +2181,8 @@ static int mtk_poll_tx_pdma(struct mtk_e @@ -2067,12 +2180,8 @@ static int mtk_poll_tx_pdma(struct mtk_e
break; break;
if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) { if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) {
@ -347,7 +347,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
budget--; budget--;
} }
mtk_tx_unmap(eth, tx_buf, &bq, true); mtk_tx_unmap(eth, tx_buf, &bq, true);
@@ -2095,26 +2204,15 @@ static int mtk_poll_tx(struct mtk_eth *e @@ -2094,26 +2203,15 @@ static int mtk_poll_tx(struct mtk_eth *e
{ {
struct mtk_tx_ring *ring = &eth->tx_ring; struct mtk_tx_ring *ring = &eth->tx_ring;
struct dim_sample dim_sample = {}; struct dim_sample dim_sample = {};
@ -379,7 +379,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
dim_update_sample(eth->tx_events, eth->tx_packets, eth->tx_bytes, dim_update_sample(eth->tx_events, eth->tx_packets, eth->tx_bytes,
&dim_sample); &dim_sample);
@@ -2124,7 +2222,7 @@ static int mtk_poll_tx(struct mtk_eth *e @@ -2123,7 +2221,7 @@ static int mtk_poll_tx(struct mtk_eth *e
(atomic_read(&ring->free_count) > ring->thresh)) (atomic_read(&ring->free_count) > ring->thresh))
mtk_wake_queue(eth); mtk_wake_queue(eth);
@ -388,7 +388,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
static void mtk_handle_status_irq(struct mtk_eth *eth) static void mtk_handle_status_irq(struct mtk_eth *eth)
@@ -2210,6 +2308,7 @@ static int mtk_tx_alloc(struct mtk_eth * @@ -2209,6 +2307,7 @@ static int mtk_tx_alloc(struct mtk_eth *
int i, sz = soc->txrx.txd_size; int i, sz = soc->txrx.txd_size;
struct mtk_tx_dma_v2 *txd; struct mtk_tx_dma_v2 *txd;
int ring_size; int ring_size;
@ -396,7 +396,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) if (MTK_HAS_CAPS(soc->caps, MTK_QDMA))
ring_size = MTK_QDMA_RING_SIZE; ring_size = MTK_QDMA_RING_SIZE;
@@ -2277,8 +2376,25 @@ static int mtk_tx_alloc(struct mtk_eth * @@ -2276,8 +2375,25 @@ static int mtk_tx_alloc(struct mtk_eth *
ring->phys + ((ring_size - 1) * sz), ring->phys + ((ring_size - 1) * sz),
soc->reg_map->qdma.crx_ptr); soc->reg_map->qdma.crx_ptr);
mtk_w32(eth, ring->last_free_ptr, soc->reg_map->qdma.drx_ptr); mtk_w32(eth, ring->last_free_ptr, soc->reg_map->qdma.drx_ptr);
@ -424,7 +424,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} else { } else {
mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0); mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0);
mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0); mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0);
@@ -2963,7 +3079,7 @@ static int mtk_start_dma(struct mtk_eth @@ -2962,7 +3078,7 @@ static int mtk_start_dma(struct mtk_eth
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2))
val |= MTK_MUTLI_CNT | MTK_RESV_BUF | val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
@ -433,7 +433,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
else else
val |= MTK_RX_BT_32DWORDS; val |= MTK_RX_BT_32DWORDS;
mtk_w32(eth, val, reg_map->qdma.glo_cfg); mtk_w32(eth, val, reg_map->qdma.glo_cfg);
@@ -3009,6 +3125,45 @@ static void mtk_gdm_config(struct mtk_et @@ -3008,6 +3124,45 @@ static void mtk_gdm_config(struct mtk_et
mtk_w32(eth, 0, MTK_RST_GL); mtk_w32(eth, 0, MTK_RST_GL);
} }
@ -479,7 +479,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_open(struct net_device *dev) static int mtk_open(struct net_device *dev)
{ {
struct mtk_mac *mac = netdev_priv(dev); struct mtk_mac *mac = netdev_priv(dev);
@@ -3051,7 +3206,8 @@ static int mtk_open(struct net_device *d @@ -3050,7 +3205,8 @@ static int mtk_open(struct net_device *d
refcount_inc(&eth->dma_refcnt); refcount_inc(&eth->dma_refcnt);
phylink_start(mac->phylink); phylink_start(mac->phylink);
@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3760,8 +3916,12 @@ static int mtk_unreg_dev(struct mtk_eth @@ -3759,8 +3915,12 @@ static int mtk_unreg_dev(struct mtk_eth
int i; int i;
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
unregister_netdev(eth->netdev[i]); unregister_netdev(eth->netdev[i]);
} }
@@ -3978,6 +4138,23 @@ static int mtk_set_rxnfc(struct net_devi @@ -3977,6 +4137,23 @@ static int mtk_set_rxnfc(struct net_devi
return ret; return ret;
} }
@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static const struct ethtool_ops mtk_ethtool_ops = { static const struct ethtool_ops mtk_ethtool_ops = {
.get_link_ksettings = mtk_get_link_ksettings, .get_link_ksettings = mtk_get_link_ksettings,
.set_link_ksettings = mtk_set_link_ksettings, .set_link_ksettings = mtk_set_link_ksettings,
@@ -4012,6 +4189,7 @@ static const struct net_device_ops mtk_n @@ -4011,6 +4188,7 @@ static const struct net_device_ops mtk_n
.ndo_setup_tc = mtk_eth_setup_tc, .ndo_setup_tc = mtk_eth_setup_tc,
.ndo_bpf = mtk_xdp, .ndo_bpf = mtk_xdp,
.ndo_xdp_xmit = mtk_xdp_xmit, .ndo_xdp_xmit = mtk_xdp_xmit,
@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}; };
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
@@ -4021,6 +4199,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4020,6 +4198,7 @@ static int mtk_add_mac(struct mtk_eth *e
struct phylink *phylink; struct phylink *phylink;
struct mtk_mac *mac; struct mtk_mac *mac;
int id, err; int id, err;
@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!_id) { if (!_id) {
dev_err(eth->dev, "missing mac id\n"); dev_err(eth->dev, "missing mac id\n");
@@ -4038,7 +4217,10 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4037,7 +4216,10 @@ static int mtk_add_mac(struct mtk_eth *e
return -EINVAL; return -EINVAL;
} }
@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!eth->netdev[id]) { if (!eth->netdev[id]) {
dev_err(eth->dev, "alloc_etherdev failed\n"); dev_err(eth->dev, "alloc_etherdev failed\n");
return -ENOMEM; return -ENOMEM;
@@ -4146,6 +4328,11 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4145,6 +4327,11 @@ static int mtk_add_mac(struct mtk_eth *e
else else
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN; eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;

View File

@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include "mtk_eth_soc.h" #include "mtk_eth_soc.h"
#include "mtk_wed.h" #include "mtk_wed.h"
@@ -2022,16 +2023,22 @@ static int mtk_poll_rx(struct napi_struc @@ -2021,16 +2022,22 @@ static int mtk_poll_rx(struct napi_struc
htons(RX_DMA_VPID(trxd.rxd4)), htons(RX_DMA_VPID(trxd.rxd4)),
RX_DMA_VID(trxd.rxd4)); RX_DMA_VID(trxd.rxd4));
} else if (trxd.rxd2 & RX_DMA_VTAG) { } else if (trxd.rxd2 & RX_DMA_VTAG) {
@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
skb_record_rx_queue(skb, 0); skb_record_rx_queue(skb, 0);
@@ -2859,15 +2866,30 @@ static netdev_features_t mtk_fix_feature @@ -2858,15 +2865,30 @@ static netdev_features_t mtk_fix_feature
static int mtk_set_features(struct net_device *dev, netdev_features_t features) static int mtk_set_features(struct net_device *dev, netdev_features_t features)
{ {
@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
/* wait for DMA to finish whatever it is doing before we start using it again */ /* wait for DMA to finish whatever it is doing before we start using it again */
@@ -3164,11 +3186,45 @@ found: @@ -3163,11 +3185,45 @@ found:
return NOTIFY_DONE; return NOTIFY_DONE;
} }
@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
if (err) { if (err) {
@@ -3689,6 +3745,10 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3688,6 +3744,10 @@ static int mtk_hw_init(struct mtk_eth *e
*/ */
val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Enable RX VLan Offloading */ /* Enable RX VLan Offloading */
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
@@ -3908,6 +3968,12 @@ static int mtk_free_dev(struct mtk_eth * @@ -3907,6 +3967,12 @@ static int mtk_free_dev(struct mtk_eth *
free_netdev(eth->netdev[i]); free_netdev(eth->netdev[i]);
} }

View File

@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3202,7 +3202,8 @@ static int mtk_open(struct net_device *d @@ -3201,7 +3201,8 @@ static int mtk_open(struct net_device *d
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
int i, err; int i, err;
@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
struct metadata_dst *md_dst = eth->dsa_meta[i]; struct metadata_dst *md_dst = eth->dsa_meta[i];
@@ -3219,7 +3220,8 @@ static int mtk_open(struct net_device *d @@ -3218,7 +3219,8 @@ static int mtk_open(struct net_device *d
} }
} else { } else {
/* Hardware special tag parsing needs to be disabled if at least /* Hardware special tag parsing needs to be disabled if at least

View File

@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3137,7 +3137,7 @@ static void mtk_gdm_config(struct mtk_et @@ -3136,7 +3136,7 @@ static void mtk_gdm_config(struct mtk_et
val |= config; val |= config;
@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
val |= MTK_GDMA_SPECIAL_TAG; val |= MTK_GDMA_SPECIAL_TAG;
mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i)); mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i));
@@ -3202,8 +3202,7 @@ static int mtk_open(struct net_device *d @@ -3201,8 +3201,7 @@ static int mtk_open(struct net_device *d
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
int i, err; int i, err;
@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
struct metadata_dst *md_dst = eth->dsa_meta[i]; struct metadata_dst *md_dst = eth->dsa_meta[i];
@@ -3220,8 +3219,7 @@ static int mtk_open(struct net_device *d @@ -3219,8 +3218,7 @@ static int mtk_open(struct net_device *d
} }
} else { } else {
/* Hardware special tag parsing needs to be disabled if at least /* Hardware special tag parsing needs to be disabled if at least

View File

@ -77,7 +77,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1878,7 +1878,9 @@ static int mtk_poll_rx(struct napi_struc @@ -1877,7 +1877,9 @@ static int mtk_poll_rx(struct napi_struc
while (done < budget) { while (done < budget) {
unsigned int pktlen, *rxdcsum; unsigned int pktlen, *rxdcsum;
@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dma_addr_t dma_addr; dma_addr_t dma_addr;
u32 hash, reason; u32 hash, reason;
int mac = 0; int mac = 0;
@@ -2018,27 +2020,29 @@ static int mtk_poll_rx(struct napi_struc @@ -2017,27 +2019,29 @@ static int mtk_poll_rx(struct napi_struc
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) { if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) {
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {

View File

@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -719,8 +719,6 @@ static void mtk_mac_link_up(struct phyli @@ -718,8 +718,6 @@ static void mtk_mac_link_up(struct phyli
break; break;
} }

View File

@ -51,7 +51,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mtk_eth_path_name(path), __func__, updated); mtk_eth_path_name(path), __func__, updated);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4804,6 +4804,26 @@ static const struct mtk_soc_data mt7629_ @@ -4803,6 +4803,26 @@ static const struct mtk_soc_data mt7629_
}, },
}; };
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static const struct mtk_soc_data mt7986_data = { static const struct mtk_soc_data mt7986_data = {
.reg_map = &mt7986_reg_map, .reg_map = &mt7986_reg_map,
.ana_rgc3 = 0x128, .ana_rgc3 = 0x128,
@@ -4846,6 +4866,7 @@ const struct of_device_id of_mtk_match[] @@ -4845,6 +4865,7 @@ const struct of_device_id of_mtk_match[]
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data}, { .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data}, { .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data}, { .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},

View File

@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -745,8 +745,10 @@ static const struct phylink_mac_ops mtk_ @@ -744,8 +744,10 @@ static const struct phylink_mac_ops mtk_
static int mtk_mdio_init(struct mtk_eth *eth) static int mtk_mdio_init(struct mtk_eth *eth)
{ {
@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mii_np = of_get_child_by_name(eth->dev->of_node, "mdio-bus"); mii_np = of_get_child_by_name(eth->dev->of_node, "mdio-bus");
if (!mii_np) { if (!mii_np) {
@@ -773,6 +775,25 @@ static int mtk_mdio_init(struct mtk_eth @@ -772,6 +774,25 @@ static int mtk_mdio_init(struct mtk_eth
eth->mii_bus->parent = eth->dev; eth->mii_bus->parent = eth->dev;
snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np); snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);

View File

@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
return NULL; return NULL;
@@ -4017,8 +4018,17 @@ static int mtk_unreg_dev(struct mtk_eth @@ -4016,8 +4017,17 @@ static int mtk_unreg_dev(struct mtk_eth
return 0; return 0;
} }
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mtk_unreg_dev(eth); mtk_unreg_dev(eth);
mtk_free_dev(eth); mtk_free_dev(eth);
cancel_work_sync(&eth->pending_work); cancel_work_sync(&eth->pending_work);
@@ -4458,6 +4468,36 @@ void mtk_eth_set_dma_device(struct mtk_e @@ -4457,6 +4467,36 @@ void mtk_eth_set_dma_device(struct mtk_e
rtnl_unlock(); rtnl_unlock();
} }
@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int mtk_probe(struct platform_device *pdev) static int mtk_probe(struct platform_device *pdev)
{ {
struct resource *res = NULL; struct resource *res = NULL;
@@ -4521,13 +4561,7 @@ static int mtk_probe(struct platform_dev @@ -4520,13 +4560,7 @@ static int mtk_probe(struct platform_dev
} }
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (err) if (err)
return err; return err;
@@ -4538,14 +4572,17 @@ static int mtk_probe(struct platform_dev @@ -4537,14 +4571,17 @@ static int mtk_probe(struct platform_dev
"mediatek,pctl"); "mediatek,pctl");
if (IS_ERR(eth->pctl)) { if (IS_ERR(eth->pctl)) {
dev_err(&pdev->dev, "no pctl regmap found\n"); dev_err(&pdev->dev, "no pctl regmap found\n");
@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {
@@ -4704,6 +4741,8 @@ err_deinit_hw: @@ -4703,6 +4740,8 @@ err_deinit_hw:
mtk_hw_deinit(eth); mtk_hw_deinit(eth);
err_wed_exit: err_wed_exit:
mtk_wed_exit(); mtk_wed_exit();

View File

@ -81,7 +81,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
#include <linux/phylink.h> #include <linux/phylink.h>
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
@@ -2615,128 +2616,11 @@ static int mt7531_rgmii_setup(struct mt7 @@ -2651,128 +2652,11 @@ static int mt7531_rgmii_setup(struct mt7
return 0; return 0;
} }
@ -210,7 +210,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
static int static int
mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
phy_interface_t interface) phy_interface_t interface)
@@ -2759,11 +2643,11 @@ mt7531_mac_config(struct dsa_switch *ds, @@ -2795,11 +2679,11 @@ mt7531_mac_config(struct dsa_switch *ds,
phydev = dp->slave->phydev; phydev = dp->slave->phydev;
return mt7531_rgmii_setup(priv, port, interface, phydev); return mt7531_rgmii_setup(priv, port, interface, phydev);
case PHY_INTERFACE_MODE_SGMII: case PHY_INTERFACE_MODE_SGMII:
@ -224,7 +224,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
default: default:
return -EINVAL; return -EINVAL;
} }
@@ -2788,11 +2672,11 @@ mt753x_phylink_mac_select_pcs(struct dsa @@ -2824,11 +2708,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
switch (interface) { switch (interface) {
case PHY_INTERFACE_MODE_TRGMII: case PHY_INTERFACE_MODE_TRGMII:
@ -238,7 +238,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
default: default:
return NULL; return NULL;
} }
@@ -3033,86 +2917,6 @@ static void mt7530_pcs_get_state(struct @@ -3069,86 +2953,6 @@ static void mt7530_pcs_get_state(struct
state->pause |= MLO_PAUSE_TX; state->pause |= MLO_PAUSE_TX;
} }
@ -325,7 +325,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode, static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
phy_interface_t interface, phy_interface_t interface,
const unsigned long *advertising, const unsigned long *advertising,
@@ -3132,18 +2936,57 @@ static const struct phylink_pcs_ops mt75 @@ -3168,18 +2972,57 @@ static const struct phylink_pcs_ops mt75
.pcs_an_restart = mt7530_pcs_an_restart, .pcs_an_restart = mt7530_pcs_an_restart,
}; };
@ -389,7 +389,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
int i, ret; int i, ret;
/* Initialise the PCS devices */ /* Initialise the PCS devices */
@@ -3151,8 +2994,6 @@ mt753x_setup(struct dsa_switch *ds) @@ -3187,8 +3030,6 @@ mt753x_setup(struct dsa_switch *ds)
priv->pcs[i].pcs.ops = priv->info->pcs_ops; priv->pcs[i].pcs.ops = priv->info->pcs_ops;
priv->pcs[i].priv = priv; priv->pcs[i].priv = priv;
priv->pcs[i].port = i; priv->pcs[i].port = i;
@ -398,7 +398,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
} }
ret = priv->info->sw_setup(ds); ret = priv->info->sw_setup(ds);
@@ -3167,6 +3008,16 @@ mt753x_setup(struct dsa_switch *ds) @@ -3203,6 +3044,16 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq) if (ret && priv->irq)
mt7530_free_irq_common(priv); mt7530_free_irq_common(priv);
@ -415,7 +415,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
return ret; return ret;
} }
@@ -3258,7 +3109,7 @@ static const struct mt753x_info mt753x_t @@ -3294,7 +3145,7 @@ static const struct mt753x_info mt753x_t
}, },
[ID_MT7531] = { [ID_MT7531] = {
.id = ID_MT7531, .id = ID_MT7531,
@ -424,7 +424,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
.sw_setup = mt7531_setup, .sw_setup = mt7531_setup,
.phy_read = mt7531_ind_phy_read, .phy_read = mt7531_ind_phy_read,
.phy_write = mt7531_ind_phy_write, .phy_write = mt7531_ind_phy_write,
@@ -3366,7 +3217,7 @@ static void @@ -3402,7 +3253,7 @@ static void
mt7530_remove(struct mdio_device *mdiodev) mt7530_remove(struct mdio_device *mdiodev)
{ {
struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
@ -433,7 +433,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
if (!priv) if (!priv)
return; return;
@@ -3385,6 +3236,10 @@ mt7530_remove(struct mdio_device *mdiode @@ -3421,6 +3272,10 @@ mt7530_remove(struct mdio_device *mdiode
mt7530_free_irq(priv); mt7530_free_irq(priv);
dsa_unregister_switch(priv->ds); dsa_unregister_switch(priv->ds);
@ -446,7 +446,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
--- a/drivers/net/dsa/mt7530.h --- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h
@@ -371,47 +371,8 @@ enum mt7530_vlan_port_acc_frm { @@ -391,47 +391,8 @@ enum mt7530_vlan_port_acc_frm {
CCR_TX_OCT_CNT_BAD) CCR_TX_OCT_CNT_BAD)
/* MT7531 SGMII register group */ /* MT7531 SGMII register group */
@ -496,7 +496,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
/* Register for system reset */ /* Register for system reset */
#define MT7530_SYS_CTRL 0x7000 #define MT7530_SYS_CTRL 0x7000
@@ -710,13 +671,13 @@ struct mt7530_fdb { @@ -730,13 +691,13 @@ struct mt7530_fdb {
* @pm: The matrix used to show all connections with the port. * @pm: The matrix used to show all connections with the port.
* @pvid: The VLAN specified is to be considered a PVID at ingress. Any * @pvid: The VLAN specified is to be considered a PVID at ingress. Any
* untagged frames will be assigned to the related VLAN. * untagged frames will be assigned to the related VLAN.

View File

@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c
@@ -2968,26 +2968,56 @@ static const struct regmap_bus mt7531_re @@ -3004,26 +3004,56 @@ static const struct regmap_bus mt7531_re
.reg_update_bits = mt7530_regmap_update_bits, .reg_update_bits = mt7530_regmap_update_bits,
}; };
@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i, ret; int i, ret;
/* Initialise the PCS devices */ /* Initialise the PCS devices */
@@ -3009,15 +3039,11 @@ mt753x_setup(struct dsa_switch *ds) @@ -3045,15 +3075,11 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq) if (ret && priv->irq)
mt7530_free_irq_common(priv); mt7530_free_irq_common(priv);

View File

@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c
@@ -2941,7 +2941,7 @@ static int mt7530_regmap_read(void *cont @@ -2977,7 +2977,7 @@ static int mt7530_regmap_read(void *cont
{ {
struct mt7530_priv *priv = context; struct mt7530_priv *priv = context;
@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0; return 0;
}; };
@@ -2949,23 +2949,25 @@ static int mt7530_regmap_write(void *con @@ -2985,23 +2985,25 @@ static int mt7530_regmap_write(void *con
{ {
struct mt7530_priv *priv = context; struct mt7530_priv *priv = context;
@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static int static int
@@ -2991,6 +2993,9 @@ mt7531_create_sgmii(struct mt7530_priv * @@ -3027,6 +3029,9 @@ mt7531_create_sgmii(struct mt7530_priv *
mt7531_pcs_config[i]->reg_stride = 4; mt7531_pcs_config[i]->reg_stride = 4;
mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i); mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i);
mt7531_pcs_config[i]->max_register = 0x17c; mt7531_pcs_config[i]->max_register = 0x17c;

View File

@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
static void static void
@@ -2937,22 +2958,6 @@ static const struct phylink_pcs_ops mt75 @@ -2973,22 +2994,6 @@ static const struct phylink_pcs_ops mt75
.pcs_an_restart = mt7530_pcs_an_restart, .pcs_an_restart = mt7530_pcs_an_restart,
}; };
@ -156,7 +156,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void static void
mt7530_mdio_regmap_lock(void *mdio_lock) mt7530_mdio_regmap_lock(void *mdio_lock)
{ {
@@ -2965,7 +2970,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc @@ -3001,7 +3006,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
mutex_unlock(mdio_lock); mutex_unlock(mdio_lock);
} }
@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.reg_write = mt7530_regmap_write, .reg_write = mt7530_regmap_write,
.reg_read = mt7530_regmap_read, .reg_read = mt7530_regmap_read,
}; };
@@ -2998,7 +3003,7 @@ mt7531_create_sgmii(struct mt7530_priv * @@ -3034,7 +3039,7 @@ mt7531_create_sgmii(struct mt7530_priv *
mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock; mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
regmap = devm_regmap_init(priv->dev, regmap = devm_regmap_init(priv->dev,
@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mt7531_pcs_config[i]); mt7531_pcs_config[i]);
if (IS_ERR(regmap)) { if (IS_ERR(regmap)) {
ret = PTR_ERR(regmap); ret = PTR_ERR(regmap);
@@ -3163,6 +3168,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match) @@ -3199,6 +3204,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
static int static int
mt7530_probe(struct mdio_device *mdiodev) mt7530_probe(struct mdio_device *mdiodev)
{ {
@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct mt7530_priv *priv; struct mt7530_priv *priv;
struct device_node *dn; struct device_node *dn;
@@ -3242,6 +3248,21 @@ mt7530_probe(struct mdio_device *mdiodev @@ -3278,6 +3284,21 @@ mt7530_probe(struct mdio_device *mdiodev
mutex_init(&priv->reg_mutex); mutex_init(&priv->reg_mutex);
dev_set_drvdata(&mdiodev->dev, priv); dev_set_drvdata(&mdiodev->dev, priv);
@ -206,7 +206,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mt7530.h --- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h
@@ -754,6 +754,7 @@ struct mt753x_info { @@ -774,6 +774,7 @@ struct mt753x_info {
* @dev: The device pointer * @dev: The device pointer
* @ds: The pointer to the dsa core structure * @ds: The pointer to the dsa core structure
* @bus: The bus used for the device and built-in PHY * @bus: The bus used for the device and built-in PHY
@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* @rstc: The pointer to reset control used by MCM * @rstc: The pointer to reset control used by MCM
* @core_pwr: The power supplied into the core * @core_pwr: The power supplied into the core
* @io_pwr: The power supplied into the I/O * @io_pwr: The power supplied into the I/O
@@ -774,6 +775,7 @@ struct mt7530_priv { @@ -794,6 +795,7 @@ struct mt7530_priv {
struct device *dev; struct device *dev;
struct dsa_switch *ds; struct dsa_switch *ds;
struct mii_bus *bus; struct mii_bus *bus;

View File

@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c
@@ -3049,12 +3049,6 @@ mt753x_setup(struct dsa_switch *ds) @@ -3085,12 +3085,6 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq) if (ret && priv->irq)
mt7530_free_irq_common(priv); mt7530_free_irq_common(priv);
@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return ret; return ret;
} }
@@ -3171,6 +3165,7 @@ mt7530_probe(struct mdio_device *mdiodev @@ -3207,6 +3201,7 @@ mt7530_probe(struct mdio_device *mdiodev
static struct regmap_config *regmap_config; static struct regmap_config *regmap_config;
struct mt7530_priv *priv; struct mt7530_priv *priv;
struct device_node *dn; struct device_node *dn;
@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dn = mdiodev->dev.of_node; dn = mdiodev->dev.of_node;
@@ -3263,6 +3258,12 @@ mt7530_probe(struct mdio_device *mdiodev @@ -3299,6 +3294,12 @@ mt7530_probe(struct mdio_device *mdiodev
if (IS_ERR(priv->regmap)) if (IS_ERR(priv->regmap))
return PTR_ERR(priv->regmap); return PTR_ERR(priv->regmap);

View File

@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return ret; return ret;
} }
@@ -1125,7 +1125,6 @@ static int @@ -1161,7 +1161,6 @@ static int
mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu) mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
{ {
struct mt7530_priv *priv = ds->priv; struct mt7530_priv *priv = ds->priv;
@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int length; int length;
u32 val; u32 val;
@@ -1136,7 +1135,7 @@ mt7530_port_change_mtu(struct dsa_switch @@ -1172,7 +1171,7 @@ mt7530_port_change_mtu(struct dsa_switch
if (!dsa_is_cpu_port(ds, port)) if (!dsa_is_cpu_port(ds, port))
return 0; return 0;
@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
val = mt7530_mii_read(priv, MT7530_GMACCR); val = mt7530_mii_read(priv, MT7530_GMACCR);
val &= ~MAX_RX_PKT_LEN_MASK; val &= ~MAX_RX_PKT_LEN_MASK;
@@ -1157,7 +1156,7 @@ mt7530_port_change_mtu(struct dsa_switch @@ -1193,7 +1192,7 @@ mt7530_port_change_mtu(struct dsa_switch
mt7530_mii_write(priv, MT7530_GMACCR, val); mt7530_mii_write(priv, MT7530_GMACCR, val);
@ -240,7 +240,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0; return 0;
} }
@@ -1958,10 +1957,10 @@ mt7530_irq_thread_fn(int irq, void *dev_ @@ -1994,10 +1993,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
u32 val; u32 val;
int p; int p;
@ -253,7 +253,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
for (p = 0; p < MT7530_NUM_PHYS; p++) { for (p = 0; p < MT7530_NUM_PHYS; p++) {
if (BIT(p) & val) { if (BIT(p) & val) {
@@ -1997,7 +1996,7 @@ mt7530_irq_bus_lock(struct irq_data *d) @@ -2033,7 +2032,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
{ {
struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
@ -262,7 +262,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
static void static void
@@ -2006,7 +2005,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da @@ -2042,7 +2041,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable); mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable);

View File

@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct mt7530_priv *priv = ds->priv; struct mt7530_priv *priv = ds->priv;
--- a/drivers/net/dsa/mt7530.h --- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h
@@ -689,24 +689,6 @@ enum p5_interface_select { @@ -709,24 +709,6 @@ enum p5_interface_select {
P5_INTF_SEL_GMAC5_SGMII, P5_INTF_SEL_GMAC5_SGMII,
}; };

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c
@@ -3177,44 +3177,21 @@ static const struct of_device_id mt7530_ @@ -3213,44 +3213,21 @@ static const struct of_device_id mt7530_
MODULE_DEVICE_TABLE(of, mt7530_of_match); MODULE_DEVICE_TABLE(of, mt7530_of_match);
static int static int
@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!priv->info) if (!priv->info)
return -EINVAL; return -EINVAL;
@@ -3228,23 +3205,53 @@ mt7530_probe(struct mdio_device *mdiodev @@ -3264,23 +3241,53 @@ mt7530_probe(struct mdio_device *mdiodev
return -EINVAL; return -EINVAL;
priv->id = priv->info->id; priv->id = priv->info->id;
@ -131,7 +131,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset", priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
GPIOD_OUT_LOW); GPIOD_OUT_LOW);
if (IS_ERR(priv->reset)) { if (IS_ERR(priv->reset)) {
@@ -3253,12 +3260,15 @@ mt7530_probe(struct mdio_device *mdiodev @@ -3289,12 +3296,15 @@ mt7530_probe(struct mdio_device *mdiodev
} }
} }

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c
@@ -3295,6 +3295,17 @@ mt7530_probe(struct mdio_device *mdiodev @@ -3331,6 +3331,17 @@ mt7530_probe(struct mdio_device *mdiodev
} }
static void static void
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mt7530_remove(struct mdio_device *mdiodev) mt7530_remove(struct mdio_device *mdiodev)
{ {
struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
@@ -3313,15 +3324,10 @@ mt7530_remove(struct mdio_device *mdiode @@ -3349,15 +3360,10 @@ mt7530_remove(struct mdio_device *mdiode
dev_err(priv->dev, "Failed to disable io pwr: %d\n", dev_err(priv->dev, "Failed to disable io pwr: %d\n",
ret); ret);

View File

@ -416,7 +416,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static u32 static u32
mt7530_mii_read(struct mt7530_priv *priv, u32 reg) mt7530_mii_read(struct mt7530_priv *priv, u32 reg)
{ {
@@ -2975,72 +2926,6 @@ static const struct phylink_pcs_ops mt75 @@ -3011,72 +2962,6 @@ static const struct phylink_pcs_ops mt75
.pcs_an_restart = mt7530_pcs_an_restart, .pcs_an_restart = mt7530_pcs_an_restart,
}; };
@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int static int
mt753x_setup(struct dsa_switch *ds) mt753x_setup(struct dsa_switch *ds)
{ {
@@ -3099,7 +2984,7 @@ static int mt753x_set_mac_eee(struct dsa @@ -3135,7 +3020,7 @@ static int mt753x_set_mac_eee(struct dsa
return 0; return 0;
} }
@ -498,7 +498,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.get_tag_protocol = mtk_get_tag_protocol, .get_tag_protocol = mtk_get_tag_protocol,
.setup = mt753x_setup, .setup = mt753x_setup,
.get_strings = mt7530_get_strings, .get_strings = mt7530_get_strings,
@@ -3133,8 +3018,9 @@ static const struct dsa_switch_ops mt753 @@ -3169,8 +3054,9 @@ static const struct dsa_switch_ops mt753
.get_mac_eee = mt753x_get_mac_eee, .get_mac_eee = mt753x_get_mac_eee,
.set_mac_eee = mt753x_set_mac_eee, .set_mac_eee = mt753x_set_mac_eee,
}; };
@ -509,7 +509,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
[ID_MT7621] = { [ID_MT7621] = {
.id = ID_MT7621, .id = ID_MT7621,
.pcs_ops = &mt7530_pcs_ops, .pcs_ops = &mt7530_pcs_ops,
@@ -3167,16 +3053,9 @@ static const struct mt753x_info mt753x_t @@ -3203,16 +3089,9 @@ static const struct mt753x_info mt753x_t
.mac_port_config = mt7531_mac_config, .mac_port_config = mt7531_mac_config,
}, },
}; };
@ -528,7 +528,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mt7530_probe_common(struct mt7530_priv *priv) mt7530_probe_common(struct mt7530_priv *priv)
{ {
struct device *dev = priv->dev; struct device *dev = priv->dev;
@@ -3213,88 +3092,9 @@ mt7530_probe_common(struct mt7530_priv * @@ -3249,88 +3128,9 @@ mt7530_probe_common(struct mt7530_priv *
return 0; return 0;
} }
@ -619,7 +619,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mt7530_remove_common(struct mt7530_priv *priv) mt7530_remove_common(struct mt7530_priv *priv)
{ {
if (priv->irq) if (priv->irq)
@@ -3304,55 +3104,7 @@ mt7530_remove_common(struct mt7530_priv @@ -3340,55 +3140,7 @@ mt7530_remove_common(struct mt7530_priv
mutex_destroy(&priv->reg_mutex); mutex_destroy(&priv->reg_mutex);
} }
@ -678,7 +678,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
MODULE_DESCRIPTION("Driver for Mediatek MT7530 Switch"); MODULE_DESCRIPTION("Driver for Mediatek MT7530 Switch");
--- a/drivers/net/dsa/mt7530.h --- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h
@@ -814,4 +814,10 @@ static inline void INIT_MT7530_DUMMY_POL @@ -834,4 +834,10 @@ static inline void INIT_MT7530_DUMMY_POL
p->reg = reg; p->reg = reg;
} }

View File

@ -184,7 +184,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL");
--- a/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c
@@ -2005,6 +2005,47 @@ static const struct irq_domain_ops mt753 @@ -2041,6 +2041,47 @@ static const struct irq_domain_ops mt753
}; };
static void static void
@ -232,7 +232,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mt7530_setup_mdio_irq(struct mt7530_priv *priv) mt7530_setup_mdio_irq(struct mt7530_priv *priv)
{ {
struct dsa_switch *ds = priv->ds; struct dsa_switch *ds = priv->ds;
@@ -2038,8 +2079,15 @@ mt7530_setup_irq(struct mt7530_priv *pri @@ -2074,8 +2115,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
return priv->irq ? : -EINVAL; return priv->irq ? : -EINVAL;
} }
@ -250,7 +250,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!priv->irq_domain) { if (!priv->irq_domain) {
dev_err(dev, "failed to create IRQ domain\n"); dev_err(dev, "failed to create IRQ domain\n");
return -ENOMEM; return -ENOMEM;
@@ -2538,6 +2586,25 @@ static void mt7531_mac_port_get_caps(str @@ -2574,6 +2622,25 @@ static void mt7531_mac_port_get_caps(str
} }
} }
@ -276,7 +276,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int static int
mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
{ {
@@ -2614,6 +2681,17 @@ static bool mt753x_is_mac_port(u32 port) @@ -2650,6 +2717,17 @@ static bool mt753x_is_mac_port(u32 port)
} }
static int static int
@ -294,7 +294,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
phy_interface_t interface) phy_interface_t interface)
{ {
@@ -2683,7 +2761,8 @@ mt753x_phylink_mac_config(struct dsa_swi @@ -2719,7 +2797,8 @@ mt753x_phylink_mac_config(struct dsa_swi
switch (port) { switch (port) {
case 0 ... 4: /* Internal phy */ case 0 ... 4: /* Internal phy */
@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
goto unsupported; goto unsupported;
break; break;
case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */ case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
@@ -2761,7 +2840,8 @@ static void mt753x_phylink_mac_link_up(s @@ -2797,7 +2876,8 @@ static void mt753x_phylink_mac_link_up(s
/* MT753x MAC works in 1G full duplex mode for all up-clocked /* MT753x MAC works in 1G full duplex mode for all up-clocked
* variants. * variants.
*/ */
@ -314,7 +314,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
(phy_interface_mode_is_8023z(interface))) { (phy_interface_mode_is_8023z(interface))) {
speed = SPEED_1000; speed = SPEED_1000;
duplex = DUPLEX_FULL; duplex = DUPLEX_FULL;
@@ -2841,6 +2921,21 @@ mt7531_cpu_port_config(struct dsa_switch @@ -2877,6 +2957,21 @@ mt7531_cpu_port_config(struct dsa_switch
return 0; return 0;
} }
@ -336,7 +336,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port, static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
struct phylink_config *config) struct phylink_config *config)
{ {
@@ -2986,6 +3081,27 @@ static int mt753x_set_mac_eee(struct dsa @@ -3022,6 +3117,27 @@ static int mt753x_set_mac_eee(struct dsa
return 0; return 0;
} }
@ -364,7 +364,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
const struct dsa_switch_ops mt7530_switch_ops = { const struct dsa_switch_ops mt7530_switch_ops = {
.get_tag_protocol = mtk_get_tag_protocol, .get_tag_protocol = mtk_get_tag_protocol,
.setup = mt753x_setup, .setup = mt753x_setup,
@@ -3054,6 +3170,17 @@ const struct mt753x_info mt753x_table[] @@ -3090,6 +3206,17 @@ const struct mt753x_info mt753x_table[]
.mac_port_get_caps = mt7531_mac_port_get_caps, .mac_port_get_caps = mt7531_mac_port_get_caps,
.mac_port_config = mt7531_mac_config, .mac_port_config = mt7531_mac_config,
}, },
@ -407,7 +407,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
MT7531_MIRROR_MASK : MIRROR_MASK) MT7531_MIRROR_MASK : MIRROR_MASK)
/* Registers for BPDU and PAE frame control*/ /* Registers for BPDU and PAE frame control*/
@@ -302,9 +303,8 @@ enum mt7530_vlan_port_acc_frm { @@ -322,9 +323,8 @@ enum mt7530_vlan_port_acc_frm {
MT7531_FORCE_DPX | \ MT7531_FORCE_DPX | \
MT7531_FORCE_RX_FC | \ MT7531_FORCE_RX_FC | \
MT7531_FORCE_TX_FC) MT7531_FORCE_TX_FC)

View File

@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
--- a/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c
@@ -3048,6 +3048,12 @@ mt753x_setup(struct dsa_switch *ds) @@ -3084,6 +3084,12 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq) if (ret && priv->irq)
mt7530_free_irq_common(priv); mt7530_free_irq_common(priv);
@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.h --- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h
@@ -748,10 +748,10 @@ struct mt753x_info { @@ -768,10 +768,10 @@ struct mt753x_info {
* registers * registers
* @p6_interface Holding the current port 6 interface * @p6_interface Holding the current port 6 interface
* @p5_intf_sel: Holding the current port 5 interface select * @p5_intf_sel: Holding the current port 5 interface select
@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
*/ */
struct mt7530_priv { struct mt7530_priv {
struct device *dev; struct device *dev;
@@ -770,7 +770,6 @@ struct mt7530_priv { @@ -790,7 +790,6 @@ struct mt7530_priv {
unsigned int p5_intf_sel; unsigned int p5_intf_sel;
u8 mirror_rx; u8 mirror_rx;
u8 mirror_tx; u8 mirror_tx;
@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct mt7530_port ports[MT7530_NUM_PORTS]; struct mt7530_port ports[MT7530_NUM_PORTS];
struct mt753x_pcs pcs[MT7530_NUM_PORTS]; struct mt753x_pcs pcs[MT7530_NUM_PORTS];
/* protect among processes for registers access*/ /* protect among processes for registers access*/
@@ -778,6 +777,7 @@ struct mt7530_priv { @@ -798,6 +797,7 @@ struct mt7530_priv {
int irq; int irq;
struct irq_domain *irq_domain; struct irq_domain *irq_domain;
u32 irq_enable; u32 irq_enable;

View File

@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-4-robimarko@gmail.com
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
@@ -31,12 +31,7 @@ @@ -30,12 +30,7 @@
#define MSM_ID_SMEM 137 #define MSM_ID_SMEM 137
@ -32,7 +32,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-4-robimarko@gmail.com
enum _msm8996_version { enum _msm8996_version {
MSM8996_V3, MSM8996_V3,
@@ -154,12 +149,12 @@ static enum _msm8996_version qcom_cpufre @@ -153,12 +148,12 @@ static enum _msm8996_version qcom_cpufre
msm_id++; msm_id++;
switch ((enum _msm_id)*msm_id) { switch ((enum _msm_id)*msm_id) {

View File

@ -19,7 +19,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-5-robimarko@gmail.com
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
@@ -29,16 +29,8 @@ @@ -28,16 +28,8 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/soc/qcom/smem.h> #include <linux/soc/qcom/smem.h>
@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-5-robimarko@gmail.com
struct qcom_cpufreq_drv; struct qcom_cpufreq_drv;
struct qcom_cpufreq_match_data { struct qcom_cpufreq_match_data {
@@ -135,60 +127,32 @@ static void get_krait_bin_format_b(struc @@ -134,60 +126,32 @@ static void get_krait_bin_format_b(struc
dev_dbg(cpu_dev, "PVS version: %d\n", *pvs_ver); dev_dbg(cpu_dev, "PVS version: %d\n", *pvs_ver);
} }

View File

@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
#define QUECTEL_VENDOR_ID 0x2c7c #define QUECTEL_VENDOR_ID 0x2c7c
/* These Quectel products use Quectel's vendor ID */ /* These Quectel products use Quectel's vendor ID */
@@ -1148,6 +1153,11 @@ static const struct usb_device_id option @@ -1147,6 +1152,11 @@ static const struct usb_device_id option
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
.driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) }, .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
/* Quectel products using Qualcomm vendor ID */ /* Quectel products using Qualcomm vendor ID */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)}, { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20), { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
@@ -1189,6 +1199,11 @@ static const struct usb_device_id option @@ -1188,6 +1198,11 @@ static const struct usb_device_id option
.driver_info = ZLP }, .driver_info = ZLP },
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
.driver_info = RSVD(4) }, .driver_info = RSVD(4) },

View File

@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/dev.c --- a/net/core/dev.c
+++ b/net/core/dev.c +++ b/net/core/dev.c
@@ -7640,6 +7640,48 @@ static void __netdev_adjacent_dev_unlink @@ -7643,6 +7643,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower); &upper_dev->adj_list.lower);
} }
@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int __netdev_upper_dev_link(struct net_device *dev, static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master, struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info, void *upper_priv, void *upper_info,
@@ -7691,6 +7733,7 @@ static int __netdev_upper_dev_link(struc @@ -7694,6 +7736,7 @@ static int __netdev_upper_dev_link(struc
if (ret) if (ret)
return ret; return ret;
@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info); &changeupper_info.info);
ret = notifier_to_errno(ret); ret = notifier_to_errno(ret);
@@ -7787,6 +7830,7 @@ static void __netdev_upper_dev_unlink(st @@ -7790,6 +7833,7 @@ static void __netdev_upper_dev_unlink(st
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info); &changeupper_info.info);
@@ -8839,6 +8883,7 @@ int dev_set_mac_address(struct net_devic @@ -8842,6 +8886,7 @@ int dev_set_mac_address(struct net_devic
if (err) if (err)
return err; return err;
dev->addr_assign_type = NET_ADDR_SET; dev->addr_assign_type = NET_ADDR_SET;

View File

@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4723,6 +4723,8 @@ static int mtk_probe(struct platform_dev @@ -4722,6 +4722,8 @@ static int mtk_probe(struct platform_dev
* for NAPI to work * for NAPI to work
*/ */
init_dummy_netdev(&eth->dummy_dev); init_dummy_netdev(&eth->dummy_dev);

View File

@ -15,7 +15,7 @@ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
--- a/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c
@@ -2252,6 +2252,10 @@ mt7530_setup(struct dsa_switch *ds) @@ -2288,6 +2288,10 @@ mt7530_setup(struct dsa_switch *ds)
return -ENODEV; return -ENODEV;
} }

View File

@ -53,7 +53,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4692,8 +4692,8 @@ static int mtk_probe(struct platform_dev @@ -4691,8 +4691,8 @@ static int mtk_probe(struct platform_dev
for (i = 0; i < num_ppe; i++) { for (i = 0; i < num_ppe; i++) {
u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400;
@ -64,7 +64,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
if (!eth->ppe[i]) { if (!eth->ppe[i]) {
err = -ENOMEM; err = -ENOMEM;
goto err_deinit_ppe; goto err_deinit_ppe;
@@ -4819,6 +4819,7 @@ static const struct mtk_soc_data mt7622_ @@ -4818,6 +4818,7 @@ static const struct mtk_soc_data mt7622_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -72,7 +72,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@@ -4856,6 +4857,7 @@ static const struct mtk_soc_data mt7629_ @@ -4855,6 +4856,7 @@ static const struct mtk_soc_data mt7629_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7629_CLKS_BITMAP, .required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -80,7 +80,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4876,6 +4878,7 @@ static const struct mtk_soc_data mt7981_ @@ -4875,6 +4877,7 @@ static const struct mtk_soc_data mt7981_
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.foe_entry_size = sizeof(struct mtk_foe_entry), .foe_entry_size = sizeof(struct mtk_foe_entry),
@ -88,7 +88,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma_v2), .txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2),
@@ -4896,6 +4899,7 @@ static const struct mtk_soc_data mt7986_ @@ -4895,6 +4898,7 @@ static const struct mtk_soc_data mt7986_
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.foe_entry_size = sizeof(struct mtk_foe_entry), .foe_entry_size = sizeof(struct mtk_foe_entry),

View File

@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1898,9 +1898,7 @@ static int mtk_poll_rx(struct napi_struc @@ -1897,9 +1897,7 @@ static int mtk_poll_rx(struct napi_struc
while (done < budget) { while (done < budget) {
unsigned int pktlen, *rxdcsum; unsigned int pktlen, *rxdcsum;
@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
dma_addr_t dma_addr; dma_addr_t dma_addr;
u32 hash, reason; u32 hash, reason;
int mac = 0; int mac = 0;
@@ -2035,36 +2033,21 @@ static int mtk_poll_rx(struct napi_struc @@ -2034,36 +2032,21 @@ static int mtk_poll_rx(struct napi_struc
skb_checksum_none_assert(skb); skb_checksum_none_assert(skb);
skb->protocol = eth_type_trans(skb, netdev); skb->protocol = eth_type_trans(skb, netdev);
@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
skb_record_rx_queue(skb, 0); skb_record_rx_queue(skb, 0);
napi_gro_receive(napi, skb); napi_gro_receive(napi, skb);
@@ -2890,29 +2873,11 @@ static netdev_features_t mtk_fix_feature @@ -2889,29 +2872,11 @@ static netdev_features_t mtk_fix_feature
static int mtk_set_features(struct net_device *dev, netdev_features_t features) static int mtk_set_features(struct net_device *dev, netdev_features_t features)
{ {
@ -100,7 +100,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3226,30 +3191,6 @@ static int mtk_open(struct net_device *d @@ -3225,30 +3190,6 @@ static int mtk_open(struct net_device *d
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
int i, err; int i, err;
@ -131,7 +131,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
if (err) { if (err) {
netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
@@ -3288,6 +3229,35 @@ static int mtk_open(struct net_device *d @@ -3287,6 +3228,35 @@ static int mtk_open(struct net_device *d
phylink_start(mac->phylink); phylink_start(mac->phylink);
netif_tx_start_all_queues(dev); netif_tx_start_all_queues(dev);
@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3772,10 +3742,9 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3771,10 +3741,9 @@ static int mtk_hw_init(struct mtk_eth *e
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
val = mtk_r32(eth, MTK_CDMP_IG_CTRL); val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL);
@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* set interrupt delays based on current Net DIM sample */ /* set interrupt delays based on current Net DIM sample */
mtk_dim_rx(&eth->rx_dim.work); mtk_dim_rx(&eth->rx_dim.work);
@@ -4415,7 +4384,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4414,7 +4383,7 @@ static int mtk_add_mac(struct mtk_eth *e
eth->netdev[id]->hw_features |= NETIF_F_LRO; eth->netdev[id]->hw_features |= NETIF_F_LRO;
eth->netdev[id]->vlan_features = eth->soc->hw_features & eth->netdev[id]->vlan_features = eth->soc->hw_features &

View File

@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1469,12 +1469,28 @@ static void mtk_wake_queue(struct mtk_et @@ -1468,12 +1468,28 @@ static void mtk_wake_queue(struct mtk_et
} }
} }
@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
bool gso = false; bool gso = false;
int tx_num; int tx_num;
@@ -1496,6 +1512,18 @@ static netdev_tx_t mtk_start_xmit(struct @@ -1495,6 +1511,18 @@ static netdev_tx_t mtk_start_xmit(struct
return NETDEV_TX_BUSY; return NETDEV_TX_BUSY;
} }
@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* TSO: fill MSS info in tcp checksum field */ /* TSO: fill MSS info in tcp checksum field */
if (skb_is_gso(skb)) { if (skb_is_gso(skb)) {
if (skb_cow_head(skb, 0)) { if (skb_cow_head(skb, 0)) {
@@ -1511,8 +1539,14 @@ static netdev_tx_t mtk_start_xmit(struct @@ -1510,8 +1538,14 @@ static netdev_tx_t mtk_start_xmit(struct
} }
} }

View File

@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -710,6 +710,7 @@ static void mtk_mac_link_up(struct phyli @@ -709,6 +709,7 @@ static void mtk_mac_link_up(struct phyli
MAC_MCR_FORCE_RX_FC); MAC_MCR_FORCE_RX_FC);
/* Configure speed */ /* Configure speed */
@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
switch (speed) { switch (speed) {
case SPEED_2500: case SPEED_2500:
case SPEED_1000: case SPEED_1000:
@@ -3204,6 +3205,9 @@ found: @@ -3203,6 +3204,9 @@ found:
if (dp->index >= MTK_QDMA_NUM_QUEUES) if (dp->index >= MTK_QDMA_NUM_QUEUES)
return NOTIFY_DONE; return NOTIFY_DONE;

View File

@ -18,7 +18,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -640,7 +640,7 @@ static void mtk_set_queue_speed(struct m @@ -639,7 +639,7 @@ static void mtk_set_queue_speed(struct m
FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) | FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) |
FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) | FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) |
MTK_QTX_SCH_LEAKY_BUCKET_SIZE; MTK_QTX_SCH_LEAKY_BUCKET_SIZE;
@ -27,7 +27,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
val |= MTK_QTX_SCH_LEAKY_BUCKET_EN; val |= MTK_QTX_SCH_LEAKY_BUCKET_EN;
if (IS_ENABLED(CONFIG_SOC_MT7621)) { if (IS_ENABLED(CONFIG_SOC_MT7621)) {
@@ -1018,7 +1018,7 @@ static bool mtk_rx_get_desc(struct mtk_e @@ -1017,7 +1017,7 @@ static bool mtk_rx_get_desc(struct mtk_e
rxd->rxd1 = READ_ONCE(dma_rxd->rxd1); rxd->rxd1 = READ_ONCE(dma_rxd->rxd1);
rxd->rxd3 = READ_ONCE(dma_rxd->rxd3); rxd->rxd3 = READ_ONCE(dma_rxd->rxd3);
rxd->rxd4 = READ_ONCE(dma_rxd->rxd4); rxd->rxd4 = READ_ONCE(dma_rxd->rxd4);
@ -36,7 +36,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
rxd->rxd5 = READ_ONCE(dma_rxd->rxd5); rxd->rxd5 = READ_ONCE(dma_rxd->rxd5);
rxd->rxd6 = READ_ONCE(dma_rxd->rxd6); rxd->rxd6 = READ_ONCE(dma_rxd->rxd6);
} }
@@ -1076,7 +1076,7 @@ static int mtk_init_fq_dma(struct mtk_et @@ -1075,7 +1075,7 @@ static int mtk_init_fq_dma(struct mtk_et
txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE); txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE);
txd->txd4 = 0; txd->txd4 = 0;
@ -45,7 +45,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
txd->txd5 = 0; txd->txd5 = 0;
txd->txd6 = 0; txd->txd6 = 0;
txd->txd7 = 0; txd->txd7 = 0;
@@ -1267,7 +1267,7 @@ static void mtk_tx_set_dma_desc(struct n @@ -1266,7 +1266,7 @@ static void mtk_tx_set_dma_desc(struct n
struct mtk_mac *mac = netdev_priv(dev); struct mtk_mac *mac = netdev_priv(dev);
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
@ -54,7 +54,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
mtk_tx_set_dma_desc_v2(dev, txd, info); mtk_tx_set_dma_desc_v2(dev, txd, info);
else else
mtk_tx_set_dma_desc_v1(dev, txd, info); mtk_tx_set_dma_desc_v1(dev, txd, info);
@@ -1950,7 +1950,7 @@ static int mtk_poll_rx(struct napi_struc @@ -1949,7 +1949,7 @@ static int mtk_poll_rx(struct napi_struc
break; break;
/* find out which mac the packet come from. values start at 1 */ /* find out which mac the packet come from. values start at 1 */
@ -63,7 +63,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
mac = RX_DMA_GET_SPORT_V2(trxd.rxd5) - 1; mac = RX_DMA_GET_SPORT_V2(trxd.rxd5) - 1;
else if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628) && else if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628) &&
!(trxd.rxd4 & RX_DMA_SPECIAL_TAG)) !(trxd.rxd4 & RX_DMA_SPECIAL_TAG))
@@ -2046,7 +2046,7 @@ static int mtk_poll_rx(struct napi_struc @@ -2045,7 +2045,7 @@ static int mtk_poll_rx(struct napi_struc
skb->dev = netdev; skb->dev = netdev;
bytes += skb->len; bytes += skb->len;
@ -72,7 +72,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5); reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5);
hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY; hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY;
if (hash != MTK_RXD5_FOE_ENTRY) if (hash != MTK_RXD5_FOE_ENTRY)
@@ -2071,7 +2071,7 @@ static int mtk_poll_rx(struct napi_struc @@ -2070,7 +2070,7 @@ static int mtk_poll_rx(struct napi_struc
/* When using VLAN untagging in combination with DSA, the /* When using VLAN untagging in combination with DSA, the
* hardware treats the MTK special tag as a VLAN and untags it. * hardware treats the MTK special tag as a VLAN and untags it.
*/ */
@ -81,7 +81,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(trxd.rxd2 & RX_DMA_VTAG) && netdev_uses_dsa(netdev)) { (trxd.rxd2 & RX_DMA_VTAG) && netdev_uses_dsa(netdev)) {
unsigned int port = RX_DMA_VPID(trxd.rxd3) & GENMASK(2, 0); unsigned int port = RX_DMA_VPID(trxd.rxd3) & GENMASK(2, 0);
@@ -2382,7 +2382,7 @@ static int mtk_tx_alloc(struct mtk_eth * @@ -2381,7 +2381,7 @@ static int mtk_tx_alloc(struct mtk_eth *
txd->txd2 = next_ptr; txd->txd2 = next_ptr;
txd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU; txd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU;
txd->txd4 = 0; txd->txd4 = 0;
@ -90,7 +90,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
txd->txd5 = 0; txd->txd5 = 0;
txd->txd6 = 0; txd->txd6 = 0;
txd->txd7 = 0; txd->txd7 = 0;
@@ -2435,7 +2435,7 @@ static int mtk_tx_alloc(struct mtk_eth * @@ -2434,7 +2434,7 @@ static int mtk_tx_alloc(struct mtk_eth *
FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) | FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) |
FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) | FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) |
MTK_QTX_SCH_LEAKY_BUCKET_SIZE; MTK_QTX_SCH_LEAKY_BUCKET_SIZE;
@ -99,7 +99,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
val |= MTK_QTX_SCH_LEAKY_BUCKET_EN; val |= MTK_QTX_SCH_LEAKY_BUCKET_EN;
mtk_w32(eth, val, soc->reg_map->qdma.qtx_sch + ofs); mtk_w32(eth, val, soc->reg_map->qdma.qtx_sch + ofs);
ofs += MTK_QTX_OFFSET; ofs += MTK_QTX_OFFSET;
@@ -2571,7 +2571,7 @@ static int mtk_rx_alloc(struct mtk_eth * @@ -2570,7 +2570,7 @@ static int mtk_rx_alloc(struct mtk_eth *
rxd->rxd3 = 0; rxd->rxd3 = 0;
rxd->rxd4 = 0; rxd->rxd4 = 0;
@ -108,7 +108,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
rxd->rxd5 = 0; rxd->rxd5 = 0;
rxd->rxd6 = 0; rxd->rxd6 = 0;
rxd->rxd7 = 0; rxd->rxd7 = 0;
@@ -3122,7 +3122,7 @@ static int mtk_start_dma(struct mtk_eth @@ -3121,7 +3121,7 @@ static int mtk_start_dma(struct mtk_eth
MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO | MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE; MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE;
@ -117,7 +117,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
val |= MTK_MUTLI_CNT | MTK_RESV_BUF | val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN; MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN;
@@ -3532,7 +3532,7 @@ static void mtk_hw_reset(struct mtk_eth @@ -3531,7 +3531,7 @@ static void mtk_hw_reset(struct mtk_eth
{ {
u32 val; u32 val;
@ -126,7 +126,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0); regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0);
val = RSTCTRL_PPE0_V2; val = RSTCTRL_PPE0_V2;
} else { } else {
@@ -3544,7 +3544,7 @@ static void mtk_hw_reset(struct mtk_eth @@ -3543,7 +3543,7 @@ static void mtk_hw_reset(struct mtk_eth
ethsys_reset(eth, RSTCTRL_ETH | RSTCTRL_FE | val); ethsys_reset(eth, RSTCTRL_ETH | RSTCTRL_FE | val);
@ -135,7 +135,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN,
0x3ffffff); 0x3ffffff);
} }
@@ -3740,7 +3740,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3739,7 +3739,7 @@ static int mtk_hw_init(struct mtk_eth *e
else else
mtk_hw_reset(eth); mtk_hw_reset(eth);
@ -144,7 +144,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
/* Set FE to PDMAv2 if necessary */ /* Set FE to PDMAv2 if necessary */
val = mtk_r32(eth, MTK_FE_GLO_MISC); val = mtk_r32(eth, MTK_FE_GLO_MISC);
mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC); mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC);
@@ -3777,7 +3777,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3776,7 +3776,7 @@ static int mtk_hw_init(struct mtk_eth *e
*/ */
val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);

View File

@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4029,7 +4029,10 @@ static void mtk_sgmii_destroy(struct mtk @@ -4028,7 +4028,10 @@ static void mtk_sgmii_destroy(struct mtk
{ {
int i; int i;
@ -27,7 +27,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
mtk_pcs_lynxi_destroy(eth->sgmii_pcs[i]); mtk_pcs_lynxi_destroy(eth->sgmii_pcs[i]);
} }
@@ -4482,7 +4485,12 @@ static int mtk_sgmii_init(struct mtk_eth @@ -4481,7 +4484,12 @@ static int mtk_sgmii_init(struct mtk_eth
u32 flags; u32 flags;
int i; int i;
@ -41,7 +41,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
np = of_parse_phandle(eth->dev->of_node, "mediatek,sgmiisys", i); np = of_parse_phandle(eth->dev->of_node, "mediatek,sgmiisys", i);
if (!np) if (!np)
break; break;
@@ -4527,6 +4535,18 @@ static int mtk_probe(struct platform_dev @@ -4526,6 +4534,18 @@ static int mtk_probe(struct platform_dev
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
eth->ip_align = NET_IP_ALIGN; eth->ip_align = NET_IP_ALIGN;
@ -60,7 +60,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
spin_lock_init(&eth->page_lock); spin_lock_init(&eth->page_lock);
spin_lock_init(&eth->tx_irq_lock); spin_lock_init(&eth->tx_irq_lock);
spin_lock_init(&eth->rx_irq_lock); spin_lock_init(&eth->rx_irq_lock);
@@ -4712,7 +4732,7 @@ static int mtk_probe(struct platform_dev @@ -4711,7 +4731,7 @@ static int mtk_probe(struct platform_dev
goto err_deinit_ppe; goto err_deinit_ppe;
} }
@ -69,7 +69,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (!eth->netdev[i]) if (!eth->netdev[i])
continue; continue;
@@ -4788,6 +4808,7 @@ static const struct mtk_soc_data mt2701_ @@ -4787,6 +4807,7 @@ static const struct mtk_soc_data mt2701_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
@ -77,7 +77,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4806,6 +4827,7 @@ static const struct mtk_soc_data mt7621_ @@ -4805,6 +4826,7 @@ static const struct mtk_soc_data mt7621_
.required_pctl = false, .required_pctl = false,
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@@ -4827,6 +4849,7 @@ static const struct mtk_soc_data mt7622_ @@ -4826,6 +4848,7 @@ static const struct mtk_soc_data mt7622_
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
.has_accounting = true, .has_accounting = true,
@ -93,7 +93,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@@ -4846,6 +4869,7 @@ static const struct mtk_soc_data mt7623_ @@ -4845,6 +4868,7 @@ static const struct mtk_soc_data mt7623_
.required_pctl = true, .required_pctl = true,
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
@ -101,7 +101,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@@ -4865,6 +4889,7 @@ static const struct mtk_soc_data mt7629_ @@ -4864,6 +4888,7 @@ static const struct mtk_soc_data mt7629_
.required_clks = MT7629_CLKS_BITMAP, .required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.has_accounting = true, .has_accounting = true,
@ -109,7 +109,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4886,6 +4911,7 @@ static const struct mtk_soc_data mt7981_ @@ -4885,6 +4910,7 @@ static const struct mtk_soc_data mt7981_
.hash_offset = 4, .hash_offset = 4,
.foe_entry_size = sizeof(struct mtk_foe_entry), .foe_entry_size = sizeof(struct mtk_foe_entry),
.has_accounting = true, .has_accounting = true,
@ -117,7 +117,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma_v2), .txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2),
@@ -4905,6 +4931,7 @@ static const struct mtk_soc_data mt7986_ @@ -4904,6 +4930,7 @@ static const struct mtk_soc_data mt7986_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
@ -125,7 +125,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
.foe_entry_size = sizeof(struct mtk_foe_entry), .foe_entry_size = sizeof(struct mtk_foe_entry),
.has_accounting = true, .has_accounting = true,
.txrx = { .txrx = {
@@ -4923,6 +4950,7 @@ static const struct mtk_soc_data rt5350_ @@ -4922,6 +4949,7 @@ static const struct mtk_soc_data rt5350_
.hw_features = MTK_HW_FEATURES_MT7628, .hw_features = MTK_HW_FEATURES_MT7628,
.required_clks = MT7628_CLKS_BITMAP, .required_clks = MT7628_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View File

@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -944,7 +944,7 @@ static void mtk_stats_update(struct mtk_ @@ -943,7 +943,7 @@ static void mtk_stats_update(struct mtk_
{ {
int i; int i;
@ -24,7 +24,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (!eth->mac[i] || !eth->mac[i]->hw_stats) if (!eth->mac[i] || !eth->mac[i]->hw_stats)
continue; continue;
if (spin_trylock(&eth->mac[i]->hw_stats->stats_lock)) { if (spin_trylock(&eth->mac[i]->hw_stats->stats_lock)) {
@@ -1449,7 +1449,7 @@ static int mtk_queue_stopped(struct mtk_ @@ -1448,7 +1448,7 @@ static int mtk_queue_stopped(struct mtk_
{ {
int i; int i;
@ -33,7 +33,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (!eth->netdev[i]) if (!eth->netdev[i])
continue; continue;
if (netif_queue_stopped(eth->netdev[i])) if (netif_queue_stopped(eth->netdev[i]))
@@ -1463,7 +1463,7 @@ static void mtk_wake_queue(struct mtk_et @@ -1462,7 +1462,7 @@ static void mtk_wake_queue(struct mtk_et
{ {
int i; int i;
@ -42,7 +42,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (!eth->netdev[i]) if (!eth->netdev[i])
continue; continue;
netif_tx_wake_all_queues(eth->netdev[i]); netif_tx_wake_all_queues(eth->netdev[i]);
@@ -1956,7 +1956,7 @@ static int mtk_poll_rx(struct napi_struc @@ -1955,7 +1955,7 @@ static int mtk_poll_rx(struct napi_struc
!(trxd.rxd4 & RX_DMA_SPECIAL_TAG)) !(trxd.rxd4 & RX_DMA_SPECIAL_TAG))
mac = RX_DMA_GET_SPORT(trxd.rxd4) - 1; mac = RX_DMA_GET_SPORT(trxd.rxd4) - 1;
@ -51,7 +51,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
!eth->netdev[mac])) !eth->netdev[mac]))
goto release_desc; goto release_desc;
@@ -2996,7 +2996,7 @@ static void mtk_dma_free(struct mtk_eth @@ -2995,7 +2995,7 @@ static void mtk_dma_free(struct mtk_eth
const struct mtk_soc_data *soc = eth->soc; const struct mtk_soc_data *soc = eth->soc;
int i; int i;
@ -60,7 +60,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (eth->netdev[i]) if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]); netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) { if (eth->scratch_ring) {
@@ -3150,7 +3150,7 @@ static void mtk_gdm_config(struct mtk_et @@ -3149,7 +3149,7 @@ static void mtk_gdm_config(struct mtk_et
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
return; return;
@ -69,7 +69,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
u32 val = mtk_r32(eth, MTK_GDMA_FWD_CFG(i)); u32 val = mtk_r32(eth, MTK_GDMA_FWD_CFG(i));
/* default setup the forward port to send frame to PDMA */ /* default setup the forward port to send frame to PDMA */
@@ -3761,7 +3761,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3760,7 +3760,7 @@ static int mtk_hw_init(struct mtk_eth *e
* up with the more appropriate value when mtk_mac_config call is being * up with the more appropriate value when mtk_mac_config call is being
* invoked. * invoked.
*/ */
@ -78,7 +78,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
struct net_device *dev = eth->netdev[i]; struct net_device *dev = eth->netdev[i];
mtk_w32(eth, MAC_MCR_FORCE_LINK_DOWN, MTK_MAC_MCR(i)); mtk_w32(eth, MAC_MCR_FORCE_LINK_DOWN, MTK_MAC_MCR(i));
@@ -3949,7 +3949,7 @@ static void mtk_pending_work(struct work @@ -3948,7 +3948,7 @@ static void mtk_pending_work(struct work
mtk_prepare_for_reset(eth); mtk_prepare_for_reset(eth);
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */
@ -87,7 +87,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (!eth->netdev[i] || !netif_running(eth->netdev[i])) if (!eth->netdev[i] || !netif_running(eth->netdev[i]))
continue; continue;
@@ -3965,7 +3965,7 @@ static void mtk_pending_work(struct work @@ -3964,7 +3964,7 @@ static void mtk_pending_work(struct work
mtk_hw_init(eth, true); mtk_hw_init(eth, true);
/* restart DMA and enable IRQs */ /* restart DMA and enable IRQs */
@ -96,7 +96,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (!test_bit(i, &restart)) if (!test_bit(i, &restart))
continue; continue;
@@ -3993,7 +3993,7 @@ static int mtk_free_dev(struct mtk_eth * @@ -3992,7 +3992,7 @@ static int mtk_free_dev(struct mtk_eth *
{ {
int i; int i;
@ -105,7 +105,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (!eth->netdev[i]) if (!eth->netdev[i])
continue; continue;
free_netdev(eth->netdev[i]); free_netdev(eth->netdev[i]);
@@ -4012,7 +4012,7 @@ static int mtk_unreg_dev(struct mtk_eth @@ -4011,7 +4011,7 @@ static int mtk_unreg_dev(struct mtk_eth
{ {
int i; int i;
@ -114,7 +114,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
struct mtk_mac *mac; struct mtk_mac *mac;
if (!eth->netdev[i]) if (!eth->netdev[i])
continue; continue;
@@ -4316,7 +4316,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4315,7 +4315,7 @@ static int mtk_add_mac(struct mtk_eth *e
} }
id = be32_to_cpup(_id); id = be32_to_cpup(_id);
@ -123,7 +123,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
dev_err(eth->dev, "%d is not a valid mac id\n", id); dev_err(eth->dev, "%d is not a valid mac id\n", id);
return -EINVAL; return -EINVAL;
} }
@@ -4457,7 +4457,7 @@ void mtk_eth_set_dma_device(struct mtk_e @@ -4456,7 +4456,7 @@ void mtk_eth_set_dma_device(struct mtk_e
rtnl_lock(); rtnl_lock();
@ -132,7 +132,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
dev = eth->netdev[i]; dev = eth->netdev[i];
if (!dev || !(dev->flags & IFF_UP)) if (!dev || !(dev->flags & IFF_UP))
@@ -4783,7 +4783,7 @@ static int mtk_remove(struct platform_de @@ -4782,7 +4782,7 @@ static int mtk_remove(struct platform_de
int i; int i;
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */

View File

@ -16,7 +16,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -924,17 +924,32 @@ void mtk_stats_update_mac(struct mtk_mac @@ -923,17 +923,32 @@ void mtk_stats_update_mac(struct mtk_mac
mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x20 + offs); mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x20 + offs);
hw_stats->rx_flow_control_packets += hw_stats->rx_flow_control_packets +=
mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x24 + offs); mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x24 + offs);
@ -60,7 +60,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
} }
u64_stats_update_end(&hw_stats->syncp); u64_stats_update_end(&hw_stats->syncp);
@@ -1238,7 +1253,10 @@ static void mtk_tx_set_dma_desc_v2(struc @@ -1237,7 +1252,10 @@ static void mtk_tx_set_dma_desc_v2(struc
data |= TX_DMA_LS0; data |= TX_DMA_LS0;
WRITE_ONCE(desc->txd3, data); WRITE_ONCE(desc->txd3, data);
@ -72,7 +72,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid);
WRITE_ONCE(desc->txd4, data); WRITE_ONCE(desc->txd4, data);
@@ -1249,6 +1267,9 @@ static void mtk_tx_set_dma_desc_v2(struc @@ -1248,6 +1266,9 @@ static void mtk_tx_set_dma_desc_v2(struc
/* tx checksum offload */ /* tx checksum offload */
if (info->csum) if (info->csum)
data |= TX_DMA_CHKSUM_V2; data |= TX_DMA_CHKSUM_V2;
@ -82,7 +82,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
} }
WRITE_ONCE(desc->txd5, data); WRITE_ONCE(desc->txd5, data);
@@ -1314,8 +1335,13 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1313,8 +1334,13 @@ static int mtk_tx_map(struct sk_buff *sk
mtk_tx_set_dma_desc(dev, itxd, &txd_info); mtk_tx_set_dma_desc(dev, itxd, &txd_info);
itx_buf->flags |= MTK_TX_FLAGS_SINGLE0; itx_buf->flags |= MTK_TX_FLAGS_SINGLE0;
@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
setup_tx_buf(eth, itx_buf, itxd_pdma, txd_info.addr, txd_info.size, setup_tx_buf(eth, itx_buf, itxd_pdma, txd_info.addr, txd_info.size,
k++); k++);
@@ -1363,8 +1389,13 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1362,8 +1388,13 @@ static int mtk_tx_map(struct sk_buff *sk
memset(tx_buf, 0, sizeof(*tx_buf)); memset(tx_buf, 0, sizeof(*tx_buf));
tx_buf->data = (void *)MTK_DMA_DUMMY_DESC; tx_buf->data = (void *)MTK_DMA_DUMMY_DESC;
tx_buf->flags |= MTK_TX_FLAGS_PAGE0; tx_buf->flags |= MTK_TX_FLAGS_PAGE0;
@ -114,7 +114,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
setup_tx_buf(eth, tx_buf, txd_pdma, txd_info.addr, setup_tx_buf(eth, tx_buf, txd_pdma, txd_info.addr,
txd_info.size, k++); txd_info.size, k++);
@@ -1950,11 +1981,24 @@ static int mtk_poll_rx(struct napi_struc @@ -1949,11 +1980,24 @@ static int mtk_poll_rx(struct napi_struc
break; break;
/* find out which mac the packet come from. values start at 1 */ /* find out which mac the packet come from. values start at 1 */
@ -143,7 +143,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (unlikely(mac < 0 || mac >= eth->soc->num_devs || if (unlikely(mac < 0 || mac >= eth->soc->num_devs ||
!eth->netdev[mac])) !eth->netdev[mac]))
@@ -2185,7 +2229,9 @@ static int mtk_poll_tx_qdma(struct mtk_e @@ -2184,7 +2228,9 @@ static int mtk_poll_tx_qdma(struct mtk_e
tx_buf = mtk_desc_to_tx_buf(ring, desc, tx_buf = mtk_desc_to_tx_buf(ring, desc,
eth->soc->txrx.txd_size); eth->soc->txrx.txd_size);
if (tx_buf->flags & MTK_TX_FLAGS_FPORT1) if (tx_buf->flags & MTK_TX_FLAGS_FPORT1)
@ -154,7 +154,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (!tx_buf->data) if (!tx_buf->data)
break; break;
@@ -3799,7 +3845,26 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3798,7 +3844,26 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4); mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4);
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
@ -182,7 +182,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
/* PSE should not drop port8 and port9 packets from WDMA Tx */ /* PSE should not drop port8 and port9 packets from WDMA Tx */
mtk_w32(eth, 0x00000300, PSE_DROP_CFG); mtk_w32(eth, 0x00000300, PSE_DROP_CFG);
@@ -4364,7 +4429,11 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4363,7 +4428,11 @@ static int mtk_add_mac(struct mtk_eth *e
} }
spin_lock_init(&mac->hw_stats->stats_lock); spin_lock_init(&mac->hw_stats->stats_lock);
u64_stats_init(&mac->hw_stats->syncp); u64_stats_init(&mac->hw_stats->syncp);

View File

@ -126,7 +126,7 @@ mtk_eth_soc driver.
}; };
void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg) void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg)
@@ -1253,10 +1345,19 @@ static void mtk_tx_set_dma_desc_v2(struc @@ -1252,10 +1344,19 @@ static void mtk_tx_set_dma_desc_v2(struc
data |= TX_DMA_LS0; data |= TX_DMA_LS0;
WRITE_ONCE(desc->txd3, data); WRITE_ONCE(desc->txd3, data);
@ -150,7 +150,7 @@ mtk_eth_soc driver.
data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid);
WRITE_ONCE(desc->txd4, data); WRITE_ONCE(desc->txd4, data);
@@ -5013,6 +5114,25 @@ static const struct mtk_soc_data mt7986_ @@ -5012,6 +5113,25 @@ static const struct mtk_soc_data mt7986_
}, },
}; };
@ -176,7 +176,7 @@ mtk_eth_soc driver.
static const struct mtk_soc_data rt5350_data = { static const struct mtk_soc_data rt5350_data = {
.reg_map = &mt7628_reg_map, .reg_map = &mt7628_reg_map,
.caps = MT7628_CAPS, .caps = MT7628_CAPS,
@@ -5031,14 +5151,15 @@ static const struct mtk_soc_data rt5350_ @@ -5030,14 +5150,15 @@ static const struct mtk_soc_data rt5350_
}; };
const struct of_device_id of_mtk_match[] = { const struct of_device_id of_mtk_match[] = {

View File

@ -435,7 +435,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
return; return;
err_phy: err_phy:
@@ -675,11 +779,40 @@ static int mtk_mac_finish(struct phylink @@ -674,11 +778,40 @@ static int mtk_mac_finish(struct phylink
return 0; return 0;
} }
@ -479,7 +479,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
u32 pmsr = mtk_r32(mac->hw, MTK_MAC_MSR(mac->id)); u32 pmsr = mtk_r32(mac->hw, MTK_MAC_MSR(mac->id));
state->link = (pmsr & MAC_MSR_LINK); state->link = (pmsr & MAC_MSR_LINK);
@@ -707,15 +840,35 @@ static void mtk_mac_pcs_get_state(struct @@ -706,15 +839,35 @@ static void mtk_mac_pcs_get_state(struct
state->pause |= MLO_PAUSE_TX; state->pause |= MLO_PAUSE_TX;
} }
@ -503,7 +503,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
- u32 mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); - u32 mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
+ u32 mcr; + u32 mcr;
- mcr &= ~(MAC_MCR_TX_EN | MAC_MCR_RX_EN); - mcr &= ~(MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK);
- mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); - mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
+ if (!mtk_interface_mode_is_xgmii(interface)) { + if (!mtk_interface_mode_is_xgmii(interface)) {
+ mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); + mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
@ -518,7 +518,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
} }
static void mtk_set_queue_speed(struct mtk_eth *eth, unsigned int idx, static void mtk_set_queue_speed(struct mtk_eth *eth, unsigned int idx,
@@ -787,13 +940,11 @@ static void mtk_set_queue_speed(struct m @@ -786,13 +939,11 @@ static void mtk_set_queue_speed(struct m
mtk_w32(eth, val, soc->reg_map->qdma.qtx_sch + ofs); mtk_w32(eth, val, soc->reg_map->qdma.qtx_sch + ofs);
} }
@ -536,7 +536,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
u32 mcr; u32 mcr;
mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
@@ -827,6 +978,47 @@ static void mtk_mac_link_up(struct phyli @@ -826,6 +977,47 @@ static void mtk_mac_link_up(struct phyli
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
} }
@ -584,7 +584,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
static const struct phylink_mac_ops mtk_phylink_ops = { static const struct phylink_mac_ops mtk_phylink_ops = {
.validate = phylink_generic_validate, .validate = phylink_generic_validate,
.mac_select_pcs = mtk_mac_select_pcs, .mac_select_pcs = mtk_mac_select_pcs,
@@ -880,10 +1072,21 @@ static int mtk_mdio_init(struct mtk_eth @@ -879,10 +1071,21 @@ static int mtk_mdio_init(struct mtk_eth
} }
divider = min_t(unsigned int, DIV_ROUND_UP(MDC_MAX_FREQ, max_clk), 63); divider = min_t(unsigned int, DIV_ROUND_UP(MDC_MAX_FREQ, max_clk), 63);
@ -607,7 +607,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
mtk_w32(eth, val, MTK_PPSC); mtk_w32(eth, val, MTK_PPSC);
dev_dbg(eth->dev, "MDC is running on %d Hz\n", MDC_MAX_FREQ / divider); dev_dbg(eth->dev, "MDC is running on %d Hz\n", MDC_MAX_FREQ / divider);
@@ -4472,8 +4675,8 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4471,8 +4674,8 @@ static int mtk_add_mac(struct mtk_eth *e
const __be32 *_id = of_get_property(np, "reg", NULL); const __be32 *_id = of_get_property(np, "reg", NULL);
phy_interface_t phy_mode; phy_interface_t phy_mode;
struct phylink *phylink; struct phylink *phylink;
@ -617,7 +617,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
int txqs = 1; int txqs = 1;
if (!_id) { if (!_id) {
@@ -4575,6 +4778,32 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4574,6 +4777,32 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.supported_interfaces); mac->phylink_config.supported_interfaces);
} }
@ -650,7 +650,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
phylink = phylink_create(&mac->phylink_config, phylink = phylink_create(&mac->phylink_config,
of_fwnode_handle(mac->of_node), of_fwnode_handle(mac->of_node),
phy_mode, &mtk_phylink_ops); phy_mode, &mtk_phylink_ops);
@@ -4762,6 +4991,13 @@ static int mtk_probe(struct platform_dev @@ -4761,6 +4990,13 @@ static int mtk_probe(struct platform_dev
if (err) if (err)
return err; return err;

View File

@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi, void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi,
int (*poll)(struct napi_struct *, int), int weight) int (*poll)(struct napi_struct *, int), int weight)
{ {
@@ -11183,6 +11254,9 @@ static int dev_cpu_dead(unsigned int old @@ -11186,6 +11257,9 @@ static int dev_cpu_dead(unsigned int old
raise_softirq_irqoff(NET_TX_SOFTIRQ); raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_enable(); local_irq_enable();
@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#ifdef CONFIG_RPS #ifdef CONFIG_RPS
remsd = oldsd->rps_ipi_list; remsd = oldsd->rps_ipi_list;
oldsd->rps_ipi_list = NULL; oldsd->rps_ipi_list = NULL;
@@ -11495,6 +11569,7 @@ static int __init net_dev_init(void) @@ -11498,6 +11572,7 @@ static int __init net_dev_init(void)
INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd); INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd);
spin_lock_init(&sd->defer_lock); spin_lock_init(&sd->defer_lock);

View File

@ -16,7 +16,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
--- a/drivers/net/dsa/mt7530.c --- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c
@@ -2142,10 +2142,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr @@ -2178,10 +2178,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
{ {
struct dsa_switch *ds = priv->ds; struct dsa_switch *ds = priv->ds;
struct device *dev = priv->dev; struct device *dev = priv->dev;
@ -30,7 +30,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
bus = devm_mdiobus_alloc(dev); bus = devm_mdiobus_alloc(dev);
if (!bus) if (!bus)
return -ENOMEM; return -ENOMEM;
@@ -2162,7 +2165,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr @@ -2198,7 +2201,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
if (priv->irq) if (priv->irq)
mt7530_setup_mdio_irq(priv); mt7530_setup_mdio_irq(priv);

View File

@ -70,7 +70,7 @@ v1 -> v2:
--- a/drivers/gpio/Kconfig --- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig
@@ -1711,4 +1711,19 @@ config GPIO_SIM @@ -1712,4 +1712,19 @@ config GPIO_SIM
endmenu endmenu

View File

@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
help help
--- a/init/main.c --- a/init/main.c
+++ b/init/main.c +++ b/init/main.c
@@ -611,6 +611,29 @@ static inline void setup_nr_cpu_ids(void @@ -612,6 +612,29 @@ static inline void setup_nr_cpu_ids(void
static inline void smp_prepare_cpus(unsigned int maxcpus) { } static inline void smp_prepare_cpus(unsigned int maxcpus) { }
#endif #endif
@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
/* /*
* We need to store the untouched command line for future reference. * We need to store the untouched command line for future reference.
* We also need to store the touched command line since the parameter * We also need to store the touched command line since the parameter
@@ -958,6 +981,7 @@ asmlinkage __visible void __init __no_sa @@ -959,6 +982,7 @@ asmlinkage __visible void __init __no_sa
pr_notice("%s", linux_banner); pr_notice("%s", linux_banner);
early_security_init(); early_security_init();
setup_arch(&command_line); setup_arch(&command_line);

View File

@ -36,7 +36,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
{ .compatible = "qcom,msm8960", }, { .compatible = "qcom,msm8960", },
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
@@ -149,6 +149,11 @@ static int qcom_cpufreq_kryo_name_versio @@ -148,6 +148,11 @@ static int qcom_cpufreq_kryo_name_versio
switch (msm_id) { switch (msm_id) {
case QCOM_ID_MSM8996: case QCOM_ID_MSM8996:
case QCOM_ID_APQ8096: case QCOM_ID_APQ8096:

View File

@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
timer { timer {
@@ -239,6 +280,11 @@ @@ -240,6 +281,11 @@
reg = <0 0x15010000 0 0x1000>; reg = <0 0x15010000 0 0x1000>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@ -78,7 +78,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
wed1: wed@15011000 { wed1: wed@15011000 {
@@ -247,6 +293,25 @@ @@ -248,6 +294,25 @@
reg = <0 0x15011000 0 0x1000>; reg = <0 0x15011000 0 0x1000>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;

View File

@ -31,7 +31,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -223,6 +223,21 @@ @@ -224,6 +224,21 @@
status = "disabled"; status = "disabled";
}; };

View File

@ -14,7 +14,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -279,6 +279,20 @@ @@ -280,6 +280,20 @@
status = "disabled"; status = "disabled";
}; };

View File

@ -69,7 +69,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
#address-cells = <1>; #address-cells = <1>;
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -294,6 +294,34 @@ @@ -295,6 +295,34 @@
status = "disabled"; status = "disabled";
}; };

View File

@ -42,7 +42,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
pinctrl-names = "default", "dbdc"; pinctrl-names = "default", "dbdc";
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -322,6 +322,61 @@ @@ -323,6 +323,61 @@
status = "disabled"; status = "disabled";
}; };

View File

@ -136,7 +136,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
function = "spi"; function = "spi";
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -345,6 +345,21 @@ @@ -346,6 +346,21 @@
status = "disabled"; status = "disabled";
}; };

View File

@ -58,7 +58,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
/ { / {
compatible = "mediatek,mt7986a"; compatible = "mediatek,mt7986a";
@@ -360,6 +361,57 @@ @@ -361,6 +362,57 @@
status = "disabled"; status = "disabled";
}; };

View File

@ -15,7 +15,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -240,6 +240,20 @@ @@ -241,6 +241,20 @@
status = "disabled"; status = "disabled";
}; };

View File

@ -16,7 +16,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -337,6 +337,15 @@ @@ -338,6 +338,15 @@
status = "disabled"; status = "disabled";
}; };
@ -32,7 +32,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
ssusb: usb@11200000 { ssusb: usb@11200000 {
compatible = "mediatek,mt7986-xhci", compatible = "mediatek,mt7986-xhci",
"mediatek,mtk-xhci"; "mediatek,mtk-xhci";
@@ -375,6 +384,21 @@ @@ -376,6 +385,21 @@
status = "disabled"; status = "disabled";
}; };
@ -54,7 +54,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
pcie: pcie@11280000 { pcie: pcie@11280000 {
compatible = "mediatek,mt7986-pcie", compatible = "mediatek,mt7986-pcie",
"mediatek,mt8192-pcie"; "mediatek,mt8192-pcie";
@@ -426,6 +450,17 @@ @@ -427,6 +451,17 @@
}; };
}; };
@ -72,7 +72,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
usb_phy: t-phy@11e10000 { usb_phy: t-phy@11e10000 {
compatible = "mediatek,mt7986-tphy", compatible = "mediatek,mt7986-tphy",
"mediatek,generic-tphy-v2"; "mediatek,generic-tphy-v2";
@@ -567,5 +602,4 @@ @@ -568,5 +603,4 @@
memory-region = <&wmcpu_emi>; memory-region = <&wmcpu_emi>;
}; };
}; };

View File

@ -16,7 +16,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -602,4 +602,32 @@ @@ -603,4 +603,32 @@
memory-region = <&wmcpu_emi>; memory-region = <&wmcpu_emi>;
}; };
}; };

View File

@ -18,7 +18,7 @@ Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -610,22 +610,34 @@ @@ -611,22 +611,34 @@
thermal-sensors = <&thermal 0>; thermal-sensors = <&thermal 0>;
trips { trips {

View File

@ -38,10 +38,10 @@
memory@40000000 { memory@40000000 {
- reg = <0 0x40000000 0 0x20000000>; - reg = <0 0x40000000 0 0x20000000>;
+ reg = <0 0x40000000 0 0x40000000>; + reg = <0 0x40000000 0 0x40000000>;
device_type = "memory";
}; };
reg_1p8v: regulator-1p8v { @@ -133,22 +132,22 @@
@@ -132,22 +131,22 @@
port@0 { port@0 {
reg = <0>; reg = <0>;

View File

@ -8,7 +8,7 @@
}; };
chosen { chosen {
@@ -164,22 +165,22 @@ @@ -165,22 +166,22 @@
port@1 { port@1 {
reg = <1>; reg = <1>;

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -558,12 +558,16 @@ @@ -559,12 +559,16 @@
status = "okay"; status = "okay";
}; };

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -255,14 +255,42 @@ @@ -256,14 +256,42 @@
status = "disabled"; status = "disabled";
}; };

View File

@ -1,7 +1,7 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -538,6 +538,65 @@ @@ -524,6 +524,65 @@
status = "disabled"; status = "okay";
}; };
+&bch { +&bch {

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -579,7 +579,7 @@ @@ -565,7 +565,7 @@
reg = <0x140000 0x0080000>; reg = <0x140000 0x0080000>;
}; };
@ -9,7 +9,7 @@
label = "Factory"; label = "Factory";
reg = <0x1c0000 0x0100000>; reg = <0x1c0000 0x0100000>;
}; };
@@ -640,5 +640,6 @@ @@ -626,5 +626,6 @@
&wmac { &wmac {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&wmac_pins>; pinctrl-0 = <&wmac_pins>;

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -156,6 +156,10 @@ @@ -157,6 +157,10 @@
switch@0 { switch@0 {
compatible = "mediatek,mt7531"; compatible = "mediatek,mt7531";
reg = <0>; reg = <0>;

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -552,6 +552,7 @@ @@ -538,6 +538,7 @@
spi-tx-bus-width = <4>; spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>; spi-rx-bus-width = <4>;
nand-ecc-engine = <&snfi>; nand-ecc-engine = <&snfi>;

View File

@ -97,7 +97,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
if (mdata->dev_comp->need_pad_sel && spi->cs_gpiod) if (mdata->dev_comp->need_pad_sel && spi->cs_gpiod)
/* CS de-asserted, gpiolib will handle inversion */ /* CS de-asserted, gpiolib will handle inversion */
gpiod_direction_output(spi->cs_gpiod, 0); gpiod_direction_output(spi->cs_gpiod, 0);
@@ -1138,6 +1126,10 @@ static int mtk_spi_probe(struct platform @@ -1140,6 +1128,10 @@ static int mtk_spi_probe(struct platform
mdata = spi_master_get_devdata(master); mdata = spi_master_get_devdata(master);
mdata->dev_comp = device_get_match_data(dev); mdata->dev_comp = device_get_match_data(dev);

View File

@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
--- a/drivers/spi/spi-mt65xx.c --- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c
@@ -832,6 +832,21 @@ static irqreturn_t mtk_spi_interrupt(int @@ -834,6 +834,21 @@ static irqreturn_t mtk_spi_interrupt(int
return IRQ_HANDLED; return IRQ_HANDLED;
} }
@ -33,7 +33,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
static int mtk_spi_mem_adjust_op_size(struct spi_mem *mem, static int mtk_spi_mem_adjust_op_size(struct spi_mem *mem,
struct spi_mem_op *op) struct spi_mem_op *op)
{ {
@@ -1122,6 +1137,7 @@ static int mtk_spi_probe(struct platform @@ -1124,6 +1139,7 @@ static int mtk_spi_probe(struct platform
master->setup = mtk_spi_setup; master->setup = mtk_spi_setup;
master->set_cs_timing = mtk_spi_set_hw_cs_timing; master->set_cs_timing = mtk_spi_set_hw_cs_timing;
master->use_gpio_descriptors = true; master->use_gpio_descriptors = true;

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -314,7 +314,7 @@ @@ -315,7 +315,7 @@
/* Attention: GPIO 90 is used to switch between PCIe@1,0 and /* Attention: GPIO 90 is used to switch between PCIe@1,0 and
* SATA functions. i.e. output-high: PCIe, output-low: SATA * SATA functions. i.e. output-high: PCIe, output-low: SATA
*/ */

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -641,5 +641,28 @@ @@ -642,5 +642,28 @@
}; };
&wmac { &wmac {

View File

@ -1,6 +1,6 @@
--- a/drivers/spi/spi-mt65xx.c --- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c
@@ -1225,8 +1225,15 @@ static int mtk_spi_probe(struct platform @@ -1227,8 +1227,15 @@ static int mtk_spi_probe(struct platform
if (ret < 0) if (ret < 0)
return dev_err_probe(dev, ret, "failed to enable hclk\n"); return dev_err_probe(dev, ret, "failed to enable hclk\n");

View File

@ -24,7 +24,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
}; };
timer { timer {
@@ -518,10 +512,11 @@ @@ -519,10 +513,11 @@
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>, memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>,
@ -38,7 +38,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
}; };
wed1: wed@15011000 { wed1: wed@15011000 {
@@ -531,10 +526,11 @@ @@ -532,10 +527,11 @@
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>, memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>,
@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
}; };
wo_ccif0: syscon@151a5000 { wo_ccif0: syscon@151a5000 {
@@ -551,6 +547,11 @@ @@ -552,6 +548,11 @@
interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
}; };

View File

@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
wo_data: wo-data@4fd80000 { wo_data: wo-data@4fd80000 {
reg = <0 0x4fd80000 0 0x240000>; reg = <0 0x4fd80000 0 0x240000>;
no-map; no-map;
@@ -511,11 +501,10 @@ @@ -512,11 +502,10 @@
reg = <0 0x15010000 0 0x1000>; reg = <0 0x15010000 0 0x1000>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>; mediatek,wo-cpuboot = <&wo_cpuboot>;
}; };
@@ -525,11 +514,10 @@ @@ -526,11 +515,10 @@
reg = <0 0x15011000 0 0x1000>; reg = <0 0x15011000 0 0x1000>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
@ -64,7 +64,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>; mediatek,wo-cpuboot = <&wo_cpuboot>;
}; };
@@ -547,6 +535,16 @@ @@ -548,6 +536,16 @@
interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
}; };

View File

@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
}; };
timer { timer {
@@ -501,10 +491,11 @@ @@ -502,10 +492,11 @@
reg = <0 0x15010000 0 0x1000>; reg = <0 0x15010000 0 0x1000>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@ -48,7 +48,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>; mediatek,wo-cpuboot = <&wo_cpuboot>;
}; };
@@ -514,10 +505,11 @@ @@ -515,10 +506,11 @@
reg = <0 0x15011000 0 0x1000>; reg = <0 0x15011000 0 0x1000>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
@ -62,7 +62,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>; mediatek,wo-cpuboot = <&wo_cpuboot>;
}; };
@@ -545,6 +537,16 @@ @@ -546,6 +538,16 @@
reg = <0 0x151f0000 0 0x8000>; reg = <0 0x151f0000 0 0x8000>;
}; };

View File

@ -35,7 +35,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
{ .compatible = "qcom,msm8974", }, { .compatible = "qcom,msm8974", },
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
@@ -31,6 +31,8 @@ @@ -30,6 +30,8 @@
#include <dt-bindings/arm/qcom,ids.h> #include <dt-bindings/arm/qcom,ids.h>
@ -44,7 +44,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
struct qcom_cpufreq_drv; struct qcom_cpufreq_drv;
struct qcom_cpufreq_match_data { struct qcom_cpufreq_match_data {
@@ -204,6 +206,57 @@ len_error: @@ -203,6 +205,57 @@ len_error:
return ret; return ret;
} }
@ -102,7 +102,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
static const struct qcom_cpufreq_match_data match_data_kryo = { static const struct qcom_cpufreq_match_data match_data_kryo = {
.get_version = qcom_cpufreq_kryo_name_version, .get_version = qcom_cpufreq_kryo_name_version,
}; };
@@ -218,6 +271,10 @@ static const struct qcom_cpufreq_match_d @@ -217,6 +270,10 @@ static const struct qcom_cpufreq_match_d
.genpd_names = qcs404_genpd_names, .genpd_names = qcs404_genpd_names,
}; };
@ -113,7 +113,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
static int qcom_cpufreq_probe(struct platform_device *pdev) static int qcom_cpufreq_probe(struct platform_device *pdev)
{ {
struct qcom_cpufreq_drv *drv; struct qcom_cpufreq_drv *drv;
@@ -362,6 +419,7 @@ static const struct of_device_id qcom_cp @@ -361,6 +418,7 @@ static const struct of_device_id qcom_cp
{ .compatible = "qcom,apq8096", .data = &match_data_kryo }, { .compatible = "qcom,apq8096", .data = &match_data_kryo },
{ .compatible = "qcom,msm8996", .data = &match_data_kryo }, { .compatible = "qcom,msm8996", .data = &match_data_kryo },
{ .compatible = "qcom,qcs404", .data = &match_data_qcs404 }, { .compatible = "qcom,qcs404", .data = &match_data_qcs404 },

View File

@ -35,7 +35,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
{ .compatible = "qcom,msm8960", }, { .compatible = "qcom,msm8960", },
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
@@ -33,6 +33,11 @@ @@ -32,6 +32,11 @@
#define IPQ6000_VERSION BIT(2) #define IPQ6000_VERSION BIT(2)
@ -47,7 +47,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
struct qcom_cpufreq_drv; struct qcom_cpufreq_drv;
struct qcom_cpufreq_match_data { struct qcom_cpufreq_match_data {
@@ -257,6 +262,44 @@ static int qcom_cpufreq_ipq6018_name_ver @@ -256,6 +261,44 @@ static int qcom_cpufreq_ipq6018_name_ver
return 0; return 0;
} }
@ -92,7 +92,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
static const struct qcom_cpufreq_match_data match_data_kryo = { static const struct qcom_cpufreq_match_data match_data_kryo = {
.get_version = qcom_cpufreq_kryo_name_version, .get_version = qcom_cpufreq_kryo_name_version,
}; };
@@ -275,6 +318,10 @@ static const struct qcom_cpufreq_match_d @@ -274,6 +317,10 @@ static const struct qcom_cpufreq_match_d
.get_version = qcom_cpufreq_ipq6018_name_version, .get_version = qcom_cpufreq_ipq6018_name_version,
}; };
@ -103,7 +103,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
static int qcom_cpufreq_probe(struct platform_device *pdev) static int qcom_cpufreq_probe(struct platform_device *pdev)
{ {
struct qcom_cpufreq_drv *drv; struct qcom_cpufreq_drv *drv;
@@ -421,6 +468,7 @@ static const struct of_device_id qcom_cp @@ -420,6 +467,7 @@ static const struct of_device_id qcom_cp
{ .compatible = "qcom,qcs404", .data = &match_data_qcs404 }, { .compatible = "qcom,qcs404", .data = &match_data_qcs404 },
{ .compatible = "qcom,ipq6018", .data = &match_data_ipq6018 }, { .compatible = "qcom,ipq6018", .data = &match_data_ipq6018 },
{ .compatible = "qcom,ipq8064", .data = &match_data_krait }, { .compatible = "qcom,ipq8064", .data = &match_data_krait },

View File

@ -18,7 +18,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/net/rfkill/rfkill-gpio.c --- a/net/rfkill/rfkill-gpio.c
+++ b/net/rfkill/rfkill-gpio.c +++ b/net/rfkill/rfkill-gpio.c
@@ -75,6 +75,8 @@ static int rfkill_gpio_probe(struct platform_device *pdev) @@ -75,6 +75,8 @@ static int rfkill_gpio_probe(struct plat
{ {
struct rfkill_gpio_data *rfkill; struct rfkill_gpio_data *rfkill;
struct gpio_desc *gpio; struct gpio_desc *gpio;
@ -27,7 +27,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
const char *type_name; const char *type_name;
int ret; int ret;
@@ -82,8 +84,15 @@ static int rfkill_gpio_probe(struct platform_device *pdev) @@ -82,8 +84,15 @@ static int rfkill_gpio_probe(struct plat
if (!rfkill) if (!rfkill)
return -ENOMEM; return -ENOMEM;
@ -45,7 +45,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
if (!rfkill->name) if (!rfkill->name)
rfkill->name = dev_name(&pdev->dev); rfkill->name = dev_name(&pdev->dev);
@@ -157,12 +166,19 @@ static const struct acpi_device_id rfkill_acpi_match[] = { @@ -165,12 +174,19 @@ static const struct acpi_device_id rfkil
MODULE_DEVICE_TABLE(acpi, rfkill_acpi_match); MODULE_DEVICE_TABLE(acpi, rfkill_acpi_match);
#endif #endif
@ -64,3 +64,4 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+ .of_match_table = of_match_ptr(rfkill_of_match), + .of_match_table = of_match_ptr(rfkill_of_match),
}, },
}; };

View File

@ -83,7 +83,7 @@
}; };
usb_host0_ehci: usb@fd800000 { usb_host0_ehci: usb@fd800000 {
@@ -977,7 +984,7 @@ @@ -978,7 +985,7 @@
num-ib-windows = <6>; num-ib-windows = <6>;
num-ob-windows = <2>; num-ob-windows = <2>;
max-link-speed = <2>; max-link-speed = <2>;

View File

@ -7,8 +7,6 @@ Subject: [PATCH] nvmem: sunxi_sid: add sunxi_get_soc_chipid, sunxi_get_serial
drivers/nvmem/sunxi_sid.c | 28 ++++++++++++++++++++++++++++ drivers/nvmem/sunxi_sid.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+) 1 file changed, 28 insertions(+)
diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index 37a6abb0e..c81fac63d 100644
--- a/drivers/nvmem/sunxi_sid.c --- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c +++ b/drivers/nvmem/sunxi_sid.c
@@ -37,6 +37,25 @@ struct sunxi_sid { @@ -37,6 +37,25 @@ struct sunxi_sid {
@ -37,7 +35,7 @@ index 37a6abb0e..c81fac63d 100644
static int sunxi_sid_read(void *context, unsigned int offset, static int sunxi_sid_read(void *context, unsigned int offset,
void *val, size_t bytes) void *val, size_t bytes)
{ {
@@ -167,6 +186,15 @@ static int sunxi_sid_probe(struct platform_device *pdev) @@ -180,6 +199,15 @@ static int sunxi_sid_probe(struct platfo
platform_set_drvdata(pdev, nvmem); platform_set_drvdata(pdev, nvmem);
@ -53,5 +51,3 @@ index 37a6abb0e..c81fac63d 100644
return 0; return 0;
} }
--
2.34.1