Patchwork [experimental] sungem: force serdes dection on buildin V880 fiber gigabit ethernet

login
register
mail settings
Submitter Hermann Lauer
Date Nov. 13, 2009, 12:43 p.m.
Message ID <20091113124350.GA1926@lemon.iwr.uni-heidelberg.de>
Download mbox | patch
Permalink /patch/38366/
State Superseded
Delegated to: David Miller
Headers show

Comments

Hermann Lauer - Nov. 13, 2009, 12:43 p.m.
On a SunFire 880 the internal fibre gigabit interface (gem chip,
an Agilent HDMP-1636A serdes on board) needs to be detected as
a serdes and not as a seriallink.

The appended experimental patch changes this during detection and
make the interface working (on top of the patches developed with davem for
the Sun PCI gigabit fibre interface card).

Please comment and tell if there is a PCI sungem with seriallink and an
ID of PCI_DEVICE_ID_SUN_GEM(2bad) out there.

BTW, the patch is against debian lenny kernel sources (2.6.26-2-sparc64-smp),
as since 2.6.27rcX the kernel did not run anymore on this hardware
(will try 2.6.31.6 when compile finished).

Thanks,
  Hermann
David Miller - Nov. 16, 2009, 11:04 a.m.
From: Hermann Lauer <Hermann.Lauer@iwr.uni-heidelberg.de>
Date: Fri, 13 Nov 2009 13:43:50 +0100

> On a SunFire 880 the internal fibre gigabit interface (gem chip,
> an Agilent HDMP-1636A serdes on board) needs to be detected as
> a serdes and not as a seriallink.
> 
> The appended experimental patch changes this during detection and
> make the interface working (on top of the patches developed with davem for
> the Sun PCI gigabit fibre interface card).
> 
> Please comment and tell if there is a PCI sungem with seriallink and an
> ID of PCI_DEVICE_ID_SUN_GEM(2bad) out there.

Thanks a lot for this patch, I'll take a close look at it soon.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff -up build_sparc_none_sparc64-smp/drivers/net/sungem.c.detect build_sparc_none_sparc64-smp/drivers/net/sungem.c
--- build_sparc_none_sparc64-smp/drivers/net/sungem.c.detect	2009-11-13 11:56:58.000000000 +0100
+++ build_sparc_none_sparc64-smp/drivers/net/sungem.c	2009-11-13 11:54:24.000000000 +0100
@@ -2062,7 +2062,11 @@  static int gem_check_invariants(struct g
 		mif_cfg &= ~MIF_CFG_PSELECT;
 		writel(mif_cfg, gp->regs + MIF_CFG);
 	} else {
-		gp->phy_type = phy_serialink;
+	        if (pdev->device == PCI_DEVICE_ID_SUN_GEM) {
+		  printk(KERN_INFO PFX "SUNGEM phy_serdes forced.\n");
+		  gp->phy_type = phy_serdes;
+		} else
+		  gp->phy_type = phy_serialink;
 	}
 	if (gp->phy_type == phy_mii_mdio1 ||
 	    gp->phy_type == phy_mii_mdio0) {