}
u64_stats_update_end(&hw_stats->syncp);
-@@ -864,10 +917,10 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -875,10 +928,10 @@ static int mtk_init_fq_dma(struct mtk_et
txd->txd4 = 0;
}
return 0;
}
-@@ -1111,7 +1164,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1122,7 +1175,7 @@ static int mtk_tx_map(struct sk_buff *sk
if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
if (netif_xmit_stopped(netdev_get_tx_queue(dev, 0)) ||
!netdev_xmit_more())
} else {
int next_idx;
-@@ -1425,6 +1478,7 @@ rx_done:
+@@ -1439,6 +1492,7 @@ rx_done:
static int mtk_poll_tx_qdma(struct mtk_eth *eth, int budget,
unsigned int *done, unsigned int *bytes)
{
struct mtk_tx_ring *ring = ð->tx_ring;
struct mtk_tx_dma *desc;
struct sk_buff *skb;
-@@ -1432,7 +1486,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1446,7 +1500,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
u32 cpu, dma;
cpu = ring->last_free_ptr;
desc = mtk_qdma_phys_to_virt(ring, cpu);
-@@ -1467,7 +1521,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1481,7 +1535,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
}
ring->last_free_ptr = cpu;
return budget;
}
-@@ -1560,24 +1614,25 @@ static void mtk_handle_status_irq(struct
+@@ -1574,24 +1628,25 @@ static void mtk_handle_status_irq(struct
static int mtk_napi_tx(struct napi_struct *napi, int budget)
{
struct mtk_eth *eth = container_of(napi, struct mtk_eth, tx_napi);
return budget;
if (napi_complete_done(napi, tx_done))
-@@ -1589,6 +1644,7 @@ static int mtk_napi_tx(struct napi_struc
+@@ -1603,6 +1658,7 @@ static int mtk_napi_tx(struct napi_struc
static int mtk_napi_rx(struct napi_struct *napi, int budget)
{
struct mtk_eth *eth = container_of(napi, struct mtk_eth, rx_napi);
int rx_done_total = 0;
mtk_handle_status_irq(eth);
-@@ -1596,21 +1652,21 @@ static int mtk_napi_rx(struct napi_struc
+@@ -1610,21 +1666,21 @@ static int mtk_napi_rx(struct napi_struc
do {
int rx_done;
if (napi_complete_done(napi, rx_done_total))
mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
-@@ -1673,20 +1729,20 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1687,20 +1743,20 @@ static int mtk_tx_alloc(struct mtk_eth *
*/
wmb();
}
return 0;
-@@ -1725,6 +1781,7 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -1739,6 +1795,7 @@ static void mtk_tx_clean(struct mtk_eth
static int mtk_rx_alloc(struct mtk_eth *eth, int ring_no, int rx_flag)
{
struct mtk_rx_ring *ring;
int rx_data_len, rx_dma_size;
int i;
-@@ -1790,16 +1847,18 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -1807,16 +1864,18 @@ static int mtk_rx_alloc(struct mtk_eth *
ring->dma_size = rx_dma_size;
ring->calc_idx_update = false;
ring->calc_idx = rx_dma_size - 1;
return 0;
}
-@@ -2108,9 +2167,9 @@ static int mtk_dma_busy_wait(struct mtk_
+@@ -2125,9 +2184,9 @@ static int mtk_dma_busy_wait(struct mtk_
u32 val;
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
ret = readx_poll_timeout_atomic(__raw_readl, eth->base + reg, val,
!(val & (MTK_RX_DMA_BUSY | MTK_TX_DMA_BUSY)),
-@@ -2168,8 +2227,8 @@ static int mtk_dma_init(struct mtk_eth *
+@@ -2185,8 +2244,8 @@ static int mtk_dma_init(struct mtk_eth *
* automatically
*/
mtk_w32(eth, FC_THRES_DROP_MODE | FC_THRES_DROP_EN |
}
return 0;
-@@ -2243,13 +2302,14 @@ static irqreturn_t mtk_handle_irq_tx(int
+@@ -2260,13 +2319,14 @@ static irqreturn_t mtk_handle_irq_tx(int
static irqreturn_t mtk_handle_irq(int irq, void *_eth)
{
struct mtk_eth *eth = _eth;
mtk_handle_irq_tx(irq, _eth);
}
-@@ -2273,6 +2333,7 @@ static void mtk_poll_controller(struct n
+@@ -2290,6 +2350,7 @@ static void mtk_poll_controller(struct n
static int mtk_start_dma(struct mtk_eth *eth)
{
u32 rx_2b_offset = (NET_IP_ALIGN == 2) ? MTK_RX_2B_OFFSET : 0;
int err;
err = mtk_dma_init(eth);
-@@ -2287,16 +2348,15 @@ static int mtk_start_dma(struct mtk_eth
+@@ -2304,16 +2365,15 @@ static int mtk_start_dma(struct mtk_eth
MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
MTK_RX_DMA_EN | MTK_RX_2B_OFFSET |
MTK_RX_BT_32DWORDS,
}
return 0;
-@@ -2420,8 +2480,8 @@ static int mtk_stop(struct net_device *d
+@@ -2437,8 +2497,8 @@ static int mtk_stop(struct net_device *d
cancel_work_sync(ð->tx_dim.work);
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
mtk_dma_free(eth);
-@@ -2475,6 +2535,7 @@ static void mtk_dim_rx(struct work_struc
+@@ -2492,6 +2552,7 @@ static void mtk_dim_rx(struct work_struc
{
struct dim *dim = container_of(work, struct dim, work);
struct mtk_eth *eth = container_of(dim, struct mtk_eth, rx_dim);
struct dim_cq_moder cur_profile;
u32 val, cur;
-@@ -2482,7 +2543,7 @@ static void mtk_dim_rx(struct work_struc
+@@ -2499,7 +2560,7 @@ static void mtk_dim_rx(struct work_struc
dim->profile_ix);
spin_lock_bh(ð->dim_lock);
val &= MTK_PDMA_DELAY_TX_MASK;
val |= MTK_PDMA_DELAY_RX_EN;
-@@ -2492,9 +2553,9 @@ static void mtk_dim_rx(struct work_struc
+@@ -2509,9 +2570,9 @@ static void mtk_dim_rx(struct work_struc
cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
val |= cur << MTK_PDMA_DELAY_RX_PINT_SHIFT;
spin_unlock_bh(ð->dim_lock);
-@@ -2505,6 +2566,7 @@ static void mtk_dim_tx(struct work_struc
+@@ -2522,6 +2583,7 @@ static void mtk_dim_tx(struct work_struc
{
struct dim *dim = container_of(work, struct dim, work);
struct mtk_eth *eth = container_of(dim, struct mtk_eth, tx_dim);
struct dim_cq_moder cur_profile;
u32 val, cur;
-@@ -2512,7 +2574,7 @@ static void mtk_dim_tx(struct work_struc
+@@ -2529,7 +2591,7 @@ static void mtk_dim_tx(struct work_struc
dim->profile_ix);
spin_lock_bh(ð->dim_lock);
val &= MTK_PDMA_DELAY_RX_MASK;
val |= MTK_PDMA_DELAY_TX_EN;
-@@ -2522,9 +2584,9 @@ static void mtk_dim_tx(struct work_struc
+@@ -2539,9 +2601,9 @@ static void mtk_dim_tx(struct work_struc
cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
val |= cur << MTK_PDMA_DELAY_TX_PINT_SHIFT;
spin_unlock_bh(ð->dim_lock);
-@@ -2535,6 +2597,7 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2552,6 +2614,7 @@ static int mtk_hw_init(struct mtk_eth *e
{
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
ETHSYS_DMA_AG_MAP_PPE;
int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, ð->state))
-@@ -2609,10 +2672,10 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2626,10 +2689,10 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_rx_irq_disable(eth, ~0);
/* FE int grouping */
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
return 0;
-@@ -3151,14 +3214,6 @@ static int mtk_probe(struct platform_dev
+@@ -3168,14 +3231,6 @@ static int mtk_probe(struct platform_dev
if (IS_ERR(eth->base))
return PTR_ERR(eth->base);
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA;
eth->ip_align = NET_IP_ALIGN;
-@@ -3392,6 +3447,7 @@ static int mtk_remove(struct platform_de
+@@ -3409,6 +3464,7 @@ static int mtk_remove(struct platform_de
}
static const struct mtk_soc_data mt2701_data = {
.caps = MT7623_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP,
-@@ -3403,6 +3459,7 @@ static const struct mtk_soc_data mt2701_
+@@ -3420,6 +3476,7 @@ static const struct mtk_soc_data mt2701_
};
static const struct mtk_soc_data mt7621_data = {
.caps = MT7621_CAPS,
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP,
-@@ -3415,6 +3472,7 @@ static const struct mtk_soc_data mt7621_
+@@ -3432,6 +3489,7 @@ static const struct mtk_soc_data mt7621_
};
static const struct mtk_soc_data mt7622_data = {
.ana_rgc3 = 0x2028,
.caps = MT7622_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES,
-@@ -3428,6 +3486,7 @@ static const struct mtk_soc_data mt7622_
+@@ -3445,6 +3503,7 @@ static const struct mtk_soc_data mt7622_
};
static const struct mtk_soc_data mt7623_data = {
.caps = MT7623_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP,
-@@ -3440,6 +3499,7 @@ static const struct mtk_soc_data mt7623_
+@@ -3457,6 +3516,7 @@ static const struct mtk_soc_data mt7623_
};
static const struct mtk_soc_data mt7629_data = {
.ana_rgc3 = 0x128,
.caps = MT7629_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES,
-@@ -3452,6 +3512,7 @@ static const struct mtk_soc_data mt7629_
+@@ -3469,6 +3529,7 @@ static const struct mtk_soc_data mt7629_
};
static const struct mtk_soc_data rt5350_data = {