Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3597188ybd; Tue, 25 Jun 2019 05:28:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTsncGO1MUKFUe1/xRCMQsnKqkWhi0be8dWkdVQEXh8/wZY29nIcZiDZpeG3fpBBqbrxje X-Received: by 2002:a17:90a:36a9:: with SMTP id t38mr31826190pjb.19.1561465738945; Tue, 25 Jun 2019 05:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561465738; cv=none; d=google.com; s=arc-20160816; b=l/7UeKlfyatxW6Na6OgrwAhuJIg43qyWaIU8LJvH7kA6uO3V2lbkpU/a7RB7cnE9LT ikMLNmb5mb7DQvWJNykdHeisCvctd4y9nlJ8P1w7fUmZrfW31AFssio6qDrau5uywnWP 10oyVBDsZxQH/brg+cxOKhhPMH9z8YvFVPgAf5VVw2ANnnxo1W64f6Lfo+WfG3Ajn00n lchU+S3+WwD+C9fQyw2nq++/4V4lhFHsWwb4OOmcsR+kAcqYrHDUGarMyuq7WDhvUqib CxhVaT0ASB8in1wSDICVYLSJWV34Od+NS9OwgZMcRL07kmQux6bBOkzNkoBXDGn9OTmv nwow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9JfX7iQmjBDo3pDtoFcbOTAp5d7caPSzcHl2kcohZp4=; b=ySvr1az6RtJh+4oc48J8FprtpiSKMTEYZkw12s6GjunOs7ZyciRTCvRSCUh+7kdwDH LM1FUdttgdgA40x2XmxFa0Num4nzWc9JjeM/HjJ44xZlhh8nYDKPRTowpSuiwG8JCiXt PniwZ3p1dkdkzWgxevh1hTBxTxF199jjt2rzpldJHf8ytMxCKQXTHVrIHlzLLphshiDG UxawTW+iYIqvE2jJw9K42BqjZo9wDtG7ATh3UXQYyUFR3I21RACxfpnHaDQVUCGh4ZV1 RDVpHJ8f86674myPHUNUAI4I+fRWcP9xoquwp5FxN5JR6LpayKFaFroTS9MftEHfuK/C ACjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=00ewTRfj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si264918plg.71.2019.06.25.05.28.43; Tue, 25 Jun 2019 05:28:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=00ewTRfj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729412AbfFYKeW (ORCPT + 99 others); Tue, 25 Jun 2019 06:34:22 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:50294 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728911AbfFYKeW (ORCPT ); Tue, 25 Jun 2019 06:34:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9JfX7iQmjBDo3pDtoFcbOTAp5d7caPSzcHl2kcohZp4=; b=00ewTRfjhB5xcHkCaHSWrzlCs UmJq6O4dLdpKSXHs6+W+cNlWJuRUZ12vZ96fvGFdSpBcp34N5bj2xPlgqP/Lwd6C7aNb6JATsxAMJ v2JKKzd9SgPjiB8tylyltZS9ONzOV7mA5ZuqPcTP6DF1VUbKK6JSZqTXXp/i5EXcpKbnmfVeDGP58 x5rQ7NT2Ax+fWzWWrfjznzz9XWOnTcBq6eAF1Gvvo7cRhO85j3RTp2joBahATc2faZP2D6a/yMm7u AwF+z0rE5xT2ridICk/hVCJESkHYwc8lQkHzGKliFhfDwMm29THuhbp0HJ847L18Htxz2SbrZFUFd YCCP+RwjQ==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:58982) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1hfimC-0005pp-Ny; Tue, 25 Jun 2019 11:34:12 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1hfim8-00078r-VN; Tue, 25 Jun 2019 11:34:08 +0100 Date: Tue, 25 Jun 2019 11:34:08 +0100 From: Russell King - ARM Linux admin To: Parshuram Raju Thombare Cc: "andrew@lunn.ch" , "nicolas.ferre@microchip.com" , "davem@davemloft.net" , "f.fainelli@gmail.com" , "netdev@vger.kernel.org" , "hkallweit1@gmail.com" , "linux-kernel@vger.kernel.org" , Rafal Ciepiela , Anil Joy Varughese , Piotr Sroka Subject: Re: [PATCH v5 2/5] net: macb: add support for sgmii MAC-PHY interface Message-ID: <20190625103408.5rh2slqobruavyju@shell.armlinux.org.uk> References: <1561378210-11033-1-git-send-email-pthombar@cadence.com> <1561378274-12357-1-git-send-email-pthombar@cadence.com> <20190624134233.suowuortj5dcbxdg@shell.armlinux.org.uk> <20190625092930.ootk5nvbkqqvfbtd@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 25, 2019 at 09:38:37AM +0000, Parshuram Raju Thombare wrote: > > >> >In which case, gem_phylink_validate() must clear the support mask when > >> >SGMII mode is requested to indicate that the interface mode is not > >> >supported. > >> >The same goes for _all_ other PHY link modes that the hardware does not > >> >actually support, such as PHY_INTERFACE_MODE_10GKR... > >> If interface is not supported by hardware probe returns with error, so we don't > >> net interface is not registered at all. > >That does not negate my comment above. > Sorry if I misunderstood your question, but hardware supports interfaces and based > on that link modes are supported. So if interface is not supported by hardware, > net device is not registered and there will be no phylink_validate call. > If hardware support particular interface, link modes supported by interface > are added to (not cleared from) supported mask, provided configs is not trying to limit > data rate using GIGABIT_ENABLE* macro. Why do you want to use phylink? If you are only interested in supporting 10G PHYs, you don't need phylink for that. If you are interested in supporting SFPs as well, then using phylink makes sense, but you need to implement your phylink conversion properly, and that means supporting dynamic switching of the PHY interface mode, and allowing phylink to determine whether a PHY interface mode is supported or not. However, with what you've indicated through our discussion, your MAC does not support BASE-X modes, nor does it support 10GBASE-R, both of which are required for direct connection of SFP or SFP+ modules. The only phy link mode that you support which SFPs can make use of is SGMII, and that will only be useful for copper SFPs configured for SGMII mode. It basically means you can not use any fiber SFPs. The only other way SFPs can be supported is via an intermediary PHY to convert the MAC interface to BASE-X, SGMII or 10GBASE-R, and we don't yet have support for that in mainline. So, given that you seem unwilling to take on board my comments, and your hardware does not appear support SFPs, I'm wondering what the point of this conversion actually is. As a result of our reviews, I've been improving the documentation for phylink, so there has been some positives coming out of this - which will hopefully help others to avoid the same mistakes. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up