Skip to contentSkip to conversation

Add fixed-phy support for fs_enet

PATCH/RFC Jochen Friedrich 3 participants 4 messages Dec 12, 2007 – Dec 18, 2007

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

This patch adds support to use the fixed-link property of an ethernet node to fs_enet for the CONFIG_PPC_CPM_NEW_BINDING case.

---
 drivers/net/fs_enet/fs_enet-main.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
drivers/net/fs_enet/fs_enet-main.c +8 -1
index f2a4d39..8220c70 100644
@@ -1174,8 +1174,15 @@ static int __devinit find_phy(struct device_node *np,
 	struct device_node *phynode, *mdionode;
 	struct resource res;
 	int ret = 0, len;
+	const u32 *data;
+
+	data  = of_get_property(np, "fixed-link", NULL);
+	if (data) {
+		snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data);
+		return 0;
+	}
 
-	const u32 *data = of_get_property(np, "phy-handle", &len);
+	data = of_get_property(np, "phy-handle", &len);
 	if (!data || len != 4)
 		return -EINVAL;
 
Signature · 1 line
1.5.3.7
#1 lore raw
Quoted 18 lines · Jochen Friedrich

This patch adds support to use the fixed-link property of an ethernet node to fs_enet for the CONFIG_PPC_CPM_NEW_BINDING case.

---
 drivers/net/fs_enet/fs_enet-main.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
drivers/net/fs_enet/fs_enet-main.c +1 -0
index f2a4d39..8220c70 100644
@@ -1174,8 +1174,15 @@ static int __devinit find_phy(struct device_node *np,
 	struct device_node *phynode, *mdionode;
 	struct resource res;
 	int ret = 0, len;
+	const u32 *data;

drivers/net/fs_enet/fs_enet-main.c static int __devinit find_phy(struct device_node *np, · line 1186

Quoted 10 lines
drivers/net/fs_enet/fs_enet-main.c +7 -1
+
+	data  = of_get_property(np, "fixed-link", NULL);
+	if (data) {
+		snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data);
+		return 0;
+	}
 
-	const u32 *data = of_get_property(np, "phy-handle", &len);
+	data = of_get_property(np, "phy-handle", &len);
 	if (!data || len != 4)

ACK, pass this through paulus?

#2 lore raw

Hi Jeff,

Quoted 1 line

ACK, pass this through paulus?

Yes, that's fine for me.

Thanks,
Jochen

Acked-by
#3 lore raw
In reply to Jeff Garzik
Quoted 6 lines · On Mon, 17 Dec 2007 18:20:14 -0500 Jeff Garzik wrote:
Quoted 5 lines · Jochen Friedrich

This patch adds support to use the fixed-link property of an ethernet node to fs_enet for the CONFIG_PPC_CPM_NEW_BINDING case.

Jochen,
will you resend the patch with all acks to paulus? I'll do that if not.

Signature · 1 line
Sincerely, Vitaly