net: phy: at803x: support interrupt on 8030 and 8035
Subsystems (3)
PATCH 1/1 net: phy: at803x: support interrupt on 8030 and 8035
Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt mode" added interrupt support for the 8031 PHY but left out the other two chips supported by this driver.
This patch sets the .ack_interrupt and .config_intr functions for the 8030 and 8035 drivers as well.
---
I have only tested this with an 8035. I can't find a datasheet for the 8030, but since 8031, 8032, and 8035 all have the same register layout, there's a good chance 8030 does as well.
--- drivers/net/phy/at803x.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/phy/at803x.c +4 -0
@@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },
@@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },
Signature · 1 line
2.6.3
Quoted 30 lines · Mans Rullgard
Commit
77a993942"phy/at8031: enable at8031 to work on interrupt mode" added interrupt support for the 8031 PHY but left out the other two chips supported by this driver.This patch sets the .ack_interrupt and .config_intr functions for the 8030 and 8035 drivers as well.
Signed-off-by Mans Rullgard <[email protected]>---
I have only tested this with an 8035. I can't find a datasheet for the 8030, but since 8031, 8032, and 8035 all have the same register layout, there's a good chance 8030 does as well.--- drivers/net/phy/at803x.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/phy/at803x.c +2
-0@@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },
drivers/net/phy/at803x.c static struct phy_driver at803x_driver[] = { · line 336
Quoted 8 lines
drivers/net/phy/at803x.c +2
-0@@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },
Shouldn't we take the opportunity to clean up the duplicated register definitions? (I'll send an informal patch to spur discussion.)
Regards.
Quoted 44 lines · Mason
Quoted 1 line · Mans Rullgard
Commit
77a993942"phy/at8031: enable at8031 to work on interruptmode"
Quoted 29 lines
added interrupt support for the 8031 PHY but left out the other two chips supported by this driver.
This patch sets the .ack_interrupt and .config_intr functions for the 8030 and 8035 drivers as well.
Signed-off-by Mans Rullgard <[email protected]>---
I have only tested this with an 8035. I can't find a datasheet for the 8030, but since 8031, 8032, and 8035 all have the same register layout, there's a good chance 8030 does as well.--- drivers/net/phy/at803x.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/phy/at803x.c +2
-0@@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },drivers/net/phy/at803x.c static struct phy_driver at803x_driver[] = { · line 336
Quoted 8 lines
drivers/net/phy/at803x.c +2
-0@@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },Shouldn't we take the opportunity to clean up the duplicated register definitions? (I'll send an informal patch to spur discussion.)
Quoted 1 line
Regards.
That can be done independently. Feel free to send a patch.
Signature · 1 line
Måns Rullgård
Quoted 45 lines · Måns Rullgård
Quoted 44 lines · Mason
Quoted 1 line · Mans Rullgard
Commit
77a993942"phy/at8031: enable at8031 to work on interruptmode"
Quoted 29 lines
added interrupt support for the 8031 PHY but left out the other two chips supported by this driver.
This patch sets the .ack_interrupt and .config_intr functions for the 8030 and 8035 drivers as well.
Signed-off-by Mans Rullgard <[email protected]>---
I have only tested this with an 8035. I can't find a datasheet for the 8030, but since 8031, 8032, and 8035 all have the same register layout, there's a good chance 8030 does as well.--- drivers/net/phy/at803x.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/phy/at803x.c +2
-0@@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },drivers/net/phy/at803x.c static struct phy_driver at803x_driver[] = { · line 336
Quoted 8 lines
drivers/net/phy/at803x.c +2
-0@@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },Shouldn't we take the opportunity to clean up the duplicated register definitions? (I'll send an informal patch to spur discussion.)
Quoted 3 lines
Quoted 1 line
Regards.
That can be done independently. Feel free to send a patch.
Agreed, that deserve a separate patch.
Signature · 1 line
Florian
Quoted 45 lines · Florian Fainelli
Quoted 44 lines · Måns Rullgård
Quoted 43 lines · Mason
Quoted 30 lines · Mans Rullgard
Commit
77a993942"phy/at8031: enable at8031 to work on interrupt mode" added interrupt support for the 8031 PHY but left out the other two chips supported by this driver.This patch sets the .ack_interrupt and .config_intr functions for the 8030 and 8035 drivers as well.
Signed-off-by Mans Rullgard <[email protected]>---
I have only tested this with an 8035. I can't find a datasheet for the 8030, but since 8031, 8032, and 8035 all have the same register layout, there's a good chance 8030 does as well.--- drivers/net/phy/at803x.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/phy/at803x.c +2
-0@@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },drivers/net/phy/at803x.c static struct phy_driver at803x_driver[] = { · line 336
Quoted 8 lines
drivers/net/phy/at803x.c +2
-0@@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },Shouldn't we take the opportunity to clean up the duplicated register definitions? (I'll send an informal patch to spur discussion.)
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Regards.
That can be done independently. Feel free to send a patch.
Agreed, that deserve a separate patch.
Isn't there a problem when at803x_set_wol() sets the AT803X_WOL_ENABLE bit, but a DISABLE/ENABLE cycle through at803x_config_intr() will discard that bit?
Regards.
Quoted 48 lines · Mason
Quoted 47 lines · Florian Fainelli
Quoted 46 lines · Måns Rullgård
Quoted 44 lines · Mason
Quoted 30 lines · Mans Rullgard
Commit
77a993942"phy/at8031: enable at8031 to work on interrupt mode" added interrupt support for the 8031 PHY but left out the other two chips supported by this driver.This patch sets the .ack_interrupt and .config_intr functions for the 8030 and 8035 drivers as well.
Signed-off-by Mans Rullgard <[email protected]>---
I have only tested this with an 8035. I can't find a datasheet for the 8030, but since 8031, 8032, and 8035 all have the same register layout, there's a good chance 8030 does as well.--- drivers/net/phy/at803x.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/phy/at803x.c +2
-0@@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },drivers/net/phy/at803x.c static struct phy_driver at803x_driver[] = { · line 336
Quoted 8 lines
drivers/net/phy/at803x.c +2
-0@@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = { .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status, + .ack_interrupt = at803x_ack_interrupt, + .config_intr = at803x_config_intr, .driver = { .owner = THIS_MODULE, },Shouldn't we take the opportunity to clean up the duplicated register definitions? (I'll send an informal patch to spur discussion.)
Regards.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
That can be done independently. Feel free to send a patch.
Agreed, that deserve a separate patch.
Isn't there a problem when
at803x_set_wol()sets theAT803X_WOL_ENABLEbit, but a DISABLE/ENABLE cycle throughat803x_config_intr()will discard that bit?
Possibly, but fixing that should be yet another patch.
Signature · 2 lines
Måns Rullgård [email protected]
Quoted 8 lines · Mans Rullgard
Commit
77a993942"phy/at8031: enable at8031 to work on interrupt mode" added interrupt support for the 8031 PHY but left out the other two chips supported by this driver.This patch sets the .ack_interrupt and .config_intr functions for the 8030 and 8035 drivers as well.
Signed-off-by Mans Rullgard <[email protected]>
Signature · 1 line
Florian
From: Mans Rullgard <[email protected]>
Date: Thu, 12 Nov 2015 17:40:20 +0000
Quoted 8 lines
Commit
77a993942"phy/at8031: enable at8031 to work on interrupt mode" added interrupt support for the 8031 PHY but left out the other two chips supported by this driver.This patch sets the .ack_interrupt and .config_intr functions for the 8030 and 8035 drivers as well.
Signed-off-by Mans Rullgard <[email protected]>
Applied.