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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 302C3C2D0DA for ; Fri, 27 Dec 2019 17:47:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B07F21D7E for ; Fri, 27 Dec 2019 17:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577468877; bh=ety4WDIxk5+X0Oj4j0bFqKYDCMGBAPXqd2/ikjwPEyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nQ2fgrept3CNQLg7f8A1mujY69FSfh6wHjRuuTy61bJDAYfOjEuIBen4iisvCbS/Q 5ikhAwwahm34LnYgOfm39l5JpV9Ln19a5G90+3QpCg1Rjgdl5n0IJjV2JYxUbMSClJ blmyDg7f4zYfnMLKSuHI1kV1QZw8blSokBj6pthc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728236AbfL0Row (ORCPT ); Fri, 27 Dec 2019 12:44:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:43226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728573AbfL0Rov (ORCPT ); Fri, 27 Dec 2019 12:44:51 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 64B2821582; Fri, 27 Dec 2019 17:44:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577468691; bh=ety4WDIxk5+X0Oj4j0bFqKYDCMGBAPXqd2/ikjwPEyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PCyfsSsEl9ttf3SiskS9iscKQ9upY/TaypTpu6MLWw73COE28wKDmeqEiw8eJODC8 brxQTgYzPjZ3VUjlTe54rM4hmWJWwOedn7YWB3x24fNgbIcIWM8VCDTRvcuWOn8tvv PEN7mNZn9yS1bQ2T6nnGB4O2hlBi7wE7p/O1x7MI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Russell King , Sven Auhagen , Antoine Tenart , Jakub Kicinski , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 48/84] net: marvell: mvpp2: phylink requires the link interrupt Date: Fri, 27 Dec 2019 12:43:16 -0500 Message-Id: <20191227174352.6264-48-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191227174352.6264-1-sashal@kernel.org> References: <20191227174352.6264-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: Sasha Levin --- 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 a50977ce4076..04bee450eb3d 100644 --- 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 *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.20.1