Skip to contentSkip to conversation

net: phy: at803x: support interrupt on 8030 and 8035

PATCH Applied Mans Rullgard 4 participants 8 messages Nov 12, 2015 – Nov 16, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index fabf11d..2d020a3 100644
@@ -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
#1 lore raw
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.

---
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
index fabf11d..2d020a3 100644
@@ -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.

#2 lore raw
Quoted 44 lines · Mason
Quoted 1 line · Mans Rullgard

Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt

mode"

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.

---
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
index fabf11d..2d020a3 100644
@@ -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
Reviewed-by on v1 1/1
#6 lore raw
In reply to Mans Rullgard
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.

Signature · 1 line
Florian
#3 lore raw
In reply to 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 interrupt

mode"

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.

---
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
index fabf11d..2d020a3 100644
@@ -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
#4 lore raw
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.

---
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
index fabf11d..2d020a3 100644
@@ -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.

#5 lore raw
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.

---
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
index fabf11d..2d020a3 100644
@@ -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 the AT803X_WOL_ENABLE bit, but a DISABLE/ENABLE cycle through at803x_config_intr() will discard that bit?

Possibly, but fixing that should be yet another patch.

Signature · 2 lines
Måns Rullgård
[email protected]
maintainer Applied
#7 lore raw
In reply to Mans Rullgard

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.

Applied.