Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17923668ybl; Thu, 2 Jan 2020 14:54:37 -0800 (PST) X-Google-Smtp-Source: APXvYqxD+H4zO59o0/aMyJbX0kJE2PYqU7TaS/AN2kR+cWEitzjn88VfD8sYcbAtcGMbLEz0g3MP X-Received: by 2002:a9d:750b:: with SMTP id r11mr91084596otk.209.1578005677594; Thu, 02 Jan 2020 14:54:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578005677; cv=none; d=google.com; s=arc-20160816; b=rsQMK5oEKxbqkyIZI7IiBwDEQnKfFmqaO4wYmZ8wsUrxHFVr5FggOXBL18FWtHS/DC DSVKoN/VmuISNV7WQAhrXAfanwFAaCqOhX6D67GR0swQIcDgMSVl5djWf/mujMlUGpvi mYOD7ui97uMOAONX/IpO4uJiCiDvOgRiMvt2qR5OwLBkwSVVYluIg8ofaCtL46q+OGbN NfmlvYMFRxiWWOrfJXfefT4BUpqtIfLXFCyznRTIgbqvmvdG0sIgo7W5ThcM1dFJuBpk CCLgVkHK+iD8j9U4e0LZJM+yfiZ6rx+lkr/Yxc1gy4AxuVWb8ZVSiDA6fpMAGrZJmetu IVZQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BJJgZMWAAPsj0pScx4rd9Grz1BlgovubPR+p0/W1lJg=; b=oQ9T5QJ7RlOzGJer2mL1QajHvXOu5jDzJBycrxpMYE7/8j2ZdLsIxd8UETtANfrCtx mRj1yXq0VuISzwiQIaviaK6xWvOWDJU6NuDH7bPBOTOrIMAc7uzsN0iZ6+yK0gQscAIw 0Mxh9gVSZ7gClGrdj3Onbx88G/EqhAYnXRi4pDa2reDAzdP7gCu0wJGrw0sPsF21MpvH Dqya2DAJlBEv5afyGZlTLfjHU9sSm/tqEyr7WpFJ6c7AbyhCcupeMx4+jSGY6Yndq/vt YlOx8AQiqSACG5X0hcDYlgRKKMh6dkCdgZBplx4D8F12Xra3W/Xv9EPwLxfuBDljkvRl 7nFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=onMwDCbM; 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 n9si28216666ota.103.2020.01.02.14.54.26; Thu, 02 Jan 2020 14:54:37 -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; dkim=pass header.i=@kernel.org header.s=default header.b=onMwDCbM; 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 S1728918AbgABWwR (ORCPT + 99 others); Thu, 2 Jan 2020 17:52:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:45016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727944AbgABWXP (ORCPT ); Thu, 2 Jan 2020 17:23:15 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EBA3220863; Thu, 2 Jan 2020 22:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003795; bh=Q44C4gQ8BTkRax/mfAigimfuYjNy/Gv3YYDqor7x0Mk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=onMwDCbMbf2jykKjDzfFqtz+ew3/do30DRr5nwotVqNAGPjr7+S3RBzq+LaUPcgJx ML9PGc6el1Em0H8J0SRe3A6js/eVBxunbW5Ul71pFMWjU5V0zW63WD1b8InqtJ+sgL Z8VKAW/LsxlBbvQxQnWbKJNz15RKhEJJCmEViORM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sven Auhagen , Antoine Tenart , Russell King , Jakub Kicinski Subject: [PATCH 4.19 106/114] net: marvell: mvpp2: phylink requires the link interrupt Date: Thu, 2 Jan 2020 23:07:58 +0100 Message-Id: <20200102220039.850727167@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Russell King [ Upstream commit f3f2364ea14d1cf6bf966542f31eadcf178f1577 ] 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. Fixes: 4bb043262878 ("net: mvpp2: phylink support") Tested-by: Sven Auhagen Tested-by: Antoine Tenart Signed-off-by: Russell King Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -3341,7 +3341,7 @@ static int mvpp2_open(struct net_device 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) {