[Cbe-oss-dev] [RFC][PATCH] spidernet: enable fiber autonegotiation
James K Lewis
jklewis at us.ibm.com
Tue Nov 28 06:18:06 EST 2006
On my Cell blade this failed on the latest build (be0646). Running with
the changes to sungem_phy does not allow the interfaces to ping anything.
I went back to the original and everything works again. All I did was
change sungem_phy and force it to be reloaded, let me know if I missed a
step somewhere.
Jim Lewis
Advisory Software Engineer
IBM Linux Technology Center
512-838-7754
Jens Osterkamp <jens at de.ibm.com>
11/27/2006 08:47 AM
To
netdev at vger.kernel.org, cbe-oss-dev at ozlabs.org
cc
jgarzik at pobox.com, James K Lewis/Austin/IBM at ibmus
Subject
[RFC][PATCH] spidernet: enable fiber autonegotiation
While experimenting with a copper passthrough module in bladecenter I
found
out that this needs autonegotiation enabled in order to work properly.
This quick hack enables it with the sideeffect of breaking other
bladecenter
switch configurations.
If anyone has any suggestions or has experimented with the same
configuration,
feel free to comment.
This patch is not meant for inclusion into mainline.
Signed-off-by: Jens Osterkamp <jens at de.ibm.com>
Index: linux-2.6.19-rc6/drivers/net/spider_net.c
===================================================================
--- linux-2.6.19-rc6.orig/drivers/net/spider_net.c
+++ linux-2.6.19-rc6/drivers/net/spider_net.c
@@ -1724,8 +1724,10 @@ spider_net_setup_phy(struct spider_net_c
phy->mdio_read = spider_net_read_phy;
phy->mdio_write = spider_net_write_phy;
+ /* reset phy, read id and setup phy struct with phy ops*/
mii_phy_probe(phy, phy->mii_id);
+ /* write fix speed and duplex to BMCR */
if (phy->def->ops->setup_forced)
phy->def->ops->setup_forced(phy, SPEED_1000, DUPLEX_FULL);
Index: linux-2.6.19-rc6/drivers/net/sungem_phy.c
===================================================================
--- linux-2.6.19-rc6.orig/drivers/net/sungem_phy.c
+++ linux-2.6.19-rc6/drivers/net/sungem_phy.c
@@ -335,10 +335,6 @@ static int bcm5421_enable_fiber(struct m
/* LEDs active in both modes, autosense prio = fiber */
phy_write(phy, MII_NCONFIG, 0x945f);
- /* switch off fibre autoneg */
- phy_write(phy, MII_NCONFIG, 0xfc01);
- phy_write(phy, 0x0b, 0x0004);
-
return 0;
}
@@ -347,7 +343,7 @@ static int bcm5461_enable_fiber(struct m
phy_write(phy, MII_NCONFIG, 0xfc0c);
phy_write(phy, MII_BMCR, 0x4140);
phy_write(phy, MII_NCONFIG, 0xfc0b);
- phy_write(phy, MII_BMCR, 0x0140);
+ phy_write(phy, MII_BMCR, 0x1140);
return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/cbe-oss-dev/attachments/20061127/18737442/attachment.htm>
More information about the cbe-oss-dev
mailing list