From 2f8caaeb58f3b7a6b16d3132b2d52e0e72f8f6b7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 16 Oct 2023 10:31:33 +0200 Subject: [PATCH] drop queue-5.10/net-usb-phy-asix-add-support-for-ax88772a-c-phys.patch --- ...asix-add-support-for-ax88772a-c-phys.patch | 128 ------------------ queue-5.10/series | 1 - 2 files changed, 129 deletions(-) delete mode 100644 queue-5.10/net-usb-phy-asix-add-support-for-ax88772a-c-phys.patch diff --git a/queue-5.10/net-usb-phy-asix-add-support-for-ax88772a-c-phys.patch b/queue-5.10/net-usb-phy-asix-add-support-for-ax88772a-c-phys.patch deleted file mode 100644 index e39697a95e1..00000000000 --- a/queue-5.10/net-usb-phy-asix-add-support-for-ax88772a-c-phys.patch +++ /dev/null @@ -1,128 +0,0 @@ -From dde25846925765a88df8964080098174495c1f10 Mon Sep 17 00:00:00 2001 -From: Oleksij Rempel -Date: Mon, 7 Jun 2021 10:27:22 +0200 -Subject: net: usb/phy: asix: add support for ax88772A/C PHYs - -From: Oleksij Rempel - -commit dde25846925765a88df8964080098174495c1f10 upstream. - -Add support for build-in x88772A/C PHYs - -Signed-off-by: Oleksij Rempel -Reviewed-by: Andrew Lunn -Signed-off-by: David S. Miller -Cc: Maciej Żenczykowski -Signed-off-by: Greg Kroah-Hartman ---- - drivers/net/phy/ax88796b.c | 74 ++++++++++++++++++++++++++++++++++++++++++++- - drivers/net/usb/Kconfig | 1 - 2 files changed, 74 insertions(+), 1 deletion(-) - ---- a/drivers/net/phy/ax88796b.c -+++ b/drivers/net/phy/ax88796b.c -@@ -10,6 +10,8 @@ - #include - #include - -+#define PHY_ID_ASIX_AX88772A 0x003b1861 -+#define PHY_ID_ASIX_AX88772C 0x003b1881 - #define PHY_ID_ASIX_AX88796B 0x003b1841 - - MODULE_DESCRIPTION("Asix PHY driver"); -@@ -39,7 +41,75 @@ static int asix_soft_reset(struct phy_de - return genphy_soft_reset(phydev); - } - --static struct phy_driver asix_driver[] = { { -+/* AX88772A is not working properly with some old switches (NETGEAR EN 108TP): -+ * after autoneg is done and the link status is reported as active, the MII_LPA -+ * register is 0. This issue is not reproducible on AX88772C. -+ */ -+static int asix_ax88772a_read_status(struct phy_device *phydev) -+{ -+ int ret, val; -+ -+ ret = genphy_update_link(phydev); -+ if (ret) -+ return ret; -+ -+ if (!phydev->link) -+ return 0; -+ -+ /* If MII_LPA is 0, phy_resolve_aneg_linkmode() will fail to resolve -+ * linkmode so use MII_BMCR as default values. -+ */ -+ val = phy_read(phydev, MII_BMCR); -+ if (val < 0) -+ return val; -+ -+ if (val & BMCR_SPEED100) -+ phydev->speed = SPEED_100; -+ else -+ phydev->speed = SPEED_10; -+ -+ if (val & BMCR_FULLDPLX) -+ phydev->duplex = DUPLEX_FULL; -+ else -+ phydev->duplex = DUPLEX_HALF; -+ -+ ret = genphy_read_lpa(phydev); -+ if (ret < 0) -+ return ret; -+ -+ if (phydev->autoneg == AUTONEG_ENABLE && phydev->autoneg_complete) -+ phy_resolve_aneg_linkmode(phydev); -+ -+ return 0; -+} -+ -+static void asix_ax88772a_link_change_notify(struct phy_device *phydev) -+{ -+ /* Reset PHY, otherwise MII_LPA will provide outdated information. -+ * This issue is reproducible only with some link partner PHYs -+ */ -+ if (phydev->state == PHY_NOLINK && phydev->drv->soft_reset) -+ phydev->drv->soft_reset(phydev); -+} -+ -+static struct phy_driver asix_driver[] = { -+{ -+ PHY_ID_MATCH_EXACT(PHY_ID_ASIX_AX88772A), -+ .name = "Asix Electronics AX88772A", -+ .flags = PHY_IS_INTERNAL, -+ .read_status = asix_ax88772a_read_status, -+ .suspend = genphy_suspend, -+ .resume = genphy_resume, -+ .soft_reset = asix_soft_reset, -+ .link_change_notify = asix_ax88772a_link_change_notify, -+}, { -+ PHY_ID_MATCH_EXACT(PHY_ID_ASIX_AX88772C), -+ .name = "Asix Electronics AX88772C", -+ .flags = PHY_IS_INTERNAL, -+ .suspend = genphy_suspend, -+ .resume = genphy_resume, -+ .soft_reset = asix_soft_reset, -+}, { - .phy_id = PHY_ID_ASIX_AX88796B, - .name = "Asix Electronics AX88796B", - .phy_id_mask = 0xfffffff0, -@@ -50,6 +120,8 @@ static struct phy_driver asix_driver[] = - module_phy_driver(asix_driver); - - static struct mdio_device_id __maybe_unused asix_tbl[] = { -+ { PHY_ID_MATCH_EXACT(PHY_ID_ASIX_AX88772A) }, -+ { PHY_ID_MATCH_EXACT(PHY_ID_ASIX_AX88772C) }, - { PHY_ID_ASIX_AX88796B, 0xfffffff0 }, - { } - }; ---- a/drivers/net/usb/Kconfig -+++ b/drivers/net/usb/Kconfig -@@ -169,6 +169,7 @@ config USB_NET_AX8817X - depends on USB_USBNET - select CRC32 - select PHYLIB -+ select AX88796B_PHY - default y - help - This option adds support for ASIX AX88xxx based USB 2.0 diff --git a/queue-5.10/series b/queue-5.10/series index dc046367e27..737a62b552e 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -78,4 +78,3 @@ arm64-armv8_deprecated-move-emulation-functions.patch arm64-armv8_deprecated-move-aarch32-helper-earlier.patch arm64-armv8_deprecated-rework-deprected-instruction-handling.patch arm64-armv8_deprecated-fix-unused-function-error.patch -net-usb-phy-asix-add-support-for-ax88772a-c-phys.patch -- 2.47.3