Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2108590ioo; Mon, 23 May 2022 10:13:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCmjAeyl+kPMfcQgDuqG5boMsJl3w/LNpUaaDROqyd0VuwW6i/nOsQwUSOmsVP/UhzQW/X X-Received: by 2002:a17:902:e5cb:b0:161:872d:6ed3 with SMTP id u11-20020a170902e5cb00b00161872d6ed3mr23989650plf.62.1653326036626; Mon, 23 May 2022 10:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653326036; cv=none; d=google.com; s=arc-20160816; b=UU7W3QcuBxpKGyAe6K2DXlYAZ0Y9UOCxdk1Y3Xi/0vLSN4EGL4BIZD22bbkPtibJvq FwcLZtyNFWyD3X5yjfavV76ir92TDAfvnqq3VlsNyWx1x+Aq2GYAizCLnXc+Pg3y5VO6 CZtIeQc2KK+PYntWpKdWzD/Co0hRmPyX0islwdPaORHjT22lUXaWkaC/fqBdbtzjAqV5 KRSEQ+O1r0rn3OShoLTS9yl3Ixp251sdwtDaYvdH+M/aVvNLIbhSGfrFzGTsKK8TNuf1 5H97s+QdKBFG8OuDJRN1nUbppFVFKZ/aHE365r46GN3kqstAYZdjucPkkVbkmJJCD++N msKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=c5a/+5nrf9sbBGoDhEx74gSkQfd2FsFNTe2cqh/t5Mw=; b=kARpIvffls2Le++VcoaJxatokIDEjajQrl+HDK11ivnXphGsLTPtRSonuVUEdLc7Eu hkkx75yhRGYuAvYl6pqkgIzn5oYS1r+HN2GdII/XmI3WtGzfTYKJJNqfstITsJyyLmHh ujErYnM25XHXIsRE4PiFjIX7Fwy+phDwh4t0ihOel4FntvDg+Hp3N4SXEJFsX2nl0HeN XygVBWuFelqBSifZCxLO7SYz/upcOsnrR4H3EmZIIeyQ0Zr4DhbLhGejZNtKPCqj37Yo t4+p7+TyEl6PtCdpo9yJCtzdeDrA5pHdmOC2HIIB+xRA+BIqmx6ejAOYhcyf4XXk9NOQ Ev6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oG+oSVsd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v18-20020a056a00149200b0050d56648bf0si14856476pfu.66.2022.05.23.10.13.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:13:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oG+oSVsd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 161FF6EB0A; Mon, 23 May 2022 10:13:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239689AbiEWRJo (ORCPT + 99 others); Mon, 23 May 2022 13:09:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239690AbiEWRJR (ORCPT ); Mon, 23 May 2022 13:09:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F03206BFD5; Mon, 23 May 2022 10:08:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4AECEB81202; Mon, 23 May 2022 17:08:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F6C8C385A9; Mon, 23 May 2022 17:08:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653325721; bh=0RExpm7wblGpAeSEAdGi/ol9O+UYZDtxWBrAUD8XZiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oG+oSVsdlb6tJDnNWTz8qwoDNjQb927lHbOv31hUMGWJBjocwG/AwKlccbPIMA9hy Q7r5tChk94ysasLtCL+7wRu4oAJXFnzDBUFwDEnAGW7N01ZrKtL72tysYzxmi/HKLR mv3nhi4JguD+sD1bo07KE0M1AItUoYVh1zBfC93M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kevin Mitchell , Tony Nguyen , "David S. Miller" , Sasha Levin , Gurucharan Subject: [PATCH 4.14 22/33] igb: skip phy status check where unavailable Date: Mon, 23 May 2022 19:05:11 +0200 Message-Id: <20220523165751.788904127@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165746.957506211@linuxfoundation.org> References: <20220523165746.957506211@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kevin Mitchell [ Upstream commit 942d2ad5d2e0df758a645ddfadffde2795322728 ] igb_read_phy_reg() will silently return, leaving phy_data untouched, if hw->ops.read_reg isn't set. Depending on the uninitialized value of phy_data, this led to the phy status check either succeeding immediately or looping continuously for 2 seconds before emitting a noisy err-level timeout. This message went out to the console even though there was no actual problem. Instead, first check if there is read_reg function pointer. If not, proceed without trying to check the phy status register. Fixes: b72f3f72005d ("igb: When GbE link up, wait for Remote receiver status condition") Signed-off-by: Kevin Mitchell Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/igb/igb_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 6bd30d51dafc..618063d21f96 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -4622,7 +4622,8 @@ static void igb_watchdog_task(struct work_struct *work) break; } - if (adapter->link_speed != SPEED_1000) + if (adapter->link_speed != SPEED_1000 || + !hw->phy.ops.read_reg) goto no_wait; /* wait for Remote receiver status OK */ -- 2.35.1