Subject: Re: [patch 1/2] spidernet: enable support for bcm5461 ethernet phy

From: Jeff Garzik <[email-masked]>
Date: Wed, 24 May 2006 01:29:24 -0400

Jens Osterkamp wrote:
> From: Jens Osterkamp <[email-masked]>
> 
> A newer board revision changed the type of ethernet phy.
> Moreover, this generalizes the way that a phy gets switched
> into fiber mode when autodetection is not available.
> 
> Signed-off-by: Jens Osterkamp <[email-masked]>
> Signed-off-by: Arnd Bergmann <[email-masked]>
> 
> ---
> Index: linus-2.6/drivers/net/sungem_phy.c
> ===================================================================
> --- linus-2.6.orig/drivers/net/sungem_phy.c
> +++ linus-2.6/drivers/net/sungem_phy.c
> @@ -329,6 +329,30 @@ static int bcm5421_init(struct mii_phy* 
>  	return 0;
>  }
>  
> +static int bcm5421_enable_fiber(struct mii_phy* phy)
> +{
> +	/* enable fiber mode */
> +	phy_write(phy, MII_NCONFIG, 0x9020);
> +	/* 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;
> +}
> +
> +static int bcm5461_enable_fiber(struct mii_phy* phy)
> +{
> +        phy_write(phy, MII_NCONFIG, 0xfc0c);
> +        phy_write(phy, MII_BMCR, 0x4140);
> +        phy_write(phy, MII_NCONFIG, 0xfc0b);
> +	phy_write(phy, MII_BMCR, 0x0140);

NAK, failed to apply.  Also, the whitespace above is borked.

	Jeff