Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2019-05-20 12:53:46 +0200
committerMichal Kubecek <mkubecek@suse.cz>2019-05-20 12:53:46 +0200
commitdf183200b537721e22159e277fcf39f059c76ae5 (patch)
tree33952fdcd87154ce786dc8c2473cd8be73f1ecc6
parent89c5a47c94c790e2c5897b23db5a694aeb8d2755 (diff)
- net: phy: rename Asix Electronics PHY driver.
Fix duplicate module name asix by renaming phy driver to ax88796b. - Update config files.
-rw-r--r--config/arm64/default2
-rw-r--r--config/armv6hl/default2
-rw-r--r--config/armv7hl/default2
-rw-r--r--config/armv7hl/lpae2
-rw-r--r--config/i386/pae2
-rw-r--r--config/ppc64/default2
-rw-r--r--config/ppc64le/default2
-rw-r--r--config/s390x/default2
-rw-r--r--config/x86_64/default2
-rw-r--r--patches.suse/net-phy-rename-Asix-Electronics-PHY-driver.patch182
-rw-r--r--series.conf1
11 files changed, 192 insertions, 9 deletions
diff --git a/config/arm64/default b/config/arm64/default
index 5aed903ccf..aaa21b1ff6 100644
--- a/config/arm64/default
+++ b/config/arm64/default
@@ -3239,7 +3239,7 @@ CONFIG_LED_TRIGGER_PHY=y
CONFIG_SFP=m
CONFIG_AMD_PHY=m
CONFIG_AQUANTIA_PHY=m
-CONFIG_ASIX_PHY=m
+CONFIG_AX88796B_PHY=m
CONFIG_AT803X_PHY=m
CONFIG_BCM7XXX_PHY=m
CONFIG_BCM87XX_PHY=m
diff --git a/config/armv6hl/default b/config/armv6hl/default
index 462810ce3d..fbf18c4eb5 100644
--- a/config/armv6hl/default
+++ b/config/armv6hl/default
@@ -2408,7 +2408,7 @@ CONFIG_LED_TRIGGER_PHY=y
CONFIG_SFP=m
CONFIG_AMD_PHY=m
CONFIG_AQUANTIA_PHY=m
-CONFIG_ASIX_PHY=m
+CONFIG_AX88796B_PHY=m
CONFIG_AT803X_PHY=m
CONFIG_BCM7XXX_PHY=m
CONFIG_BCM87XX_PHY=m
diff --git a/config/armv7hl/default b/config/armv7hl/default
index e9fd29be1f..ca048bde7a 100644
--- a/config/armv7hl/default
+++ b/config/armv7hl/default
@@ -3219,7 +3219,7 @@ CONFIG_LED_TRIGGER_PHY=y
CONFIG_SFP=m
CONFIG_AMD_PHY=m
CONFIG_AQUANTIA_PHY=m
-CONFIG_ASIX_PHY=m
+CONFIG_AX88796B_PHY=m
CONFIG_AT803X_PHY=m
CONFIG_BCM7XXX_PHY=m
CONFIG_BCM87XX_PHY=m
diff --git a/config/armv7hl/lpae b/config/armv7hl/lpae
index 5bcc70b791..754edb9e43 100644
--- a/config/armv7hl/lpae
+++ b/config/armv7hl/lpae
@@ -3141,7 +3141,7 @@ CONFIG_LED_TRIGGER_PHY=y
CONFIG_SFP=m
CONFIG_AMD_PHY=m
CONFIG_AQUANTIA_PHY=m
-CONFIG_ASIX_PHY=m
+CONFIG_AX88796B_PHY=m
CONFIG_AT803X_PHY=m
CONFIG_BCM7XXX_PHY=m
CONFIG_BCM87XX_PHY=m
diff --git a/config/i386/pae b/config/i386/pae
index 5b4e2c9e1a..05dbe3a7f3 100644
--- a/config/i386/pae
+++ b/config/i386/pae
@@ -3276,7 +3276,7 @@ CONFIG_LED_TRIGGER_PHY=y
#
CONFIG_AMD_PHY=m
CONFIG_AQUANTIA_PHY=m
-CONFIG_ASIX_PHY=m
+CONFIG_AX88796B_PHY=m
CONFIG_AT803X_PHY=m
CONFIG_BCM7XXX_PHY=m
CONFIG_BCM87XX_PHY=m
diff --git a/config/ppc64/default b/config/ppc64/default
index 25bf6b07a3..3f3cd5a145 100644
--- a/config/ppc64/default
+++ b/config/ppc64/default
@@ -2837,7 +2837,7 @@ CONFIG_LED_TRIGGER_PHY=y
#
CONFIG_AMD_PHY=m
CONFIG_AQUANTIA_PHY=m
-CONFIG_ASIX_PHY=m
+CONFIG_AX88796B_PHY=m
CONFIG_AT803X_PHY=m
CONFIG_BCM7XXX_PHY=m
CONFIG_BCM87XX_PHY=m
diff --git a/config/ppc64le/default b/config/ppc64le/default
index c9b9ea5a3d..1621e8c832 100644
--- a/config/ppc64le/default
+++ b/config/ppc64le/default
@@ -2715,7 +2715,7 @@ CONFIG_LED_TRIGGER_PHY=y
#
CONFIG_AMD_PHY=m
CONFIG_AQUANTIA_PHY=m
-CONFIG_ASIX_PHY=m
+CONFIG_AX88796B_PHY=m
CONFIG_AT803X_PHY=m
CONFIG_BCM7XXX_PHY=m
CONFIG_BCM87XX_PHY=m
diff --git a/config/s390x/default b/config/s390x/default
index b5e1e4dfe0..f0593ef7ec 100644
--- a/config/s390x/default
+++ b/config/s390x/default
@@ -2039,7 +2039,7 @@ CONFIG_SWPHY=y
#
CONFIG_AMD_PHY=m
CONFIG_AQUANTIA_PHY=m
-CONFIG_ASIX_PHY=m
+CONFIG_AX88796B_PHY=m
CONFIG_AT803X_PHY=m
CONFIG_BCM7XXX_PHY=m
CONFIG_BCM87XX_PHY=m
diff --git a/config/x86_64/default b/config/x86_64/default
index 659c700ff3..4cf0472737 100644
--- a/config/x86_64/default
+++ b/config/x86_64/default
@@ -3262,7 +3262,7 @@ CONFIG_LED_TRIGGER_PHY=y
#
CONFIG_AMD_PHY=m
CONFIG_AQUANTIA_PHY=m
-CONFIG_ASIX_PHY=m
+CONFIG_AX88796B_PHY=m
CONFIG_AT803X_PHY=m
CONFIG_BCM7XXX_PHY=m
CONFIG_BCM87XX_PHY=m
diff --git a/patches.suse/net-phy-rename-Asix-Electronics-PHY-driver.patch b/patches.suse/net-phy-rename-Asix-Electronics-PHY-driver.patch
new file mode 100644
index 0000000000..9a13fc4e6c
--- /dev/null
+++ b/patches.suse/net-phy-rename-Asix-Electronics-PHY-driver.patch
@@ -0,0 +1,182 @@
+From: Michael Schmitz <schmitzmic@gmail.com>
+Date: Sat, 18 May 2019 13:14:55 +1200
+Subject: net: phy: rename Asix Electronics PHY driver
+Patch-mainline: Submitted - 2019-05-18
+References: none
+
+Commit 31dd83b96641 ("net-next: phy: new Asix Electronics PHY driver")
+introduced a new PHY driver drivers/net/phy/asix.c that causes a module
+name conflict with a pre-existiting driver (drivers/net/usb/asix.c).
+
+The PHY driver is used by the X-Surf 100 ethernet card driver, and loaded
+by that driver via its PHY ID. A rename of the driver looks unproblematic.
+
+Rename PHY driver to ax88796b.c in order to resolve name conflict.
+
+Fixes: 31dd83b96641 ("net-next: phy: new Asix Electronics PHY driver")
+Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
+Acked-by: Michal Kubecek <mkubecek@suse.cz>
+---
+ drivers/net/ethernet/8390/Kconfig | 2 +-
+ drivers/net/phy/Kconfig | 2 +-
+ drivers/net/phy/Makefile | 2 +-
+ drivers/net/phy/asix.c | 57 -------------------------------
+ drivers/net/phy/ax88796b.c | 57 +++++++++++++++++++++++++++++++
+ 5 files changed, 60 insertions(+), 60 deletions(-)
+ delete mode 100644 drivers/net/phy/asix.c
+ create mode 100644 drivers/net/phy/ax88796b.c
+
+--- a/drivers/net/ethernet/8390/Kconfig
++++ b/drivers/net/ethernet/8390/Kconfig
+@@ -49,7 +49,7 @@ config XSURF100
+ tristate "Amiga XSurf 100 AX88796/NE2000 clone support"
+ depends on ZORRO
+ select AX88796
+- select ASIX_PHY
++ select AX88796B_PHY
+ help
+ This driver is for the Individual Computers X-Surf 100 Ethernet
+ card (based on the Asix AX88796 chip). If you have such a card,
+--- a/drivers/net/phy/Kconfig
++++ b/drivers/net/phy/Kconfig
+@@ -253,7 +253,7 @@ config AQUANTIA_PHY
+ ---help---
+ Currently supports the Aquantia AQ1202, AQ2104, AQR105, AQR405
+
+-config ASIX_PHY
++config AX88796B_PHY
+ tristate "Asix PHYs"
+ help
+ Currently supports the Asix Electronics PHY found in the X-Surf 100
+--- a/drivers/net/phy/Makefile
++++ b/drivers/net/phy/Makefile
+@@ -52,7 +52,7 @@ ifdef CONFIG_HWMON
+ aquantia-objs += aquantia_hwmon.o
+ endif
+ obj-$(CONFIG_AQUANTIA_PHY) += aquantia.o
+-obj-$(CONFIG_ASIX_PHY) += asix.o
++obj-$(CONFIG_AX88796B_PHY) += ax88796b.o
+ obj-$(CONFIG_AT803X_PHY) += at803x.o
+ obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o
+ obj-$(CONFIG_BCM7XXX_PHY) += bcm7xxx.o
+deleted file mode 100644
+--- a/drivers/net/phy/asix.c
++++ /dev/null
+@@ -1,57 +0,0 @@
+-// SPDX-License-Identifier: GPL-2.0+
+-/* Driver for Asix PHYs
+- *
+- * Author: Michael Schmitz <schmitzmic@gmail.com>
+- */
+-#include <linux/kernel.h>
+-#include <linux/errno.h>
+-#include <linux/init.h>
+-#include <linux/module.h>
+-#include <linux/mii.h>
+-#include <linux/phy.h>
+-
+-#define PHY_ID_ASIX_AX88796B 0x003b1841
+-
+-MODULE_DESCRIPTION("Asix PHY driver");
+-MODULE_AUTHOR("Michael Schmitz <schmitzmic@gmail.com>");
+-MODULE_LICENSE("GPL");
+-
+-/**
+- * asix_soft_reset - software reset the PHY via BMCR_RESET bit
+- * @phydev: target phy_device struct
+- *
+- * Description: Perform a software PHY reset using the standard
+- * BMCR_RESET bit and poll for the reset bit to be cleared.
+- * Toggle BMCR_RESET bit off to accommodate broken AX8796B PHY implementation
+- * such as used on the Individual Computers' X-Surf 100 Zorro card.
+- *
+- * Returns: 0 on success, < 0 on failure
+- */
+-static int asix_soft_reset(struct phy_device *phydev)
+-{
+- int ret;
+-
+- /* Asix PHY won't reset unless reset bit toggles */
+- ret = phy_write(phydev, MII_BMCR, 0);
+- if (ret < 0)
+- return ret;
+-
+- return genphy_soft_reset(phydev);
+-}
+-
+-static struct phy_driver asix_driver[] = { {
+- .phy_id = PHY_ID_ASIX_AX88796B,
+- .name = "Asix Electronics AX88796B",
+- .phy_id_mask = 0xfffffff0,
+- /* PHY_BASIC_FEATURES */
+- .soft_reset = asix_soft_reset,
+-} };
+-
+-module_phy_driver(asix_driver);
+-
+-static struct mdio_device_id __maybe_unused asix_tbl[] = {
+- { PHY_ID_ASIX_AX88796B, 0xfffffff0 },
+- { }
+-};
+-
+-MODULE_DEVICE_TABLE(mdio, asix_tbl);
+--- /dev/null
++++ b/drivers/net/phy/ax88796b.c
+@@ -0,0 +1,57 @@
++// SPDX-License-Identifier: GPL-2.0+
++/* Driver for Asix PHYs
++ *
++ * Author: Michael Schmitz <schmitzmic@gmail.com>
++ */
++#include <linux/kernel.h>
++#include <linux/errno.h>
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/mii.h>
++#include <linux/phy.h>
++
++#define PHY_ID_ASIX_AX88796B 0x003b1841
++
++MODULE_DESCRIPTION("Asix PHY driver");
++MODULE_AUTHOR("Michael Schmitz <schmitzmic@gmail.com>");
++MODULE_LICENSE("GPL");
++
++/**
++ * asix_soft_reset - software reset the PHY via BMCR_RESET bit
++ * @phydev: target phy_device struct
++ *
++ * Description: Perform a software PHY reset using the standard
++ * BMCR_RESET bit and poll for the reset bit to be cleared.
++ * Toggle BMCR_RESET bit off to accommodate broken AX8796B PHY implementation
++ * such as used on the Individual Computers' X-Surf 100 Zorro card.
++ *
++ * Returns: 0 on success, < 0 on failure
++ */
++static int asix_soft_reset(struct phy_device *phydev)
++{
++ int ret;
++
++ /* Asix PHY won't reset unless reset bit toggles */
++ ret = phy_write(phydev, MII_BMCR, 0);
++ if (ret < 0)
++ return ret;
++
++ return genphy_soft_reset(phydev);
++}
++
++static struct phy_driver asix_driver[] = { {
++ .phy_id = PHY_ID_ASIX_AX88796B,
++ .name = "Asix Electronics AX88796B",
++ .phy_id_mask = 0xfffffff0,
++ /* PHY_BASIC_FEATURES */
++ .soft_reset = asix_soft_reset,
++} };
++
++module_phy_driver(asix_driver);
++
++static struct mdio_device_id __maybe_unused asix_tbl[] = {
++ { PHY_ID_ASIX_AX88796B, 0xfffffff0 },
++ { }
++};
++
++MODULE_DEVICE_TABLE(mdio, asix_tbl);
diff --git a/series.conf b/series.conf
index 2ebad47eba..5d5e4444c2 100644
--- a/series.conf
+++ b/series.conf
@@ -289,6 +289,7 @@
########################################################
# Network drivers
########################################################
+ patches.suse/net-phy-rename-Asix-Electronics-PHY-driver.patch
########################################################
# Wireless Networking