From f2103c50abb602fcc75b9cb25d57f5f39683e423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 17 Aug 2016 00:06:14 +0200 Subject: kernel: backport bgmac patch moving MDIO code into separated file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This prepares bgmac for the biggest change: dropping bcma dependency. Signed-off-by: Rafał Miłecki --- .../patches-4.4/773-bgmac-add-srab-switch.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'target/linux/generic/patches-4.4/773-bgmac-add-srab-switch.patch') diff --git a/target/linux/generic/patches-4.4/773-bgmac-add-srab-switch.patch b/target/linux/generic/patches-4.4/773-bgmac-add-srab-switch.patch index 3892d8ee93..29e7892662 100644 --- a/target/linux/generic/patches-4.4/773-bgmac-add-srab-switch.patch +++ b/target/linux/generic/patches-4.4/773-bgmac-add-srab-switch.patch @@ -12,9 +12,9 @@ Signed-off-by: Hauke Mehrtens #include static const struct bcma_device_id bgmac_bcma_tbl[] = { -@@ -1681,6 +1682,17 @@ static void bgmac_mii_unregister(struct - mdiobus_free(mii_bus); - } +@@ -1403,6 +1404,17 @@ static const struct ethtool_ops bgmac_et + .get_drvinfo = bgmac_get_drvinfo, + }; +static struct b53_platform_data bgmac_b53_pdata = { +}; @@ -28,9 +28,9 @@ Signed-off-by: Hauke Mehrtens +}; + /************************************************** - * BCMA bus ops + * MII **************************************************/ -@@ -1829,6 +1841,14 @@ static int bgmac_probe(struct bcma_devic +@@ -1630,6 +1642,14 @@ static int bgmac_probe(struct bcma_devic net_dev->hw_features = net_dev->features; net_dev->vlan_features = net_dev->features; @@ -45,7 +45,7 @@ Signed-off-by: Hauke Mehrtens err = register_netdev(bgmac->net_dev); if (err) { dev_err(bgmac->dev, "Cannot register net device\n"); -@@ -1855,6 +1875,10 @@ static void bgmac_remove(struct bcma_dev +@@ -1657,6 +1677,10 @@ static void bgmac_remove(struct bcma_dev { struct bgmac *bgmac = bcma_get_drvdata(core); @@ -54,8 +54,8 @@ Signed-off-by: Hauke Mehrtens + bgmac->b53_device = NULL; + unregister_netdev(bgmac->net_dev); - bgmac_mii_unregister(bgmac); - netif_napi_del(&bgmac->napi); + phy_disconnect(bgmac->net_dev->phydev); + bcma_mdio_mii_unregister(bgmac->mii_bus); --- a/drivers/net/ethernet/broadcom/bgmac.h +++ b/drivers/net/ethernet/broadcom/bgmac.h @@ -454,6 +454,9 @@ struct bgmac { @@ -67,4 +67,4 @@ Signed-off-by: Hauke Mehrtens + struct platform_device *b53_device; }; - static inline u32 bgmac_read(struct bgmac *bgmac, u16 offset) + struct mii_bus *bcma_mdio_mii_register(struct bcma_device *core, u8 phyaddr); -- cgit v1.2.3