Revert "swconfig: fix Broadcom b53 support"
authorRafał Miłecki <rafal@milecki.pl>
Mon, 4 Oct 2021 05:12:36 +0000 (07:12 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 7 Oct 2021 09:30:55 +0000 (11:30 +0200)
This reverts commit 8f9cd1af0f9c325a902dbd0e79e12015372e6bb0.

That commit was meant to add a single EXPORT_SYMBOL_GPL() but it
actually also added few .of_match_table-s. One commit should handle one
thing and should not introduce unrelated changes.

Regarding actual changes:
1. EXPORT_SYMBOL_GPL is not required as we don't build swconfig drivers
   as modules.
2. PHY drivers must not have .of_match_table. That is allowed for MDIO
   drivers. This could work for some time (although is didn't for me on
   bcm53xx) but does not with kernel 5.10. It causes a soft lockup and
   upstream developers confirmed it's an unsupported design.

Link: https://lore.kernel.org/netdev/2b1dc053-8c9a-e3e4-b450-eecdfca3fe16@gmail.com/t/#mf80e472f35ee23f7a75cbf5b1e101a17ab3a64a3
Cc: Tobias Schramm <tobleminer@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
target/linux/generic/files/drivers/net/phy/swconfig.c

index 98cdbffe73c7354f4401389dfcc96014bff62588..6ec23a49a36450769342a7228745f60bb8688df1 100644 (file)
@@ -361,26 +361,6 @@ static int b53_phy_read_status(struct phy_device *phydev)
        return 0;
 }
 
-static const struct of_device_id b53_of_match_1[] = {
-       { .compatible = "brcm,bcm5325" },
-       { .compatible = "brcm,bcm5395" },
-       { .compatible = "brcm,bcm5397" },
-       { .compatible = "brcm,bcm5398" },
-       { /* sentinel */ },
-};
-
-static const struct of_device_id b53_of_match_2[] = {
-       { .compatible = "brcm,bcm53115" },
-       { .compatible = "brcm,bcm53125" },
-       { .compatible = "brcm,bcm53128" },
-       { /* sentinel */ },
-};
-
-static const struct of_device_id b53_of_match_3[] = {
-       { .compatible = "brcm,bcm5365" },
-       { /* sentinel */ },
-};
-
 /* BCM5325, BCM539x */
 static struct phy_driver b53_phy_driver_id1 = {
        .phy_id         = 0x0143bc00,
@@ -392,10 +372,6 @@ static struct phy_driver b53_phy_driver_id1 = {
        .config_aneg    = b53_phy_config_aneg,
        .config_init    = b53_phy_config_init,
        .read_status    = b53_phy_read_status,
-       .mdiodrv.driver = {
-               .name = "bcm539x",
-               .of_match_table = b53_of_match_1,
-       },
 };
 
 /* BCM53125, BCM53128 */
@@ -409,10 +385,6 @@ static struct phy_driver b53_phy_driver_id2 = {
        .config_aneg    = b53_phy_config_aneg,
        .config_init    = b53_phy_config_init,
        .read_status    = b53_phy_read_status,
-       .mdiodrv.driver = {
-               .name = "bcm531xx",
-               .of_match_table = b53_of_match_2,
-       },
 };
 
 /* BCM5365 */
@@ -426,10 +398,6 @@ static struct phy_driver b53_phy_driver_id3 = {
        .config_aneg    = b53_phy_config_aneg,
        .config_init    = b53_phy_config_init,
        .read_status    = b53_phy_read_status,
-       .mdiodrv.driver = {
-               .name = "bcm5365",
-               .of_match_table = b53_of_match_3,
-       },
 };
 
 int __init b53_phy_driver_register(void)
index a734e576080aa6f15701c201e06d5ecfa062420d..f506daaf913a8e5e83847fab7ae3f046f0060200 100644 (file)
@@ -1222,7 +1222,6 @@ switch_generic_set_link(struct switch_dev *dev, int port,
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(switch_generic_set_link);
 
 static int __init
 swconfig_init(void)