* [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes
@ 2016-02-06 20:58 Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 1/4] net: phy: bcm7xxx: Fix shadow mode 2 disabling Florian Fainelli
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Florian Fainelli @ 2016-02-06 20:58 UTC (permalink / raw)
To: netdev; +Cc: davem, pgynther, jaedon.shin, opendmb, Florian Fainelli
From: Florian Fainelli <florian.fainelli@broadcom.com>
Hi David,
Here is a collection of fixes for the 40nm Ethernet PHY supported
by the 7xxx PHY driver, please also queue these fixes for stable.
Changes in v2:
- dropped the cleanup patch, not appropriate
- added another patch removing bogus wildcard entries
Thanks!
Florian Fainelli (4):
net: phy: bcm7xxx: Fix shadow mode 2 disabling
net: phy: bcm7xxx: Fix 40nm EPHY features
net: phy: bcm7xxx: Fix bcm7xxx_config_init() check
net: phy: bcm7xxx: Remove wildcard entries
drivers/net/phy/bcm7xxx.c | 43 ++++---------------------------------------
1 files changed, 4 insertions(+), 39 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net v2 1/4] net: phy: bcm7xxx: Fix shadow mode 2 disabling
2016-02-06 20:58 [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes Florian Fainelli
@ 2016-02-06 20:58 ` Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 2/4] net: phy: bcm7xxx: Fix 40nm EPHY features Florian Fainelli
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2016-02-06 20:58 UTC (permalink / raw)
To: netdev; +Cc: davem, pgynther, jaedon.shin, opendmb, Florian Fainelli
The clear and set masks in the call to phy_set_clr_bits() called from
bcm7xxx_config_init() are inverted. We need to fix this by swapping the two
arguments, that is, set 0 bits, but clear the shade mode 2 enable bit.
Fixes: b560a58c45c66 ("net: phy: add Broadcom BCM7xxx internal PHY driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/phy/bcm7xxx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/phy/bcm7xxx.c b/drivers/net/phy/bcm7xxx.c
index bf241a3..234a285 100644
--- a/drivers/net/phy/bcm7xxx.c
+++ b/drivers/net/phy/bcm7xxx.c
@@ -270,7 +270,7 @@ static int bcm7xxx_config_init(struct phy_device *phydev)
phy_write(phydev, MII_BCM7XXX_100TX_FALSE_CAR, 0x7555);
/* reset shadow mode 2 */
- ret = phy_set_clr_bits(phydev, MII_BCM7XXX_TEST, MII_BCM7XXX_SHD_MODE_2, 0);
+ ret = phy_set_clr_bits(phydev, MII_BCM7XXX_TEST, 0, MII_BCM7XXX_SHD_MODE_2);
if (ret < 0)
return ret;
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net v2 2/4] net: phy: bcm7xxx: Fix 40nm EPHY features
2016-02-06 20:58 [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 1/4] net: phy: bcm7xxx: Fix shadow mode 2 disabling Florian Fainelli
@ 2016-02-06 20:58 ` Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 3/4] net: phy: bcm7xxx: Fix bcm7xxx_config_init() check Florian Fainelli
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2016-02-06 20:58 UTC (permalink / raw)
To: netdev; +Cc: davem, pgynther, jaedon.shin, opendmb, Florian Fainelli
The PHY entries for BCM7425/29/35 declare the 40nm Ethernet PHY as being
10/100/1000 capable, while this is just a 10/100 capable PHY device, fix that.
Fixes: d068b02cfdfc2 ("net: phy: add BCM7425 and BCM7429 PHYs")
Fixes: 9458ceab4917 ("net: phy: bcm7xxx: Add entry for BCM7435")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/phy/bcm7xxx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/bcm7xxx.c b/drivers/net/phy/bcm7xxx.c
index 234a285..524806d 100644
--- a/drivers/net/phy/bcm7xxx.c
+++ b/drivers/net/phy/bcm7xxx.c
@@ -337,7 +337,7 @@ static struct phy_driver bcm7xxx_driver[] = {
.phy_id = PHY_ID_BCM7425,
.phy_id_mask = 0xfffffff0,
.name = "Broadcom BCM7425",
- .features = PHY_GBIT_FEATURES |
+ .features = PHY_BASIC_FEATURES |
SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_IS_INTERNAL,
.config_init = bcm7xxx_config_init,
@@ -349,7 +349,7 @@ static struct phy_driver bcm7xxx_driver[] = {
.phy_id = PHY_ID_BCM7429,
.phy_id_mask = 0xfffffff0,
.name = "Broadcom BCM7429",
- .features = PHY_GBIT_FEATURES |
+ .features = PHY_BASIC_FEATURES |
SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_IS_INTERNAL,
.config_init = bcm7xxx_config_init,
@@ -361,7 +361,7 @@ static struct phy_driver bcm7xxx_driver[] = {
.phy_id = PHY_ID_BCM7435,
.phy_id_mask = 0xfffffff0,
.name = "Broadcom BCM7435",
- .features = PHY_GBIT_FEATURES |
+ .features = PHY_BASIC_FEATURES |
SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_IS_INTERNAL,
.config_init = bcm7xxx_config_init,
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net v2 3/4] net: phy: bcm7xxx: Fix bcm7xxx_config_init() check
2016-02-06 20:58 [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 1/4] net: phy: bcm7xxx: Fix shadow mode 2 disabling Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 2/4] net: phy: bcm7xxx: Fix 40nm EPHY features Florian Fainelli
@ 2016-02-06 20:58 ` Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 4/4] net: phy: bcm7xxx: Remove wildcard entries Florian Fainelli
2016-02-16 19:56 ` [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2016-02-06 20:58 UTC (permalink / raw)
To: netdev; +Cc: davem, pgynther, jaedon.shin, opendmb, Florian Fainelli
Since we were wrongly advertising gigabit features for these 10/100 only
Ethernet PHYs, bcm7xxx_config_init() which is supposed to apply workaround
would have not run since the check would be true, now that we have fixed the
PHY features, remove that check since it has no reasoning to be there anymore.
Fixes: e18556ee3bd83 ("net: phy: bcm7xxx: do not use PHY_BRCM_100MBPS_WAR")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/phy/bcm7xxx.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/net/phy/bcm7xxx.c b/drivers/net/phy/bcm7xxx.c
index 524806d..568768a 100644
--- a/drivers/net/phy/bcm7xxx.c
+++ b/drivers/net/phy/bcm7xxx.c
@@ -250,10 +250,6 @@ static int bcm7xxx_config_init(struct phy_device *phydev)
phy_write(phydev, MII_BCM7XXX_AUX_MODE, MII_BCM7XX_64CLK_MDIO);
phy_read(phydev, MII_BCM7XXX_AUX_MODE);
- /* Workaround only required for 100Mbits/sec capable PHYs */
- if (phydev->supported & PHY_GBIT_FEATURES)
- return 0;
-
/* set shadow mode 2 */
ret = phy_set_clr_bits(phydev, MII_BCM7XXX_TEST,
MII_BCM7XXX_SHD_MODE_2, MII_BCM7XXX_SHD_MODE_2);
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net v2 4/4] net: phy: bcm7xxx: Remove wildcard entries
2016-02-06 20:58 [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes Florian Fainelli
` (2 preceding siblings ...)
2016-02-06 20:58 ` [PATCH net v2 3/4] net: phy: bcm7xxx: Fix bcm7xxx_config_init() check Florian Fainelli
@ 2016-02-06 20:58 ` Florian Fainelli
2016-02-16 19:56 ` [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2016-02-06 20:58 UTC (permalink / raw)
To: netdev; +Cc: davem, pgynther, jaedon.shin, opendmb, Florian Fainelli
Remove the two wildcard entries, they serve no purpose and will match way too
many devices, some of them being covered by the driver in
drivers/net/phy/broadcom.c. Remove the now unused bcm7xxx_dummy_config_init()
function which would produce a warning.
Fixes: b560a58c45c6 ("net: phy: add Broadcom BCM7xxx internal PHY driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/phy/bcm7xxx.c | 31 -------------------------------
1 files changed, 0 insertions(+), 31 deletions(-)
diff --git a/drivers/net/phy/bcm7xxx.c b/drivers/net/phy/bcm7xxx.c
index 568768a..db507e3 100644
--- a/drivers/net/phy/bcm7xxx.c
+++ b/drivers/net/phy/bcm7xxx.c
@@ -303,11 +303,6 @@ static int bcm7xxx_suspend(struct phy_device *phydev)
return 0;
}
-static int bcm7xxx_dummy_config_init(struct phy_device *phydev)
-{
- return 0;
-}
-
#define BCM7XXX_28NM_GPHY(_oui, _name) \
{ \
.phy_id = (_oui), \
@@ -365,30 +360,6 @@ static struct phy_driver bcm7xxx_driver[] = {
.read_status = genphy_read_status,
.suspend = bcm7xxx_suspend,
.resume = bcm7xxx_config_init,
-}, {
- .phy_id = PHY_BCM_OUI_4,
- .phy_id_mask = 0xffff0000,
- .name = "Broadcom BCM7XXX 40nm",
- .features = PHY_GBIT_FEATURES |
- SUPPORTED_Pause | SUPPORTED_Asym_Pause,
- .flags = PHY_IS_INTERNAL,
- .config_init = bcm7xxx_config_init,
- .config_aneg = genphy_config_aneg,
- .read_status = genphy_read_status,
- .suspend = bcm7xxx_suspend,
- .resume = bcm7xxx_config_init,
-}, {
- .phy_id = PHY_BCM_OUI_5,
- .phy_id_mask = 0xffffff00,
- .name = "Broadcom BCM7XXX 65nm",
- .features = PHY_BASIC_FEATURES |
- SUPPORTED_Pause | SUPPORTED_Asym_Pause,
- .flags = PHY_IS_INTERNAL,
- .config_init = bcm7xxx_dummy_config_init,
- .config_aneg = genphy_config_aneg,
- .read_status = genphy_read_status,
- .suspend = bcm7xxx_suspend,
- .resume = bcm7xxx_config_init,
} };
static struct mdio_device_id __maybe_unused bcm7xxx_tbl[] = {
@@ -400,8 +371,6 @@ static struct mdio_device_id __maybe_unused bcm7xxx_tbl[] = {
{ PHY_ID_BCM7439, 0xfffffff0, },
{ PHY_ID_BCM7435, 0xfffffff0, },
{ PHY_ID_BCM7445, 0xfffffff0, },
- { PHY_BCM_OUI_4, 0xffff0000 },
- { PHY_BCM_OUI_5, 0xffffff00 },
{ }
};
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes
2016-02-06 20:58 [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes Florian Fainelli
` (3 preceding siblings ...)
2016-02-06 20:58 ` [PATCH net v2 4/4] net: phy: bcm7xxx: Remove wildcard entries Florian Fainelli
@ 2016-02-16 19:56 ` David Miller
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2016-02-16 19:56 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, pgynther, jaedon.shin, opendmb, florian.fainelli
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Sat, 6 Feb 2016 12:58:47 -0800
> Here is a collection of fixes for the 40nm Ethernet PHY supported
> by the 7xxx PHY driver, please also queue these fixes for stable.
>
> Changes in v2:
>
> - dropped the cleanup patch, not appropriate
> - added another patch removing bogus wildcard entries
Series applied, thanks Florian.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-16 19:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-06 20:58 [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 1/4] net: phy: bcm7xxx: Fix shadow mode 2 disabling Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 2/4] net: phy: bcm7xxx: Fix 40nm EPHY features Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 3/4] net: phy: bcm7xxx: Fix bcm7xxx_config_init() check Florian Fainelli
2016-02-06 20:58 ` [PATCH net v2 4/4] net: phy: bcm7xxx: Remove wildcard entries Florian Fainelli
2016-02-16 19:56 ` [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).