Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp46268imb; Thu, 28 Feb 2019 15:31:42 -0800 (PST) X-Google-Smtp-Source: APXvYqzeUjKitD3kHPma0COEGKfT4GTsxG3AshgQTZkIwpYXzc1mLkbHpVpa689Ev9fggFV0iccV X-Received: by 2002:a63:cc05:: with SMTP id x5mr1726998pgf.31.1551396702366; Thu, 28 Feb 2019 15:31:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551396702; cv=none; d=google.com; s=arc-20160816; b=WqgG5FqVayINfIhsjJaZS5BlsLrTy9tZdWXrztwdb0T8l6lo/3tO7ut/gG9p+mC0Xj vPsnw+wfmaeBZT5dnVl37I76Wc0Z20rMU/vPKXuKvOw4mv1dheGWzgpJpMnXQtxEUpqy J4q1CbGtoNZjEDB22olvnowWlmQd3tH5c1Uj81wAq5Chtv5quhuQ9MK9OVqoyPRxEnGD CFzovZT+17h4lgLTmT4ATk6emSpM08vIReGt0IcEgV8YSsrWlkZDb8akV7GE2a1VKCKs qndVVHhkDkrX0xf3si92IwzsA1SQqV2ChS5Fk1GVbgPhQeWr6xtXYOU+RGo3Tdv78JpN n5Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=MH/9I2MQTh3fcvxBkamm73klmXjBHDEXnCISJzJyX8A=; b=cqWNzgcbOIqlgnIlTfhQRJm0CzsJVxd3PeG51hTwP2YdvJA7+/g55Ad4a8kMWzyZ6G SGxotarOzmpHW9Qi8v5BKH18ybJSnRH0BJNqkERiB2pmlogECc+S8fpwYWgR4q08jQDm xnYMwTKs8vqbwroK5UrbsXn+Kl1Sh4MhVyt9exRY/rOf2qo/cA0HWVSt7ZMnL7KOX+v7 sFOrtu+Hbd7CC+PHzTux9TnNbRXinMNIsWDAFDMrh+nNU/NRCL4gdeb/ITGRZV66Mi1k ZAmNDEGhc7+Daf6GxdFtuvBG1IQY0YH8MCKoXB5P5yL657SJ8ehLl7mRaB9CINdOsiLZ W2/g== ARC-Authentication-Results: i=1; mx.google.com; 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 n14si5702686pgv.520.2019.02.28.15.31.25; Thu, 28 Feb 2019 15:31:42 -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; 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 S1727935AbfB1XRA (ORCPT + 99 others); Thu, 28 Feb 2019 18:17:00 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:40394 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfB1XRA (ORCPT ); Thu, 28 Feb 2019 18:17:00 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 1DB1914C2136B; Thu, 28 Feb 2019 15:16:59 -0800 (PST) Date: Thu, 28 Feb 2019 15:16:56 -0800 (PST) Message-Id: <20190228.151656.907037082987778102.davem@davemloft.net> To: maxime.chevallier@bootlin.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, andrew@lunn.ch, f.fainelli@gmail.com, hkallweit1@gmail.com, vivien.didelot@gmail.com, linux-arm-kernel@lists.infradead.org, antoine.tenart@bootlin.com, 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 From: David Miller In-Reply-To: <20190228211433.14211-1-maxime.chevallier@bootlin.com> References: <20190228211433.14211-1-maxime.chevallier@bootlin.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 28 Feb 2019 15:16:59 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxime Chevallier Date: Thu, 28 Feb 2019 22:14:33 +0100 > 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 Applied and queued up for -stable.