net: Fix ucc_geth.c handling of phy 'interface' property.
Subsystems (2)
PATCH 1/1 net: Fix ucc_geth.c handling of phy 'interface' property.
From: Grant Likely <[email protected]>
Previous rework to ucc_geth.c to add of_mdio support (net: Rework ucc_geth driver to use of_mdio infrastructure) added a block of code which broke older openfirmware device trees which use an 'interface' property in the phy node to describe the connection between the MAC and the PHY. This patch removes the offending blurb.
---
drivers/net/ucc_geth.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/net/ucc_geth.c +0 -3
@@ -3639,9 +3639,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma prop =of_get_property (np,"phy-connection-type" ,NULL );if (!prop) {/* handle interface property present in old trees */ -if (!phy) -return -ENODEV ; - prop =of_get_property (phy,"interface" ,NULL );if (prop !=NULL ) { phy_interface = enet_to_phy_interface[*prop];
Quoted 7 lines · Grant Likely
From: Grant Likely <[email protected]>
Previous rework to
ucc_geth.cto addof_mdiosupport (net: Reworkucc_gethdriver to useof_mdioinfrastructure) added a block of code which broke older openfirmware device trees which use an 'interface' property in the phy node to describe the connection between the MAC and the PHY. This patch removes the offending blurb.
[snip]
drivers/net/ucc_geth.c static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma · line 3644
Quoted 9 lines
drivers/net/ucc_geth.c +0
-3prop =of_get_property (np,"phy-connection-type" ,NULL );if (!prop) {/* handle interface property present in old trees */ -if (!phy) -return -ENODEV ; - prop =of_get_property (phy,"interface" ,NULL );if (prop !=NULL ) { phy_interface = enet_to_phy_interface[*prop];
The above test only makes a difference when there is no phy node -- so I don't see how it was breaking device trees that had a phy node (with or without an "interface" property). I can see it breaking fixed link device trees, though.
-Scott
Quoted 19 lines · Scott Wood
Quoted 7 lines · Grant Likely
From: Grant Likely <[email protected]>
Previous rework to
ucc_geth.cto addof_mdiosupport (net: Reworkucc_gethdriver to useof_mdioinfrastructure) added a block of code which broke older openfirmware device trees which use an 'interface' property in the phy node to describe the connection between the MAC and the PHY. This patch removes the offending blurb.[snip]
Quoted 9 lines
prop =
of_get_property(np, "phy-connection-type", NULL); if (!prop) {
/* handle interface property present in old trees */
- if (!phy)
- return-ENODEV;
-
prop =of_get_property(phy, "interface", NULL); if (prop != NULL) {
phy_interface= enet_to_phy_interface[*prop];
Quoted 4 lines
The above test only makes a difference when there is no phy node -- so I don't see how it was breaking device trees that had a phy node (with or without an "interface" property). I can see it breaking fixed link device trees, though.
Sorry, you're right. I got myself confused when I was writing the description. This patch fixes breakage when using a fixed-link and there is no phy-connection-type property.
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
David Miller
maintainerFrom: Grant Likely <[email protected]>
Date: Mon, 27 Apr 2009 11:50:20 -0600
Quoted 20 lines · Scott Wood
Quoted 19 lines · Grant Likely
Quoted 7 lines
From: Grant Likely <[email protected]>
Previous rework to
ucc_geth.cto addof_mdiosupport (net: Reworkucc_gethdriver to useof_mdioinfrastructure) added a block of code which broke older openfirmware device trees which use an 'interface' property in the phy node to describe the connection between the MAC and the PHY. This patch removes the offending blurb.[snip]
Quoted 9 lines
prop =
of_get_property(np, "phy-connection-type", NULL); if (!prop) {
/* handle interface property present in old trees */
- if (!phy)
- return-ENODEV;
-
prop =of_get_property(phy, "interface", NULL); if (prop != NULL) {
phy_interface= enet_to_phy_interface[*prop];
Quoted 8 lines
Quoted 4 lines
The above test only makes a difference when there is no phy node -- so I don't see how it was breaking device trees that had a phy node (with or without an "interface" property). I can see it breaking fixed link device trees, though.
Sorry, you're right. I got myself confused when I was writing the description. This patch fixes breakage when using a fixed-link and there is no phy-connection-type property.
Patch applied with commit message fixed up.
Quoted 28 lines · David Miller
From: Grant Likely <[email protected]>
Date: Mon, 27 Apr 2009 11:50:20 -0600Quoted 25 lines · Scott Wood
Quoted 23 lines · Grant Likely
Quoted 7 lines
From: Grant Likely <[email protected]>
Previous rework to
ucc_geth.cto addof_mdiosupport (net: Reworkucc_gethdriver to useof_mdioinfrastructure) added a block of code which broke older openfirmware device trees which use an 'interface' property in the phy node to describe the connection between the MAC and the PHY. This patch removes the offending blurb.[snip]
Quoted 9 lines
prop =
of_get_property(np, "phy-connection-type", NULL); if (!prop) {
/* handle interface property present in old trees */
- if (!phy)
- return-ENODEV;
-
prop =of_get_property(phy, "interface", NULL); if (prop != NULL) {
phy_interface= enet_to_phy_interface[*prop];The above test only makes a difference when there is no phy node -- so I don't see how it was breaking device trees that had a phy node (with or without an "interface" property). I can see it breaking fixed link device trees, though.
Quoted 5 lines
Quoted 3 lines
Sorry, you're right. I got myself confused when I was writing the description. This patch fixes breakage when using a fixed-link and there is no phy-connection-type property.
Patch applied with commit message fixed up.
Thanks David
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.