Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81A0CC4829B for ; Fri, 9 Feb 2024 21:27:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3E80D41BFE; Fri, 9 Feb 2024 21:27:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V-O5usV5SYoP; Fri, 9 Feb 2024 21:27:52 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A359141CE4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1707514072; bh=Wbpos21NRE1f2PH6SViUVxxXCuQ9wlciv90Ukg0MeMc=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=uU/hPEvPREbDWpsJJ8BD+8D7MVm9I0Y1KCgMhedCc1j2IuX28yP9zmWmUAiT3iG+A vxf1AlHTf5KFRheharEw/wIHmyj1VJy9PH/eK+vkvel4IeW4eSsIhDxSqJKZePgczw EQHn1JRK2ZrZjTSRNwodrSDE2J435Da0tdXGNiSny2DwR9mnpK6PT28JcPzHdKGFc+ OGeuMpS1Gvq6F0j4s6feRck0vilCaQUdl+lJbRpur6VBHmt7k5H6hDDMSlXDg5ZhNW kbN4+1pqX/M2xf2liwq3PX/aZYq7Umyjv7bj748vnE1uWd+UmgEjOA/ziCJXnJ2WAQ rZLUuQ2zMA12w== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id A359141CE4; Fri, 9 Feb 2024 21:27:52 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 709861BF3AE for ; Fri, 9 Feb 2024 21:27:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id EAA4E405AB for ; Fri, 9 Feb 2024 21:27:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DVuX1OUCVU3J for ; Fri, 9 Feb 2024 21:27:47 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.14; helo=mgamail.intel.com; envelope-from=arkadiusz.kubalewski@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org F096C400D0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org F096C400D0 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by smtp2.osuosl.org (Postfix) with ESMTPS id F096C400D0 for ; Fri, 9 Feb 2024 21:27:46 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6600,9927,10979"; a="5321574" X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="5321574" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 13:27:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="6681845" Received: from amlin-018-114.igk.intel.com ([10.102.18.114]) by orviesa003.jf.intel.com with ESMTP; 09 Feb 2024 13:27:45 -0800 From: Arkadiusz Kubalewski To: intel-wired-lan@lists.osuosl.org Date: Fri, 9 Feb 2024 22:24:32 +0100 Message-Id: <20240209212432.750653-4-arkadiusz.kubalewski@intel.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20240209212432.750653-1-arkadiusz.kubalewski@intel.com> References: <20240209212432.750653-1-arkadiusz.kubalewski@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707514067; x=1739050067; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z0WJ7E8spdtBnga4ZdfzNDjQ73HZCDLuO3Txp3ofkyc=; b=iX1PajOyMcnArJTyqYMMQcKCPQuUikpxVC/Xp+uce8gW8Mh5IJWJsdVb wh8B2VvnkhUlOTFp4+jUfGguUmIjqx453L8dK8JkjxdNjVVIYJnJIQqlK sIk9Hoze8RNXatTvulBeqqMPu2IyIvDnubyvuNBXOzM+3oif9JlaxMUBb BzXksbG7XKuMxCXi7w2+PDyw8f2d6vXOMweeUOAxJegkYyeesX3o30GXs BVVCoQG2431jMsREnxZmv2X0rgqmDmwTwQmS9DzpALBR+tZLirb6oYp2S sUXoow1sBrv1f9VxcQ1/YOuYl8f7o1farcscYbvOZPXDscJT/ZnkgYHqA Q==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=iX1PajOy Subject: [Intel-wired-lan] [PATCH iwl-net v2 3/3] ice: fix pin phase adjust updates on PF reset X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Bagnucki , Arkadiusz Kubalewski Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Do not allow to set phase adjust value for a pin if PF reset is in progress, this would cause confusing netlink extack errors as the firmware cannot process the request properly during the reset time. Return (-EBUSY) and report extack error for the user who tries configure pin phase adjust during the reset time. Test by looping execution of below steps until netlink error appears: - perform PF reset $ echo 1 > /sys/class/net//device/reset - change pin phase adjust value: $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/dpll.yaml \ --do pin-set --json '{"id":0, "phase-adjust":1000}' Fixes: 90e1c90750d7 ("ice: dpll: implement phase related callbacks") Reviewed-by: Igor Bagnucki Signed-off-by: Arkadiusz Kubalewski --- drivers/net/ethernet/intel/ice/ice_dpll.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c index 544cfedf6c55..63aeaeb4308b 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.c +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c @@ -963,6 +963,9 @@ ice_dpll_pin_phase_adjust_set(const struct dpll_pin *pin, void *pin_priv, u8 flag, flags_en = 0; int ret; + if (ice_dpll_is_reset(pf, extack)) + return -EBUSY; + mutex_lock(&pf->dplls.lock); switch (type) { case ICE_DPLL_PIN_TYPE_INPUT: -- 2.38.1