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 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 DD5D3EB64DD for ; Mon, 7 Aug 2023 10:37:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 86BF360DDF; Mon, 7 Aug 2023 10:37:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 86BF360DDF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1691404650; bh=w70PrEgkjNJOzWbzLwXTc6+wxmvQlGL9k2Esq3gmPh0=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=NY8zQCrrYtNOtCEwsawyFJbX9eN+LLsFIVE5R+IkO9OLfAqDvpORkLzHak3qIz6Hi c26tECx5yBfMwmVWTpEWm4eY8in2PVHh6I6wUx+bTNIIKDx0MuefXni0Cpyw4SDbam wmGh3yjdjZOTFyblOU/CWe/9wdl/TJOj5U6lhtoJgSPIUYNL2FJwmNUNiyzvnPH3fz RjjSag27eP4zHEe06JLHQ045yAtDMIt8HvN0G2oBZ/mqZwVpSS0BwLscksw6P5ytog oAzCzMsr4m9FHTjWxT+s0DqAJIukUxmmRe5g3ACc/pBKIYno+ENymsTxkYtEk4l89N GOolEFDT9pniQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LlRBoRQ_-RAf; Mon, 7 Aug 2023 10:37:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 6FB5260E72; Mon, 7 Aug 2023 10:37:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6FB5260E72 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 58B0F1BF3FB for ; Mon, 7 Aug 2023 10:37:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2130F401E8 for ; Mon, 7 Aug 2023 10:36:31 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2130F401E8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vQHjmvfjwPGX for ; Mon, 7 Aug 2023 10:36:30 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by smtp4.osuosl.org (Postfix) with ESMTPS id 56BD24097D for ; Mon, 7 Aug 2023 10:36:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 56BD24097D X-IronPort-AV: E=McAfee;i="6600,9927,10794"; a="401482293" X-IronPort-AV: E=Sophos;i="6.01,261,1684825200"; d="scan'208";a="401482293" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2023 03:36:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="874262824" Received: from kkolacin-desk1.igk.intel.com ([10.102.102.152]) by fmsmga001.fm.intel.com with ESMTP; 07 Aug 2023 03:36:31 -0700 From: Karol Kolacinski To: intel-wired-lan@lists.osuosl.org Date: Mon, 7 Aug 2023 12:36:16 +0200 Message-Id: <20230807103624.468230-2-karol.kolacinski@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230807103624.468230-1-karol.kolacinski@intel.com> References: <20230807103624.468230-1-karol.kolacinski@intel.com> MIME-Version: 1.0 Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 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=1691404590; x=1722940590; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+N/NYyKLaBrqdFtZrod8v3vp1Q2w7ffUiAfuIQTLYVs=; b=hXpmLuTNyozj9H++6aupDW2sRHNrpZe+x/TYsME87sxEyyz8yt2nuqsd SXC0kpKIjfv7vNWkswNBz0oP+0MWnz0svES9pRD1U17n2JuCPDiyXBibO +v23hB/ys0Xqly4vtkiPOk7KKqHCAcH9WcvS3jN/MFAlpRbsweT9FXx+p /ZP1xlv+uKU7gwtxcIlob83NGwpQyiDw8vQ7T/nzy6SKqFbU44FxWSZ6w i/oq/p1VZYm3P2XrVc873y4Okv6C/W2nQxRE8VaZ8sz+IyTFKtHXfhQ+j 0hK43lpZhwe/1PGuHsQdqDEQzFfCfVhwMTSdAQmrH+g8uWaV4yz4v4Hsg A==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hXpmLuTN Subject: [Intel-wired-lan] [PATCH 1/9] ice: use ice_pf_src_tmr_owned where available 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: Karol Kolacinski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" The ice_pf_src_tmr_owned() macro exists to check the function capability bit indicating if the current function owns the PTP hardware clock. This is slightly shorter than the more verbose access via hw.func_caps.ts_func_info.src_tmr_owned. Be consistent and use this where possible rather than open coding its equivalent. Signed-off-by: Jacob Keller --- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- drivers/net/ethernet/intel/ice/ice_ptp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index a73895483e6c..1ac37a3f8de5 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -3158,7 +3158,7 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data) ena_mask &= ~PFINT_OICR_TSYN_EVNT_M; - if (hw->func_caps.ts_func_info.src_tmr_owned) { + if (ice_pf_src_tmr_owned(pf)) { /* Save EVENTs from GLTSYN register */ pf->ptp.ext_ts_irq |= gltsyn_stat & (GLTSYN_STAT_EVENT0_M | diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c index 97b8581ae931..0669ca905c46 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp.c +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c @@ -2447,7 +2447,7 @@ void ice_ptp_reset(struct ice_pf *pf) if (test_bit(ICE_PFR_REQ, pf->state)) goto pfr; - if (!hw->func_caps.ts_func_info.src_tmr_owned) + if (!ice_pf_src_tmr_owned(pf)) goto reset_ts; err = ice_ptp_init_phc(hw); -- 2.39.2 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan