Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp38010imb; Thu, 28 Feb 2019 15:14:58 -0800 (PST) X-Google-Smtp-Source: APXvYqwhhE69JCtKSh1hY9772v5QPrSMh+L2TYElST1XbDEIhqviuEEAXiZsFLhp4sItzT83bMJU X-Received: by 2002:a65:490e:: with SMTP id p14mr1629288pgs.373.1551395698825; Thu, 28 Feb 2019 15:14:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551395698; cv=none; d=google.com; s=arc-20160816; b=rfv5W+pkYSeX19g2FNJQ1PDJ5OzmxNq2AGKY3PogHw1KrdItLrd+oyv8YwCcmLuh63 V7SkG5kC6vobTdUQamgcwfY69KYuhvz8OU1XYjV/8oYS4UHR+2SUwHecZr/AC4BgZ5wt 2hs7TDSY5MVtukJ6eZ2L4CJU/NVpMFg+IMN4qjPFF8FSNPMwh4mOj1JQdIhs5O77EPOe 71amgTX6fphSt4aTti3EzhIKBrB1nHvCT7HTZ87v/GsLrk1kLauYnumtvPEQB3fsdTsx gj+DxgWFD0bpuVOWZv2g0SplHQ88qiRNeqBLcouhTbdBmyV9gIV2BIm4wpqcukxW6ZzB PqeQ== 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=ZTzwTjfZ/2+gziHkMZAPvjyNMougAY35fadBoUPt/g8=; b=akWCVSSUPMYCt4T31Fns8b+qfDyrAfneCeI/fu+iK0K0WUYRmS0zwT4FZ3U2EeFfIy Q1nPyMYZIrctOI5ZAxyEbaeosYBdMtznI4d7DPRh81Yer6e/7SWN72yqafUVqH3qmTnh 14yVvx57Q+uVD2PGcndTc336WLxl5iDXCldTSVulb5IFaKA7SCJIzBOt0O20MmbABhlw 4U8X3TGjpYn47PphWAzUl1vnKP0ZHcyNbfbKB5tP/RKDB1F0C53TzDhIMuesTCcNDJ5H abqfiBwGvotOoUV9StWfp9tcQgfn99XpPAde+UW8ia+cXdxdxSdWL5OHHUnsY6oB+mvU p1iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=t4jCIjI9; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb2si20405780plb.201.2019.02.28.15.14.43; Thu, 28 Feb 2019 15:14:58 -0800 (PST) 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 header.i=@lunn.ch header.s=20171124 header.b=t4jCIjI9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733205AbfB1VzA (ORCPT + 99 others); Thu, 28 Feb 2019 16:55:00 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:42331 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732815AbfB1Vyx (ORCPT ); Thu, 28 Feb 2019 16:54:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender: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=ZTzwTjfZ/2+gziHkMZAPvjyNMougAY35fadBoUPt/g8=; b=t4jCIjI9ts0/ANiUOo07zV3WS7 zawgNklOm++pDhd+Y7gJvdYLB7/1dDPgjQWnAkJEgrvlQBDYMSojiOi4GXCKNipepBU3403ng8Aco GR5qAQRxFCQCG+uLgn+hQPKmaKx/i3ZOAU/5SRiB+3J55FbnvlM/ILE7BylZ2D0aCvDo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1gzTde-0007SP-3F; Thu, 28 Feb 2019 22:54:46 +0100 Date: Thu, 28 Feb 2019 22:54:46 +0100 From: Andrew Lunn To: Maxime Chevallier Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Florian Fainelli , Heiner Kallweit , Vivien Didelot , linux-arm-kernel@lists.infradead.org, Antoine Tenart , thomas.petazzoni@bootlin.com, gregory.clement@bootlin.com, miquel.raynal@bootlin.com, nadavh@marvell.com, stefanc@marvell.com Subject: Re: [PATCH net] net: dsa: mv88e6xxx: power serdes on/off for 10G interfaces on 6390X Message-ID: <20190228215446.GB24085@lunn.ch> References: <20190228211433.14211-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190228211433.14211-1-maxime.chevallier@bootlin.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 28, 2019 at 10:14:33PM +0100, Maxime Chevallier wrote: > Upon setting the cmode on 6390 and 6390X, the associated serdes > interfaces must be powered off/on. > > Both 6390X and 6390 share code to do so, but it currently uses the 6390 > specific helper mv88e6390_serdes_power() to disable and enable the > serdes interface. > > This call will fail silently on 6390X when trying so set a 10G interface > such as XAUI or RXAUI, since mv88e6390_serdes_power() internally grabs > the lane number based on modes supported by the 6390, and returns 0 when > getting -ENODEV as a lane number. > > Using mv88e6390x_serdes_power() should be safe here, since we explicitly > rule-out all ports but the 9 and 10, and because modes supported by 6390 > ports 9 and 10 are a subset of those supported on 6390X. > > This was tested on 6390X using RXAUI mode. > > Fixes: 364e9d7776a3 ("net: dsa: mv88e6xxx: Power on/off SERDES on cmode change") > Signed-off-by: Maxime Chevallier Reviewed-by: Andrew Lunn Andrew