From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A120C282C3 for ; Thu, 24 Jan 2019 16:11:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B44B217D7 for ; Thu, 24 Jan 2019 16:11:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="IUhA8oMm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728406AbfAXQLv (ORCPT ); Thu, 24 Jan 2019 11:11:51 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:54254 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727649AbfAXQLv (ORCPT ); Thu, 24 Jan 2019 11:11:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: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=aUgXphbPkw1WQcmlj1e5+El6A7Vp5VmOfkWU6YlneNA=; b=IUhA8oMmu1Q0n6GMBDKT+6jkB6 awNbbAUczschZ34QwAjahZLEsMapITUbiBwRucxpOqkVFh5VN2qYNR+8hvpgXEOiCOhT1RCMIWXK4 F225MqOHDL3xZ3jeqzdePTnx62DMG6kXPnnQH59W27hn5a3yb0KFQfB+23AwBMRb2S68=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1gmhbX-0001ge-VR; Thu, 24 Jan 2019 17:11:47 +0100 Date: Thu, 24 Jan 2019 17:11:47 +0100 From: Andrew Lunn To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: netdev@vger.kernel.org, Florian Fainelli , David Miller Subject: Re: [PATCH net-next v1 1/2] net: dsa: mv88e6xxx: Default CMODE to 1000BaseX only on 6390X Message-ID: <20190124161147.GG482@lunn.ch> References: <20190124154309.24987-1-marek.behun@nic.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190124154309.24987-1-marek.behun@nic.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jan 24, 2019 at 04:43:08PM +0100, Marek Behún wrote: > Commit 787799a9d555 sets the SERDES interfaces of 6390 and 6390X to > 1000BaseX, but this is only needed on 6390X, since there are SERDES > interfaces which can be used on lower ports on 6390. > > This commit fixes this by returning to previous behaviour on 6390. > (Previous behaviour means that CMODE is not set at all if requested mode > is NA). > > This is needed on Turris MOX, where the 88e6190 is connected to CPU in > 2500BaseX mode. > > Fixes: 787799a9d555 ("net: dsa: mv88e6xxx: Default ports 9/10 6390X CMODE to 1000BaseX") > Signed-off-by: Marek Behún > --- > drivers/net/dsa/mv88e6xxx/port.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c > index ebd26b6a93e6..ee7029f4ee22 100644 > --- a/drivers/net/dsa/mv88e6xxx/port.c > +++ b/drivers/net/dsa/mv88e6xxx/port.c > @@ -444,6 +444,8 @@ int mv88e6390_port_set_cmode(struct mv88e6xxx_chip *chip, int port, > phy_interface_t mode) > { > switch (mode) { > + case PHY_INTERFACE_MODE_NA: > + return 0; Hi Marek Although the previous behaviour might of allowed the cmode to be NA, i'm not sure that is a good idea. How do you know the port actually is using 2500BaseX, and not SGMII for example? You really should set the interface mode in the device tree file, so you know it does have the value you want. Andrew