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.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, 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 1FAC8C43381 for ; Fri, 1 Mar 2019 11:13:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA5D92084F for ; Fri, 1 Mar 2019 11:13:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732503AbfCALNs (ORCPT ); Fri, 1 Mar 2019 06:13:48 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:48841 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727932AbfCALNs (ORCPT ); Fri, 1 Mar 2019 06:13:48 -0500 X-Originating-IP: 90.88.147.150 Received: from localhost (aaubervilliers-681-1-27-150.w90-88.abo.wanadoo.fr [90.88.147.150]) (Authenticated sender: antoine.tenart@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 7F52340007; Fri, 1 Mar 2019 11:13:45 +0000 (UTC) Date: Fri, 1 Mar 2019 12:13:44 +0100 From: Antoine Tenart To: Russell King Cc: Antoine Tenart , Maxime Chevallier , Baruch Siach , Sven Auhagen , "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH RFC] net: marvell: mvpp2: phylink requires the link interrupt Message-ID: <20190301111344.GB3554@kwain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Russell, I've been using this patch on my local branch for the past 3 weeks, and I saw no obvious issue so far. (I also used a similar patch before). Do you have pending questions regarding this patch? Otherwise I think you can sent it again without the RFC tag, with my Tested-by and/or Acked-by tags if you want. Thanks! Antoine On Fri, Feb 08, 2019 at 03:39:10PM +0000, Russell King wrote: > phylink requires the MAC to report when its link status changes when > operating in inband modes. Failure to report link status changes > means that phylink has no idea when the link events happen, which > results in either the network interface's carrier remaining up or > remaining permanently down. > > For example, with a fiber module, if the interface is brought up and > link is initially established, taking the link down at the far end > will cut the optical power. The SFP module's LOS asserts, we > deactivate the link, and the network interface reports no carrier. > > When the far end is brought back up, the SFP module's LOS deasserts, > but the MAC may be slower to establish link. If this happens (which > in my tests is a certainty) then phylink never hears that the MAC > has established link with the far end, and the network interface is > stuck reporting no carrier. This means the interface is > non-functional. > > Avoiding the link interrupt when we have phylink is basically not > an option, so remove the !port->phylink from the test. > > Tested-by: Sven Auhagen > Signed-off-by: Russell King > --- > This is the final patch that I mentioned in the cover letter > "[PATCH net-next 0/5] mvpp2 phylink fixes" > > drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > index 93fed4080dbf..0b164b424dca 100644 > --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > @@ -3412,7 +3412,7 @@ static int mvpp2_open(struct net_device *dev) > valid = true; > } > > - if (priv->hw_version == MVPP22 && port->link_irq && !port->phylink) { > + if (priv->hw_version == MVPP22 && port->link_irq) { > err = request_irq(port->link_irq, mvpp2_link_status_isr, 0, > dev->name, port); > if (err) { > -- > 2.7.4 > -- Antoine Ténart, Bootlin Embedded Linux and Kernel engineering https://bootlin.com