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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 0037FC282C0 for ; Wed, 23 Jan 2019 07:16:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B21F721019 for ; Wed, 23 Jan 2019 07:16:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=vincit.fi header.i=@vincit.fi header.b="Z+yJ9CoV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726886AbfAWHQZ (ORCPT ); Wed, 23 Jan 2019 02:16:25 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:39673 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbfAWHQZ (ORCPT ); Wed, 23 Jan 2019 02:16:25 -0500 Received: by mail-lf1-f66.google.com with SMTP id n18so798069lfh.6 for ; Tue, 22 Jan 2019 23:16:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vincit.fi; s=ticniv; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YhD9ljb/HgQudN+CwZsYY0zglBMBzJpg4rQSS+YusB4=; b=Z+yJ9CoV7BE0v2ghqTDfNuCFEvPE793d75jIAtmY0d8bqoXqTtaB8vmgy7Xv7JA4RH fzi++0XPZ2lhTQY1OzIkbkvF1SsK2RQRoJ1eFOgqY7aHl0PyJ4C49i70FYKTR+FvOb2A Vpdyt8niFFE3ncTVlfYOmjzqKLPultLx1pb8M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YhD9ljb/HgQudN+CwZsYY0zglBMBzJpg4rQSS+YusB4=; b=S3WlyIg8XhDC5fwIOOovLxXSYkJP2Er++Sa2ECCfkCtGIB5oeVtLi4XsqN0TotRAfy cACZjDvfH0K7SJuiQVv1ff4OaMHCSHT9EIkmwIa9pE/UF1LsiEfb90V7HERRIwOjR493 O3fcpr8aUDp84cp/raC8/igkO6NdGc20bUiUfU3e2JRr3oH3FM8cszEYatVKOYHVlvw+ bm1vmc83neG9RRN4Pwjoi/W0V2KGX/gY7byxHy+icCAdeENFtXrM1X0HLUuAuYfJv/YM eVpf1oWRfMiku3eXbasu46J2l1zD0EaKdDAFAcT7Bn3MYIug6/MGJ40VT9X7ohS6vJDY sE6w== X-Gm-Message-State: AJcUukcNQOC/Ksy4v+RAEJr0WJAMvU5CuFVOuDynVwZyLdoTJmr4us+X 9ciS2M/Akt+2DlF9NCPH47w2TA== X-Google-Smtp-Source: ALg8bN5YcagVc8gDDXs7Mw2kFgZmsK3OxZ5uvPVgKfKSek0sg4zOMrqpeywG8jim3DDwss+i39MYLQ== X-Received: by 2002:a19:db54:: with SMTP id s81mr932579lfg.102.1548227782968; Tue, 22 Jan 2019 23:16:22 -0800 (PST) Received: from samu-ThinkPad-T480s (gw.vincit.cloud. [195.60.252.249]) by smtp.gmail.com with ESMTPSA id b17-v6sm352466ljj.93.2019.01.22.23.16.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Jan 2019 23:16:22 -0800 (PST) Date: Wed, 23 Jan 2019 09:16:20 +0200 From: Samu Nuutamo To: Andrew Lunn Cc: netdev@vger.kernel.org, Vivien Didelot , Florian Fainelli , "David S. Miller" Subject: Re: Regression: mv88e6xxx packet loss after 4.18's PHYLINK merge Message-ID: <20190123071620.GA21538@samu-ThinkPad-T480s> References: <20190114113444.GB16632@samu-ThinkPad-T480s> <20190117022935.GJ24870@lunn.ch> <20190117113722.GA22476@samu-ThinkPad-T480s> <20190123021032.GG3634@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190123021032.GG3634@lunn.ch> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Jan 23, 2019 at 03:10:32AM +0100, Andrew Lunn wrote: > > Hi Andrew, > > > > I tested the patch and it has an issue that prevents the carrier from turning > > on. I think it's caused by the change from using link_state to phy->phy_state, > > as later in the same function the link_state attributes are read when > > deciding if the carrier needs to be turned on. > > Hi Samu > > This version has had better testing. So i'm a bit more confident about > it. > > Andrew > > From d093492f9aba75cb4844d15148e0efd014f193bb Mon Sep 17 00:00:00 2001 > From: Andrew Lunn > Date: Wed, 16 Jan 2019 20:22:04 -0600 > Subject: [PATCH] net: phy: phylink: Only change mac when fixed link changes > state > > phylink polls the fixed-link once per second to see if the GPIO has > changed state, or if the callback indicates if there has been a change > in state. It then calls the MAC to reconfigure itself to the current > state. > > For some MACs, reconfiguration can result in packets being dropped. > Hence only reconfigure the MAC if the link state differs from the > netdev carrier state. > > Reported-by: Samu Nuutamo > Fixes: 9cd00a8aa42e ("net: phy: phylink: Poll link GPIOs") > Signed-off-by: Andrew Lunn > --- > drivers/net/phy/phylink.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c > index e7becc7379d7..394b1eb5b55a 100644 > --- a/drivers/net/phy/phylink.c > +++ b/drivers/net/phy/phylink.c > @@ -409,7 +409,8 @@ static void phylink_resolve(struct work_struct *w) > > case MLO_AN_FIXED: > phylink_get_fixed_state(pl, &link_state); > - phylink_mac_config(pl, &link_state); > + if (link_state.link != netif_carrier_ok(ndev)) > + phylink_mac_config(pl, &link_state); > break; > > case MLO_AN_INBAND: > -- > 2.20.1 > Hi Andrew, I did a quick test and this latest patch seems to work. Thank you. - Samu