* [PATCH] Revert "net/phy: Add Vitesse 8641 phy ID"
@ 2015-09-18 7:42 Kevin Hao
2015-09-18 9:36 ` Shaohui Xie
2015-09-21 5:29 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Kevin Hao @ 2015-09-18 7:42 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, Shaohui Xie
This reverts commit 1298267b548a78840bd4b3e030993ff8747ca5e6.
That commit claim that the Vitesse VSC8641 is compatible with Vitesse
82xx. But this is not true. It seems that all the registers used
in Vitesse phy driver are not compatible between 8641 and 82xx.
It does cause malfunction of the Ethernet on p1010rdb-pa board.
So we definitely need a rework in order to support the 8641 phy
in this driver.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
drivers/net/phy/vitesse.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index 17cad185169d..76cad712ddb2 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -66,7 +66,6 @@
#define PHY_ID_VSC8244 0x000fc6c0
#define PHY_ID_VSC8514 0x00070670
#define PHY_ID_VSC8574 0x000704a0
-#define PHY_ID_VSC8641 0x00070431
#define PHY_ID_VSC8662 0x00070660
#define PHY_ID_VSC8221 0x000fc550
#define PHY_ID_VSC8211 0x000fc4b0
@@ -273,18 +272,6 @@ static struct phy_driver vsc82xx_driver[] = {
.config_intr = &vsc82xx_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
- .phy_id = PHY_ID_VSC8641,
- .name = "Vitesse VSC8641",
- .phy_id_mask = 0x000ffff0,
- .features = PHY_GBIT_FEATURES,
- .flags = PHY_HAS_INTERRUPT,
- .config_init = &vsc824x_config_init,
- .config_aneg = &vsc82x4_config_aneg,
- .read_status = &genphy_read_status,
- .ack_interrupt = &vsc824x_ack_interrupt,
- .config_intr = &vsc82xx_config_intr,
- .driver = { .owner = THIS_MODULE,},
-}, {
.phy_id = PHY_ID_VSC8662,
.name = "Vitesse VSC8662",
.phy_id_mask = 0x000ffff0,
@@ -331,7 +318,6 @@ static struct mdio_device_id __maybe_unused vitesse_tbl[] = {
{ PHY_ID_VSC8244, 0x000fffc0 },
{ PHY_ID_VSC8514, 0x000ffff0 },
{ PHY_ID_VSC8574, 0x000ffff0 },
- { PHY_ID_VSC8641, 0x000ffff0 },
{ PHY_ID_VSC8662, 0x000ffff0 },
{ PHY_ID_VSC8221, 0x000ffff0 },
{ PHY_ID_VSC8211, 0x000ffff0 },
--
2.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] Revert "net/phy: Add Vitesse 8641 phy ID"
2015-09-18 7:42 [PATCH] Revert "net/phy: Add Vitesse 8641 phy ID" Kevin Hao
@ 2015-09-18 9:36 ` Shaohui Xie
2015-09-19 6:22 ` Kevin Hao
2015-09-21 5:29 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Shaohui Xie @ 2015-09-18 9:36 UTC (permalink / raw)
To: Kevin Hao, netdev@vger.kernel.org; +Cc: Florian Fainelli
> -----Original Message-----
> From: Kevin Hao [mailto:haokexin@gmail.com]
> Sent: Friday, September 18, 2015 3:43 PM
> To: netdev@vger.kernel.org
> Cc: Florian Fainelli; Xie Shaohui-B21989
> Subject: [PATCH] Revert "net/phy: Add Vitesse 8641 phy ID"
>
> This reverts commit 1298267b548a78840bd4b3e030993ff8747ca5e6.
>
> That commit claim that the Vitesse VSC8641 is compatible with Vitesse
> 82xx. But this is not true. It seems that all the registers used in
> Vitesse phy driver are not compatible between 8641 and 82xx.
[S.H] There are differences between some register's bit define.
But some are not used by driver.
> It does cause malfunction of the Ethernet on p1010rdb-pa board.
[S.H] Which exact register's setting caused problem? If it needs different setting,
It can be handled by distinguishing phy_id, or replacing relative API for VSC8641.
Thanks!
Shaohui
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "net/phy: Add Vitesse 8641 phy ID"
2015-09-18 9:36 ` Shaohui Xie
@ 2015-09-19 6:22 ` Kevin Hao
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Hao @ 2015-09-19 6:22 UTC (permalink / raw)
To: Shaohui Xie; +Cc: netdev@vger.kernel.org, Florian Fainelli
[-- Attachment #1: Type: text/plain, Size: 3189 bytes --]
On Fri, Sep 18, 2015 at 09:36:42AM +0000, Shaohui Xie wrote:
> > -----Original Message-----
> > From: Kevin Hao [mailto:haokexin@gmail.com]
> > Sent: Friday, September 18, 2015 3:43 PM
> > To: netdev@vger.kernel.org
> > Cc: Florian Fainelli; Xie Shaohui-B21989
> > Subject: [PATCH] Revert "net/phy: Add Vitesse 8641 phy ID"
> >
> > This reverts commit 1298267b548a78840bd4b3e030993ff8747ca5e6.
> >
> > That commit claim that the Vitesse VSC8641 is compatible with Vitesse
> > 82xx. But this is not true. It seems that all the registers used in
> > Vitesse phy driver are not compatible between 8641 and 82xx.
> [S.H] There are differences between some register's bit define.
> But some are not used by driver.
>
> > It does cause malfunction of the Ethernet on p1010rdb-pa board.
> [S.H] Which exact register's setting caused problem?
> If it needs different setting,
> It can be handled by distinguishing phy_id, or replacing relative API for VSC8641.
In my case, the malfunction of the Ethernet is caused by writing the wrong
value for the skew timing. The Ethernet can work if I skip the setting of
skew in phy driver. But as I said in the commit log, all the registers used
in the current Vitesse phy driver are not compatible between 8641 and 82xx.
The following are the main differences between these registers:
Auxiliary Control & Status Register (0x1c):
8641 8244
6: reserved 6: ActiPHY Mode Enable
1: Sticky Reset Enable 1-0: ActiPHYTM Sleep Timer
Extended PHY Control Set 1 (0x17):
8641 8244
8: RGMII skew timing 11-10: RGMII TX_CLK Skew Selection
9 - 8: RGMII RX_CLK Skew Selection
5: ActiPHY mode enable 5: RX Idle Clock Enable
3: reserved 3: Far End Loopback Mode Enable
1: GMII transmit pin reversal 2 - 1: MAC/Media Interface Mode Select
0: reserved 0: EEPROM Status
MII_VSC82X4_EXT_PAGE_16E (0x10):
8641 8244
Enhanced LED Method Select register Reserved register
MII_VSC82X4_EXT_PAGE_17E (0x11):
8641 8244
Enhanced LED Behavior register CLK125 micro Clock Enable
MII_VSC82X4_EXT_PAGE_18E (0x12):
8641 8244
CRC Good Counter register Reserved register
As you can see, I don't think it is a better option to sprinkle the checking
phy id for each writing of these register. Of course we can add the specific
API for 8641 to fix this problem. But since the generic phy driver works well
with the 8641 phy, this commit does seem a regression for me. So I prefer a
simple revert to this commit and merge the revert into the stable kernel tree
to fix the regression first. We can add the corresponding 8641 phy API in the
following patches.
Thanks,
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "net/phy: Add Vitesse 8641 phy ID"
2015-09-18 7:42 [PATCH] Revert "net/phy: Add Vitesse 8641 phy ID" Kevin Hao
2015-09-18 9:36 ` Shaohui Xie
@ 2015-09-21 5:29 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2015-09-21 5:29 UTC (permalink / raw)
To: haokexin; +Cc: netdev, f.fainelli, Shaohui.Xie
From: Kevin Hao <haokexin@gmail.com>
Date: Fri, 18 Sep 2015 15:42:30 +0800
> This reverts commit 1298267b548a78840bd4b3e030993ff8747ca5e6.
>
> That commit claim that the Vitesse VSC8641 is compatible with Vitesse
> 82xx. But this is not true. It seems that all the registers used
> in Vitesse phy driver are not compatible between 8641 and 82xx.
> It does cause malfunction of the Ethernet on p1010rdb-pa board.
> So we definitely need a rework in order to support the 8641 phy
> in this driver.
>
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-21 5:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-18 7:42 [PATCH] Revert "net/phy: Add Vitesse 8641 phy ID" Kevin Hao
2015-09-18 9:36 ` Shaohui Xie
2015-09-19 6:22 ` Kevin Hao
2015-09-21 5:29 ` 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).