On Sunday 20 Mar 2011 12:06:18 Yann Cézard wrote:
> After having a look at the linux forcedeth driver, I found that the
> (g/i)pxe forcedeth driver code was missing a NVREG_MIISTAT_LINKCHANGE
> register update, which made the poll method thinking that a link change
> as occured every time it was called.
> Updating this register and testing it in forcedeth_link_status just did
> the trick !

Thanks for that!  Could you try the attached patch and see if it also fixes 
your problem?

Thanks,

Michael
commit 9215b7f4c0e24cceeac42d8ced5b4af824c4b011
Author: Yann Cézard <[email protected]>
Date:   Sun Mar 20 12:29:05 2011 +0000

    [forcedeth] Clear the MII link status register on link status changes
    
    Signed-off-by: Michael Brown <[email protected]>

diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c
index 6876b00..918f502 100644
--- a/src/drivers/net/forcedeth.c
+++ b/src/drivers/net/forcedeth.c
@@ -967,6 +967,12 @@ static void
 forcedeth_link_status ( struct net_device *netdev )
 {
 	struct forcedeth_private *priv = netdev_priv ( netdev );
+	void *ioaddr = priv->mmio_addr;
+	u32 mii_status;
+
+	/* Clear the MII link change status */
+	mii_status = readl ( ioaddr + NvRegMIIStatus );
+	writel ( NVREG_MIISTAT_LINKCHANGE, ioaddr + NvRegMIIStatus );
 
 	if ( nv_update_linkspeed ( priv ) == 1 )
 		netdev_link_up ( netdev );
_______________________________________________
ipxe-devel mailing list
[email protected]
https://lists.ipxe.org/mailman/listinfo/ipxe-devel

Reply via email to