|
|
@@ -490,7 +490,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
.mac_finish = mtk_mac_finish,
|
|
|
.mac_link_down = mtk_mac_link_down,
|
|
|
.mac_link_up = mtk_mac_link_up,
|
|
|
-@@ -3407,6 +3548,9 @@ static int mtk_open(struct net_device *d
|
|
|
+@@ -3415,6 +3556,9 @@ static int mtk_open(struct net_device *d
|
|
|
|
|
|
ppe_num = eth->soc->ppe_num;
|
|
|
|
|
|
@@ -500,7 +500,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
|
|
|
if (err) {
|
|
|
netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
|
|
|
-@@ -3557,6 +3701,9 @@ static int mtk_stop(struct net_device *d
|
|
|
+@@ -3565,6 +3709,9 @@ static int mtk_stop(struct net_device *d
|
|
|
for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
|
|
|
mtk_ppe_stop(eth->ppe[i]);
|
|
|
|
|
|
@@ -510,7 +510,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-@@ -4570,6 +4717,7 @@ static const struct net_device_ops mtk_n
|
|
|
+@@ -4578,6 +4725,7 @@ static const struct net_device_ops mtk_n
|
|
|
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
|
|
{
|
|
|
const __be32 *_id = of_get_property(np, "reg", NULL);
|
|
|
@@ -518,7 +518,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
phy_interface_t phy_mode;
|
|
|
struct phylink *phylink;
|
|
|
struct mtk_mac *mac;
|
|
|
-@@ -4606,16 +4754,41 @@ static int mtk_add_mac(struct mtk_eth *e
|
|
|
+@@ -4614,16 +4762,41 @@ static int mtk_add_mac(struct mtk_eth *e
|
|
|
mac->id = id;
|
|
|
mac->hw = eth;
|
|
|
mac->of_node = np;
|
|
|
@@ -568,7 +568,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
}
|
|
|
|
|
|
memset(mac->hwlro_ip, 0, sizeof(mac->hwlro_ip));
|
|
|
-@@ -4698,8 +4871,21 @@ static int mtk_add_mac(struct mtk_eth *e
|
|
|
+@@ -4706,8 +4879,21 @@ static int mtk_add_mac(struct mtk_eth *e
|
|
|
phy_interface_zero(mac->phylink_config.supported_interfaces);
|
|
|
__set_bit(PHY_INTERFACE_MODE_INTERNAL,
|
|
|
mac->phylink_config.supported_interfaces);
|
|
|
@@ -590,7 +590,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
phylink = phylink_create(&mac->phylink_config,
|
|
|
of_fwnode_handle(mac->of_node),
|
|
|
phy_mode, &mtk_phylink_ops);
|
|
|
-@@ -4750,6 +4936,26 @@ free_netdev:
|
|
|
+@@ -4758,6 +4944,26 @@ free_netdev:
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
@@ -617,7 +617,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev)
|
|
|
{
|
|
|
struct net_device *dev, *tmp;
|
|
|
-@@ -4896,7 +5102,8 @@ static int mtk_probe(struct platform_dev
|
|
|
+@@ -4904,7 +5110,8 @@ static int mtk_probe(struct platform_dev
|
|
|
regmap_write(cci, 0, 3);
|
|
|
}
|
|
|
|
|
|
@@ -627,7 +627,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
err = mtk_sgmii_init(eth);
|
|
|
|
|
|
if (err)
|
|
|
-@@ -5007,6 +5214,24 @@ static int mtk_probe(struct platform_dev
|
|
|
+@@ -5015,6 +5222,24 @@ static int mtk_probe(struct platform_dev
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -652,7 +652,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
|
|
|
err = devm_request_irq(eth->dev, eth->irq[0],
|
|
|
mtk_handle_irq, 0,
|
|
|
-@@ -5110,6 +5335,11 @@ static int mtk_remove(struct platform_de
|
|
|
+@@ -5118,6 +5343,11 @@ static int mtk_remove(struct platform_de
|
|
|
mtk_stop(eth->netdev[i]);
|
|
|
mac = netdev_priv(eth->netdev[i]);
|
|
|
phylink_disconnect_phy(mac->phylink);
|