eth_v10.c phy fix
Subsystems (2)
PATCH 1/1 eth_v10.c phy fix
Hi guys,
This patch allows you to set phy address parameters through ethtool, like:
/bin/ethtool -s eth0 phyad 8
net/cris/eth_v10.c 2008-06-12 14:19:35.000000000 +0200 renamed from net/cris/eth_v10.c 2008-06-12 14:12:33.000000000 +0200 +1 -1
@@ -1430,7 +1430,11 @@ e100_set_duplex(dev, ecmd->duplex == DUPLEX_HALF ? half : full); e100_set_speed(dev, ecmd->speed == SPEED_10 ? 10: 100); } - + //Honor ethtool phy address parameter, which was simply
discarded before this.
+ if (ecmd->phy_address <= 31)
+ mdio_phy_addr = ecmd->phy_address;
+ else if (ecmd->phy_address == 32)
+ return -ENODEV;
return 0;}
I've searched the MAINTAINERS file and haven't seen anything regarding either the source file name or cris. Please consider applying my patch to main kernel...
Thanks,
Pieter Steyn
net/cris/eth_v10.c +5 -1
@@ -1430,7 +1430,11 @@e100_set_duplex (dev, ecmd->duplex ==DUPLEX_HALF ? half : full);e100_set_speed (dev, ecmd->speed ==SPEED_10 ?10 :100 ); } - +//Honor ethtool phy address parameter, which was simply unused before this. +if (ecmd->phy_address <=31 ) + mdio_phy_addr = ecmd->phy_address; +else if (ecmd->phy_address ==32 ) +return -ENODEV ;return 0 ; }
Ah, I did not consider case when searching...DOH! :]
I've now cc'ed in Jesper who seems to be the maintainer.
Cheers,
Pieter Steyn
Quoted 32 lines · Pieter Steyn
Hi guys,
This patch allows you to set phy address parameters through ethtool, like:
/bin/ethtool-s eth0 phyad 8---
drivers/net/cris/eth_v10.c2008-06-12 14:12:33.000000000 +0200 +++drivers/net/cris/eth_v10.c2008-06-12 14:19:35.000000000 +0200 @@ -1430,7 +1430,11 @@e100_set_duplex(dev, ecmd->duplex == DUPLEX_HALF ? half : full); e100_set_speed(dev, ecmd->speed == SPEED_10 ? 10: 100); } - + //Honor ethtool phy address parameter, which was simply discarded before this. + if (ecmd->phy_address <= 31) + mdio_phy_addr = ecmd->phy_address; + else if (ecmd->phy_address == 32) + return -ENODEV; return 0;}
I've searched the
MAINTAINERSfile and haven't seen anything regarding either the source file name or cris. Please consider applying my patch to main kernel...Thanks,
Pieter Steyn
Hi guys,
Any word on this?
Thanks,
Pieter
Quoted 43 lines · Pieter Steyn
Ah, I did not consider case when searching...DOH! :]
I've now cc'ed in Jesper who seems to be the maintainer.
Cheers,
Pieter Steyn
Quoted 32 lines · Pieter Steyn
Hi guys,
This patch allows you to set phy address parameters through ethtool, like:
/bin/ethtool-s eth0 phyad 8---
drivers/net/cris/eth_v10.c2008-06-12 14:12:33.000000000 +0200 +++drivers/net/cris/eth_v10.c2008-06-12 14:19:35.000000000 +0200 @@ -1430,7 +1430,11 @@e100_set_duplex(dev, ecmd->duplex == DUPLEX_HALF ? half : full); e100_set_speed(dev, ecmd->speed == SPEED_10 ? 10: 100); } - + //Honor ethtool phy address parameter, which was simply discarded before this. + if (ecmd->phy_address <= 31) + mdio_phy_addr = ecmd->phy_address; + else if (ecmd->phy_address == 32) + return -ENODEV; return 0;}
I've searched the
MAINTAINERSfile and haven't seen anything regarding either the source file name or cris. Please consider applying my patch to main kernel...Thanks,
Pieter Steyn
Quoted 1 line · Pieter Steyn
Hi guys,
Hi,
Quoted 1 line
Any word on this?
The patch seems to be against the 2.6.23 kernel, mdio_phy_addr was removed in 2.6.24. The following compiles, although I haven't had time to test it yet:
drivers/net/cris/eth_v10.c +8 -0
@@ -1431,6 +1431,14 @@ static int e100_set_settings(struct net_device *dev,e100_set_speed (dev, ecmd->speed ==SPEED_10 ?10 :100 ); } +struct net_local *np =netdev_priv (dev); +/* Honor ethtool phy address parameter, which was simply */ +/* discarded before this. */ +if (ecmd->phy_address <=31 ) + np->mii_if.phy_id = ecmd->phy_address; +else if (ecmd->phy_address ==32 ) +return -ENODEV ; +return 0 ; }
I'll add it to my queue (which will be published RSN :), thanks!
Best regards,
/Jesper
Quoted 46 lines
Thanks,
PieterQuoted 43 lines · Pieter Steyn
Ah, I did not consider case when searching...DOH! :]
I've now cc'ed in Jesper who seems to be the maintainer.
Cheers,
Pieter Steyn
Quoted 32 lines · Pieter Steyn
Hi guys,
This patch allows you to set phy address parameters through ethtool, like:
/bin/ethtool-s eth0 phyad 8---
drivers/net/cris/eth_v10.c2008-06-12 14:12:33.000000000 +0200 +++drivers/net/cris/eth_v10.c2008-06-12 14:19:35.000000000 +0200 @@ -1430,7 +1430,11 @@e100_set_duplex(dev, ecmd->duplex == DUPLEX_HALF ? half : full); e100_set_speed(dev, ecmd->speed == SPEED_10 ? 10: 100); } - + //Honor ethtool phy address parameter, which was simply discarded before this. + if (ecmd->phy_address <= 31) + mdio_phy_addr = ecmd->phy_address; + else if (ecmd->phy_address == 32) + return -ENODEV; return 0;}
I've searched the
MAINTAINERSfile and haven't seen anything regarding either the source file name or cris. Please consider applying my patch to main kernel...Thanks,
Pieter Steyn
/^JN - Jesper Nilsson
Signature · 1 line
Jesper Nilsson -- [email protected]
Quoted 5 lines
I'll add it to my queue (which will be published RSN :), thanks!
Best regards,
/Jesper
Thank you Jesper. :)
Cheers,
Pieter