From patchwork Sun Mar 9 10:46:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Abdul Rahim, Faizal" X-Patchwork-Id: 14008311 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE4B01CAA8E; Sun, 9 Mar 2025 10:47:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741517271; cv=none; b=PJ8dzcdU7DEmJcm1s6YNzA/EtFJlQDOuaz+o0IBHz57ItS3jqr0d0mWYPK0fuILUs9nxEGWF1l+eHtw6BYL77n4tFmsu+5BhT4QJOlYlO+GCZxX0LxWYh2N4sCYZs34gmHMNkLhKcJixfKqEdAKXkl4qUfW8OyYhYLwOzYHLhcg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741517271; c=relaxed/simple; bh=KHNKvaNQrW/TubLYiHi//7sCkHIl1zaGizz8x+M0qnE=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VmOWCajYp0jKSEkfp4MNm0CaXi7QaQU6yhr3HliSxQKWBF6jJ5euy22eRsST/hMAZ/aHO48J7jVKrnYEh238LTgadLB3+JKXYsw6biZmY5ZYRs/4uTd1P675oPApBfiFmvA8VJh9YqtczXX+i9++HksMecpX/lWpJb5fkbuTquI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FpRxdPqv; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FpRxdPqv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741517270; x=1773053270; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=KHNKvaNQrW/TubLYiHi//7sCkHIl1zaGizz8x+M0qnE=; b=FpRxdPqvfpb+84Qk1TXKRhT4EwpIIdKa5wzz9hOgU4rPakN92hyyxjnj g6U5DcZA8Yo+kfTSmZmyQa99mfxRl2sMVLqm0rpEtbmV162jCJlYGLiYZ cd7KYL9IE3A8gZwA5odPnGCgKEr9jS/ibIOWBFyK6xW5nG3ySNeco2hbl IT4gMCWSWMW4JwyNZHUVxyw4k3UiWmF28VGLhiFG7msqhHwslMcpVYUqM U+3MHZUkrYpFrJEA5M8sNguNAXpuX3qiIcjtrcNEvUvwsUBlIN9ScsSev OQh0tBg5Euw0nu+Gj1KcpzicthNiPD7I7iEXtCP2/vkKKJ97459r0cwI7 w==; X-CSE-ConnectionGUID: 8dfx1f+1SPGq2ZkQAc59Dw== X-CSE-MsgGUID: 0TCbQRiKSXuCqnmzKFvKfw== X-IronPort-AV: E=McAfee;i="6700,10204,11367"; a="42636010" X-IronPort-AV: E=Sophos;i="6.14,234,1736841600"; d="scan'208";a="42636010" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2025 03:47:50 -0700 X-CSE-ConnectionGUID: oAWasDTCRYy6m2gKBLdGLg== X-CSE-MsgGUID: 2WmdQr0JSvOXsjcC8pRwoA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,234,1736841600"; d="scan'208";a="124655041" Received: from mohdfai2-ilbpg12-1.png.intel.com ([10.88.227.73]) by orviesa003.jf.intel.com with ESMTP; 09 Mar 2025 03:47:42 -0700 From: Faizal Rahim To: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Simon Horman , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Furong Xu <0x1207@gmail.com>, Russell King , Vladimir Oltean , Serge Semin , Xiaolei Wang , Suraj Jaiswal , Kory Maincent , Gal Pressman , Jesper Nilsson , Choong Yong Liang , Chwee-Lin Choong , Faizal Rahim , Kunihiko Hayashi , Vinicius Costa Gomes , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org Subject: [PATCH iwl-next v9 03/14] net: ethtool: mm: reset verification status when link is down Date: Sun, 9 Mar 2025 06:46:37 -0400 Message-Id: <20250309104648.3895551-4-faizal.abdul.rahim@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250309104648.3895551-1-faizal.abdul.rahim@linux.intel.com> References: <20250309104648.3895551-1-faizal.abdul.rahim@linux.intel.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org When the link partner goes down, "ethtool --show-mm" still displays "Verification status: SUCCEEDED," reflecting a previous state that is no longer valid. Reset the verification status to ensure it reflects the current state. Signed-off-by: Faizal Rahim Reviewed-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Vladimir Oltean --- net/ethtool/mm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/ethtool/mm.c b/net/ethtool/mm.c index bfd988464d7d..ad9b40034003 100644 --- a/net/ethtool/mm.c +++ b/net/ethtool/mm.c @@ -415,6 +415,10 @@ void ethtool_mmsv_link_state_handle(struct ethtool_mmsv *mmsv, bool up) /* New link => maybe new partner => new verification process */ ethtool_mmsv_apply(mmsv); } else { + /* Reset the reported verification state while the link is down */ + if (mmsv->verify_enabled) + mmsv->status = ETHTOOL_MM_VERIFY_STATUS_INITIAL; + /* No link or pMAC not enabled */ ethtool_mmsv_configure_pmac(mmsv, false); ethtool_mmsv_configure_tx(mmsv, false);