aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-4.14/410-sfp-hack-allow-marvell-10G-phy-support-to-use-SFP.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mvebu/patches-4.14/410-sfp-hack-allow-marvell-10G-phy-support-to-use-SFP.patch')
-rw-r--r--target/linux/mvebu/patches-4.14/410-sfp-hack-allow-marvell-10G-phy-support-to-use-SFP.patch17
1 files changed, 9 insertions, 8 deletions
diff --git a/target/linux/mvebu/patches-4.14/410-sfp-hack-allow-marvell-10G-phy-support-to-use-SFP.patch b/target/linux/mvebu/patches-4.14/410-sfp-hack-allow-marvell-10G-phy-support-to-use-SFP.patch
index 6ca43043fa..d6e5fbf33f 100644
--- a/target/linux/mvebu/patches-4.14/410-sfp-hack-allow-marvell-10G-phy-support-to-use-SFP.patch
+++ b/target/linux/mvebu/patches-4.14/410-sfp-hack-allow-marvell-10G-phy-support-to-use-SFP.patch
@@ -25,8 +25,8 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+#include <linux/sfp.h>
enum {
- MV_PCS_BASE_T = 0x0000,
-@@ -38,6 +40,11 @@ enum {
+ MV_PMA_BOOT = 0xc050,
+@@ -41,6 +43,11 @@ enum {
MV_AN_RESULT_SPD_10000 = BIT(15),
};
@@ -38,7 +38,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static int mv3310_modify(struct phy_device *phydev, int devad, u16 reg,
u16 mask, u16 bits)
{
-@@ -56,17 +63,52 @@ static int mv3310_modify(struct phy_devi
+@@ -59,8 +66,25 @@ static int mv3310_modify(struct phy_devi
return ret < 0 ? ret : 1;
}
@@ -62,10 +62,11 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
{
+ struct mv3310_priv *priv;
u32 mmd_mask = MDIO_DEVS_PMAPMD | MDIO_DEVS_AN;
+ int ret;
- if (!phydev->is_c45 ||
- (phydev->c45_ids.devices_in_package & mmd_mask) != mmd_mask)
+@@ -78,9 +102,27 @@ static int mv3310_probe(struct phy_devic
return -ENODEV;
+ }
+ priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL);
+ if (!priv)
@@ -91,7 +92,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/*
* Resetting the MV88X3310 causes it to become non-responsive. Avoid
* setting the reset bit(s).
-@@ -78,6 +120,7 @@ static int mv3310_soft_reset(struct phy_
+@@ -92,6 +134,7 @@ static int mv3310_soft_reset(struct phy_
static int mv3310_config_init(struct phy_device *phydev)
{
@@ -99,7 +100,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
__ETHTOOL_DECLARE_LINK_MODE_MASK(supported) = { 0, };
u32 mask;
int val;
-@@ -166,6 +209,14 @@ static int mv3310_config_init(struct phy
+@@ -180,6 +223,14 @@ static int mv3310_config_init(struct phy
phydev->supported &= mask;
phydev->advertising &= phydev->supported;
@@ -114,7 +115,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
return 0;
}
-@@ -349,12 +400,13 @@ static struct phy_driver mv3310_drivers[
+@@ -363,12 +414,13 @@ static struct phy_driver mv3310_drivers[
SUPPORTED_FIBRE |
SUPPORTED_10000baseT_Full |
SUPPORTED_Backplane,