From patchwork Tue Aug 22 12:40:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karol Kolacinski X-Patchwork-Id: 1824168 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=syn0S2I6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RVTVD42xxz1yNm for ; Tue, 22 Aug 2023 22:41:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 453DF6066D; Tue, 22 Aug 2023 12:41:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 453DF6066D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1692708066; bh=rmuNoHvA/Byt3Vus8EKmt3Q/Rb6j1dR7mmWBfgJDrJ4=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=syn0S2I63K7x5HjzCQ6ztcJHgrd04fBPawhwDh8vRBh8ZD8tQfxGvSWav+e6xLPIF bq3rxYyCh7UfIfLrIs1nkpeZJMQGkZXD4PpQuJfvFhvm8bVnaDmij0Wwppg7rXS6k6 PrtjOFDo5GQjtIYIJiwktj212UEmIQZ0hIVWPtEbjJkqOgCuMvFzh4jOXjhR5743oz Bm3aX4Y7YRyHdk12tvwu7l/Uw7sw3S51zFj3BYTmtfY4vhMLFwgCBIaO8DYUkPtYky v/2iA9oJ+10nfmUTugz8ynjtPVzZ3ZVNKNIq++MDd+qh1O3jZb1QQsJctMgIlW1Ftr TeE8KcY10D9Eg== 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 Ccmn50yaYXSC; Tue, 22 Aug 2023 12:41:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 3547B611A1; Tue, 22 Aug 2023 12:41:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3547B611A1 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 934621BF296 for ; Tue, 22 Aug 2023 12:41:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6C6A96066D for ; Tue, 22 Aug 2023 12:41:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6C6A96066D 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 g64mLzn5FF0u for ; Tue, 22 Aug 2023 12:41:01 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by smtp3.osuosl.org (Postfix) with ESMTPS id 52AB5607B0 for ; Tue, 22 Aug 2023 12:41:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 52AB5607B0 X-IronPort-AV: E=McAfee;i="6600,9927,10809"; a="376604600" X-IronPort-AV: E=Sophos;i="6.01,193,1684825200"; d="scan'208";a="376604600" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2023 05:41:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10809"; a="771342890" X-IronPort-AV: E=Sophos;i="6.01,193,1684825200"; d="scan'208";a="771342890" Received: from kkolacin-desk1.igk.intel.com ([10.102.102.152]) by orsmga001.jf.intel.com with ESMTP; 22 Aug 2023 05:40:57 -0700 From: Karol Kolacinski To: intel-wired-lan@lists.osuosl.org Date: Tue, 22 Aug 2023 14:40:36 +0200 Message-Id: <20230822124044.301654-2-karol.kolacinski@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230822124044.301654-1-karol.kolacinski@intel.com> References: <20230822124044.301654-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=1692708061; x=1724244061; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1Ufi43P3zynjx+wDKj2BMVqEurv8P54xkkFZtVzZheQ=; b=UfVx0axwCglka3rYZUhFwrH5bsLUisycjAyqy50fSRB0VDwyZC7BCtJT g72t5T9Nz6MTYHyrbWe1O4F2FbSeHejEndzh0iUkjpKrMpKMrcIk6txBf C/qNB7fMgzRHTbx9raiIPTiVFIkFDndVw5R/MTeHm8ILPvy/I2iAGcW/b Xb0jxqB6rtI+jBZ0xK6B58x9UxxsnF6QdFun81XMHrbFo309gFoSZcHH/ F8r3g6kUu/7xUgM2QbLU1jbiEbOiX6x3vbjckAi9b42MaesvqohetaY3p STJ1EgkwDEfw3oZT0r3KPJP0KrqLg62nkBABQnI/oP4l+cGqy3tKqitOd Q==; X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=UfVx0axw Subject: [Intel-wired-lan] [PATCH v3 iwl-next 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: netdev@vger.kernel.org, Karol Kolacinski , anthony.l.nguyen@intel.com, jesse.brandeburg@intel.com Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Jacob Keller 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 Signed-off-by: Karol Kolacinski --- 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 cc1f65781913..0d369e5e7441 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -3159,7 +3159,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 ca40ca220cc9..2e3f0aaacddd 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp.c +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c @@ -2449,7 +2449,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);