kernel: update kernel 4.9 to 4.9.37

- Refreshed all patches
- Removed upstreamed
- Adapted 4 patches:

473-fix-marvell-phy-initialization-issues.patch
-----------------------------------------------
Removed hunk 5 which got upstreamed

403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch
404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch
--------------------------------------------------------------
Adapted these 2 RFC patches, merging the delta's from an upstream commit
(see below) which made it before these 2.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-
stable.git/commit/?h=v4.9.36&id=97ace183074d306942b903a148aebd5d061758f0

180-usb-xhci-add-support-for-performing-fake-doorbell.patch
-----------------------------------------------------------
- Moved fake_doorbell bitmask due to new item

Compile tested on: cns3xxx, imx6
Run tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit is contained in:
Koen Vandeputte
2017-07-12 22:59:03 +02:00
committed by Hauke Mehrtens
parent 027aea8af7
commit cd54b2d42b
45 changed files with 83 additions and 316 deletions

View File

@@ -167,7 +167,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -426,6 +426,7 @@ struct phy_device {
@@ -429,6 +429,7 @@ struct phy_device {
u8 mdix;

View File

@@ -256,7 +256,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+EXPORT_SYMBOL(phy_write_mmd);
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -627,14 +627,7 @@ struct phy_fixup {
@@ -630,14 +630,7 @@ struct phy_fixup {
*
* Same rules as for phy_read();
*/
@@ -272,7 +272,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/**
* phy_read_mmd_indirect - reads data from the MMD registers
@@ -728,16 +721,7 @@ static inline bool phy_is_pseudo_fixed_l
@@ -731,16 +724,7 @@ static inline bool phy_is_pseudo_fixed_l
*
* Same rules as for phy_write();
*/

View File

@@ -64,7 +64,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
EXPORT_SYMBOL(phy_write_mmd);
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -570,6 +570,30 @@ struct phy_driver {
@@ -573,6 +573,30 @@ struct phy_driver {
*/
void (*link_change_notify)(struct phy_device *dev);

View File

@@ -30,22 +30,27 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1343,11 +1343,16 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
@@ -1343,14 +1343,19 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
*/
int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data)
{
- int val = ethtool_adv_to_mmd_eee_adv_t(data->advertised);
+ int cap, adv;
- phy_write_mmd_indirect(phydev, MDIO_AN_EEE_ADV, MDIO_MMD_AN, val);
- /* Mask prohibited EEE modes */
- val &= ~phydev->eee_broken_modes;
+ /* Get Supported EEE */
+ cap = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE);
+ if (cap < 0)
+ return cap;
+
+ adv = ethtool_adv_to_mmd_eee_adv_t(data->advertised) & cap;
- phy_write_mmd_indirect(phydev, MDIO_AN_EEE_ADV, MDIO_MMD_AN, val);
+ /* Mask prohibited EEE modes */
+ adv &= ~phydev->eee_broken_modes;
- return 0;
+ adv = ethtool_adv_to_mmd_eee_adv_t(data->advertised) & cap;
+
+ return phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv);
}
EXPORT_SYMBOL(phy_ethtool_set_eee);

View File

@@ -12,7 +12,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1343,16 +1343,33 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
@@ -1343,19 +1343,36 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
*/
int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data)
{
@@ -30,6 +30,9 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+
adv = ethtool_adv_to_mmd_eee_adv_t(data->advertised) & cap;
/* Mask prohibited EEE modes */
adv &= ~phydev->eee_broken_modes;
- return phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv);
+ if (old_adv != adv) {
+ ret = phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv);

View File

@@ -258,7 +258,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+EXPORT_SYMBOL_GPL(genphy_c45_read_pma);
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1410,27 +1410,19 @@ EXPORT_SYMBOL(genphy_read_status);
@@ -1452,27 +1452,19 @@ EXPORT_SYMBOL(genphy_read_status);
static int gen10g_read_status(struct phy_device *phydev)
{
@@ -295,7 +295,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
}
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -807,6 +807,8 @@ static inline const char *phydev_name(co
@@ -810,6 +810,8 @@ static inline const char *phydev_name(co
void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
__printf(2, 3);
void phy_attached_info(struct phy_device *phydev);
@@ -304,7 +304,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
int genphy_config_init(struct phy_device *phydev);
int genphy_setup_forced(struct phy_device *phydev);
int genphy_restart_aneg(struct phy_device *phydev);
@@ -817,6 +819,16 @@ int genphy_read_status(struct phy_device
@@ -820,6 +822,16 @@ int genphy_read_status(struct phy_device
int genphy_suspend(struct phy_device *phydev);
int genphy_resume(struct phy_device *phydev);
int genphy_soft_reset(struct phy_device *phydev);

View File

@@ -37,7 +37,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/**
* phy_aneg_done - return auto-negotiation status
@@ -1439,3 +1457,14 @@ int phy_ethtool_set_link_ksettings(struc
@@ -1442,3 +1460,14 @@ int phy_ethtool_set_link_ksettings(struc
return phy_ethtool_ksettings_set(phydev, cmd);
}
EXPORT_SYMBOL(phy_ethtool_set_link_ksettings);

View File

@@ -91,7 +91,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
{
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -642,6 +642,9 @@ struct phy_fixup {
@@ -645,6 +645,9 @@ struct phy_fixup {
int (*run)(struct phy_device *phydev);
};

View File

@@ -305,7 +305,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
{
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -645,6 +645,21 @@ struct phy_fixup {
@@ -648,6 +648,21 @@ struct phy_fixup {
const char *phy_speed_to_str(int speed);
const char *phy_duplex_to_str(unsigned int duplex);

View File

@@ -1007,7 +1007,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
struct sk_buff;
/*
@@ -422,6 +423,7 @@ struct phy_device {
@@ -425,6 +426,7 @@ struct phy_device {
struct mutex lock;

View File

@@ -12,7 +12,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1679,7 +1679,8 @@ static struct phy_driver marvell_drivers
@@ -1678,7 +1678,8 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1510,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1510",

View File

@@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1531,7 +1531,7 @@ static struct phy_driver marvell_drivers
@@ -1530,7 +1530,7 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1111,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1111",

View File

@@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1699,7 +1699,7 @@ static struct phy_driver marvell_drivers
@@ -1698,7 +1698,7 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1540,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1540",

View File

@@ -1,26 +0,0 @@
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Fri, 23 Dec 2016 18:54:01 +0000
Subject: [PATCH] net: phy: fix marvell phy status reading
The Marvell driver incorrectly provides phydev->lp_advertising as the
logical and of the link partner's advert and our advert. This is
incorrect - this field is supposed to store the link parter's unmodified
advertisment.
This allows ethtool to report the correct link partner auto-negotiation
status.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1114,8 +1114,6 @@ static int marvell_read_status_page(stru
if (adv < 0)
return adv;
- lpa &= adv;
-
if (status & MII_M1011_PHY_STATUS_FULLDUPLEX)
phydev->duplex = DUPLEX_FULL;
else

View File

@@ -49,13 +49,3 @@ Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
i = phy_write(phydev, MII_MARVELL_PHY_PAGE, saved_page);
if (ret == 0)
ret = i;
@@ -1200,7 +1198,8 @@ static int marvell_read_status(struct ph
int err;
/* Check the fiber mode first */
- if (phydev->supported & SUPPORTED_FIBRE) {
+ if (phydev->supported & SUPPORTED_FIBRE &&
+ phydev->interface != PHY_INTERFACE_MODE_SGMII) {
err = phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_M1111_FIBER);
if (err < 0)
goto error;