From patchwork Fri Nov 13 12:43:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hermann Lauer X-Patchwork-Id: 38366 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 20EB3B6F2B for ; Sat, 14 Nov 2009 00:26:32 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751765AbZKMN0Y (ORCPT ); Fri, 13 Nov 2009 08:26:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751800AbZKMN0Y (ORCPT ); Fri, 13 Nov 2009 08:26:24 -0500 Received: from relay.uni-heidelberg.de ([129.206.100.212]:51676 "EHLO relay.uni-heidelberg.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbZKMN0X (ORCPT ); Fri, 13 Nov 2009 08:26:23 -0500 X-Greylist: delayed 2556 seconds by postgrey-1.27 at vger.kernel.org; Fri, 13 Nov 2009 08:26:23 EST Received: from mail1.iwr.uni-heidelberg.de (mail1.iwr.uni-heidelberg.de [129.206.109.247]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id nADChpx2006596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 13 Nov 2009 13:43:51 +0100 Received: from lemon.iwr.uni-heidelberg.de (lemon.iwr.uni-heidelberg.de [129.206.104.80]) by mail1.iwr.uni-heidelberg.de (8.14.3/8.12.11) with ESMTP id nADChotW010254 for ; Fri, 13 Nov 2009 13:43:50 +0100 Received: (from hlauer@localhost) by lemon.iwr.uni-heidelberg.de (8.13.6/8.12.11) id nADChoJi001942 for sparclinux@vger.kernel.org; Fri, 13 Nov 2009 13:43:50 +0100 (MET) Date: Fri, 13 Nov 2009 13:43:50 +0100 From: Hermann Lauer To: sparclinux@vger.kernel.org Subject: [experimental patch] sungem: force serdes dection on buildin V880 fiber gigabit ethernet Message-ID: <20091113124350.GA1926@lemon.iwr.uni-heidelberg.de> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org 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 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) {