Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2113224ioo; Mon, 23 May 2022 10:19:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/9TzA/HPLuXntbHj8cSqsrhnKg8KK3dDvXG0dsGouyGEt0lveOsgz1Vx1uE2qRdiO0din X-Received: by 2002:a63:87c3:0:b0:3fa:27bf:4491 with SMTP id i186-20020a6387c3000000b003fa27bf4491mr7731476pge.51.1653326397340; Mon, 23 May 2022 10:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653326397; cv=none; d=google.com; s=arc-20160816; b=Ct1dqKTVx5NWUSR753bY6mDVSDRvJ2f3zyvyGee+1NzuSasx5BNpheUIkTglwxd5T1 oh0nJ9kWYKmjgEDL4N+p1jAoDvVYl80BxpGt8vI1tI+xnjYJGBONCxEiBWHuJDj7AkLb 4sYOEHoQj5f5BJqWkpqh14ca5nEJUR93RBiR4YMHgcU4bm/S71UaFigAekvPIpKYUCrA ot1/dnS1ZqIdf0XbY29BO3G+V5HZyd47e84jOWPBwGUbc5lBlQcCqbfdL2fgioq1vdDE pMQlJ09ViQ9MRNPafIxfWEt1tcfFrc/V57ynU5bnGt6z2Kijbla+X70n0aycdI0uO1xa QwNw== 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=A1sD8UUABl5KEgCeWfqVfBwzj8y2dsX15pfAGHDvpWo=; b=vRNo+fpIrABfGN7H8JWmNFF9c+1lwT6C93RgqPlu4TuAvjZi4wZ4T9yhspBPMgrM+u yxo6PdHS0eXdIPULayiviho2qvqbqYkJghkII8S62YnjOF2E2NUZ4wEYgrZKkUSRYxJY Wgn1LbMumj9HRcI24/eAKeNMnpS9mq0wzGsJ8k/MJFvf3FQ7LOsPvO9w5tMzh9SqNYv0 sf8bYOCxtglNQ7ozMFQeMHXw0OKLu6WXTeAi1P3MeAMAExSyAYqLr3AuvWABIymZf/mP vzBr4DnD+hHEzV8UiJnqoZi1U1C/poL9npmsnW8q+k269pe8gxwTrCkw/6GQyBya0Fdp GhcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oZJcED8C; 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 k6-20020a635606000000b003ab05fe79c1si10990953pgb.120.2022.05.23.10.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:19:57 -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=oZJcED8C; 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 3823B7CB4B; Mon, 23 May 2022 10:19:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240945AbiEWRQu (ORCPT + 99 others); Mon, 23 May 2022 13:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239648AbiEWRMp (ORCPT ); Mon, 23 May 2022 13:12:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32E0B272E; Mon, 23 May 2022 10:12:11 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 53061614CC; Mon, 23 May 2022 17:10:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2457EC385A9; Mon, 23 May 2022 17:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653325857; bh=c2J9K9q2xyq4Xkqbz8Lpttk8SET/7QMV7XK+oCuL9RM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oZJcED8C1uRRHZ97cFPQLHjSXjAilANw8KvGDbuaGcVpmxKS+8AUl4/95YzhFd5WR giY6LYcQdECyrEtVuXEST1dzxKiZvOesmE0MTRcYmTqYwF+VUIsZMIsAxnZbTvxPFf iYJqyyhOq7JlhP17haAPtSaIReOJZNO8vZ8JPG2o= 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.19 32/44] igb: skip phy status check where unavailable Date: Mon, 23 May 2022 19:05:16 +0200 Message-Id: <20220523165758.984966602@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165752.797318097@linuxfoundation.org> References: <20220523165752.797318097@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 74b50f17832d..a93edd31011f 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -5346,7 +5346,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