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=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 EA904C43331 for ; Fri, 27 Mar 2020 20:02:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3F1E20714 for ; Fri, 27 Mar 2020 20:02:00 +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="L1O9hvBW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727444AbgC0UB7 (ORCPT ); Fri, 27 Mar 2020 16:01:59 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:34838 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726959AbgC0UB7 (ORCPT ); Fri, 27 Mar 2020 16:01:59 -0400 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=Bz7tLvQ0GaGe2Raw/XStvgG+NjAwALbU/q0v1eXL+wo=; b=L1O9hvBWOrlb9E75zbxB3l+TNB vzM7Y2L9HkOTwrOGWehaG3VQrYiCWw3cW8BYDG7Gu7nX0USjrwckrPtGayNqt6fytMDB4aV1O4gD+ DWQOFival1Xv0JKHN2GochowfttjL9hhsvT4elJKG+eqeOwYd9XqGs46G7PCymMgFeLE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jHvAv-0004pL-Ik; Fri, 27 Mar 2020 21:01:53 +0100 Date: Fri, 27 Mar 2020 21:01:53 +0100 From: Andrew Lunn To: Daniel Mack Cc: vivien.didelot@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, netdev@vger.kernel.org Subject: Re: [PATCH] net: dsa: mv88e6xxx: don't force settings on CPU port Message-ID: <20200327200153.GR3819@lunn.ch> References: <20200327195156.1728163-1-daniel@zonque.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200327195156.1728163-1-daniel@zonque.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Mar 27, 2020 at 08:51:56PM +0100, Daniel Mack wrote: > On hardware with a speed-reduced link to the CPU port, forcing the MAC > settings won't allow any packets to pass. The PHY will negotiate the > maximum possible speed, so let's allow the MAC to work with whatever > is available. Hi Daniel This will break board which rely on the CPU being forced to the maximum speed, which has been the default since forever. It sounds like you have the unusual situation of back to back PHYs? And i assume the SoC PHY is limited to Fast Ethernet? What i think you can do is have a phy-handle in the cpu node which points to the PHY. That should then cause the PHY to be driven as a normal PHY, and the result of auto neg passed to the MAC. Andrew > > Signed-off-by: Daniel Mack > --- > drivers/net/dsa/mv88e6xxx/chip.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c > index 2f993e673ec7..48808c4add4f 100644 > --- a/drivers/net/dsa/mv88e6xxx/chip.c > +++ b/drivers/net/dsa/mv88e6xxx/chip.c > @@ -2426,7 +2426,7 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port) > * state to any particular values on physical ports, but force the CPU > * port and all DSA ports to their maximum bandwidth and full duplex. > */ > - if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)) > + if (dsa_is_dsa_port(ds, port)) > err = mv88e6xxx_port_setup_mac(chip, port, LINK_FORCED_UP, > SPEED_MAX, DUPLEX_FULL, > PAUSE_OFF, > -- > 2.25.1 >