From patchwork Mon Jul 15 10:48:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Temerkhanov X-Patchwork-Id: 1960591 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=Xkugd255; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (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 4WMzW837jsz1xqc for ; Mon, 15 Jul 2024 20:50:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id DDD4540571; Mon, 15 Jul 2024 10:50:26 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 3fp2oFAVJwDr; Mon, 15 Jul 2024 10:50:26 +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 smtp4.osuosl.org 0A64A40442 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1721040626; bh=oiBjniRJ1/LtKPOsn5s9dNfPXYzaF67nNwmCG70/qGg=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=Xkugd255d60anYEbw9uhhAD+YYcq7tyz0aG7Xldx2zol3XmIExhZ24ss0chUG666I LPbrxaaLPwHSDkYY2k+4BH5nXm9YImyS1A5e8QcLu0mPSjEm0AuZR7UxtJ85qm5aN3 z3oM5m/me5iAkY/HwgdgKc0SSnwo2/nzK1T/k7n4LmeBLltUlk8Ns/Mfr6+7cJpyAV sNbYytfZUmw/DT0PnREvz93Mb9epzNijAmfipWR5LKqixvGy39oBsjT4RjTo9HoRmu 5Og4OgHx41wnuZnnKwMooctnolJctzRZA/DB6+LcodtgLxoqy9wiy3kTNzziia37yC R572AhMXhMiVg== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 0A64A40442; Mon, 15 Jul 2024 10:50:26 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 037A71BF3FF for ; Mon, 15 Jul 2024 10:50:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E0308404D5 for ; Mon, 15 Jul 2024 10:50:23 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id f4m9uu4ynt24 for ; Mon, 15 Jul 2024 10:50:23 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.14; helo=mgamail.intel.com; envelope-from=sergey.temerkhanov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 0ABDA40442 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0ABDA40442 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0ABDA40442 for ; Mon, 15 Jul 2024 10:50:22 +0000 (UTC) X-CSE-ConnectionGUID: JXGqvJFgQlucox/i9NDK9Q== X-CSE-MsgGUID: RyM6JwDZSDipLFvFQUnkNg== X-IronPort-AV: E=McAfee;i="6700,10204,11133"; a="18609011" X-IronPort-AV: E=Sophos;i="6.09,210,1716274800"; d="scan'208";a="18609011" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2024 03:50:20 -0700 X-CSE-ConnectionGUID: 2t9QlrDnQDquXCaCLEbrVg== X-CSE-MsgGUID: r6XHH3dJT/m22GOXVyrZ5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,210,1716274800"; d="scan'208";a="49545153" Received: from unknown (HELO localhost.igk.intel.com) ([10.211.13.141]) by fmviesa009.fm.intel.com with ESMTP; 15 Jul 2024 03:50:19 -0700 From: Sergey Temerkhanov To: intel-wired-lan@lists.osuosl.org Date: Mon, 15 Jul 2024 12:48:44 +0200 Message-ID: <20240715104845.51419-2-sergey.temerkhanov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240715104845.51419-1-sergey.temerkhanov@intel.com> References: <20240715104845.51419-1-sergey.temerkhanov@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=1721040623; x=1752576623; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Xcby91CvHtdQucL3Gqpiq/obaC+y2zTJJ2JE4tqdZ6o=; b=KwcEswmdsBx+3ILdVax1IUFd6Tnt3HZXzGHk1iMnlJUvoCZXa5fSdHJW KgaGw2YAQHXglY7rBP2xCZsG/0QZxBwulb/Gnyos8mrV4GL7Rk8lSmvxd QMrtO8Rc+8vJWCnT8EgGhjKTA5esSlTa5/RIdQlOL3vSwhvf6OHFH4Bg5 Ro3ct0Yayl7IL4r/tFB+WLoBw+JgxYTR4Lk/G6q6I8K00GMKc/2WhakcC LI5zqIkGvV1a2BcThTzSJdaaPAnex99NbHj48Ssxx9/eJpPlPhmOTTy9H qJWFL2uHNYW1DXg3Tsj90+OJpAgc4thN2J9PTiGelLZyOfrHg2bqHDAWd Q==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=KwcEswmd Subject: [Intel-wired-lan] [PATCH iwl-net v1 1/2] ice: Fix reset handler 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: Sergey Temerkhanov , netdev@vger.kernel.org, Przemek Kitszel Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Grzegorz Nitka Synchronize OICR IRQ when preparing for reset to avoid potential race conditions between the reset procedure and OICR Signed-off-by: Grzegorz Nitka Signed-off-by: Sergey Temerkhanov Fixes: 4aad5335969f ("ice: add individual interrupt allocation") Reviewed-by: Przemek Kitszel --- drivers/net/ethernet/intel/ice/ice_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index e2990993b16f..3405fe749b25 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -560,6 +560,8 @@ ice_prepare_for_reset(struct ice_pf *pf, enum ice_reset_req reset_type) if (test_bit(ICE_PREPARED_FOR_RESET, pf->state)) return; + synchronize_irq(pf->oicr_irq.virq); + ice_unplug_aux_dev(pf); /* Notify VFs of impending reset */ From patchwork Mon Jul 15 10:48:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Temerkhanov X-Patchwork-Id: 1960592 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=wMRK0SBN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (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 4WMzWg4JkYz1xqc for ; Mon, 15 Jul 2024 20:50:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 1C221403CD; Mon, 15 Jul 2024 10:50:54 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Yw_cF-miN6TV; Mon, 15 Jul 2024 10:50:53 +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 smtp4.osuosl.org 327DF403ED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1721040653; bh=3IYwdsnH/YIikHAEoX1A8h2i6PuyCHRdJkzy7lcP/q0=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=wMRK0SBN1t7BYgwauP6S/dXKMZa3XH7F5YtHxIqF0a0z8LcEIRhvuV3+OlE1RGA0h XiqeJKYKpKjaZPN5BIyZ0s+ahN0qFdO8pVAqT9SwS3NBogiUJrfuzQSsPx0IutROO4 aFJF/MHv5qQrktOo1D44GGNYiiZ0aKSxmhhY30jKCaShs+jxI/Md8+u+PTi89Z6oU/ VxI9zpgdhmBLhoMZbHzfJwpFXjk1R3gy5TtNBOlf1+K2C3BfY92uVeyuW0QkZ+Xv9Z 2Wrnw97g+3/qqXXv7CPvDlJ0wovXya+jctyDF62ymyDc/TS2uPinsz0xZhoxklU9HN c3e2FiZoHrxyA== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 327DF403ED; Mon, 15 Jul 2024 10:50:53 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 7BAA31BF3FF for ; Mon, 15 Jul 2024 10:50:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 72E6C403CD for ; Mon, 15 Jul 2024 10:50:51 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id CDUBjfj8kiSS for ; Mon, 15 Jul 2024 10:50:50 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.14; helo=mgamail.intel.com; envelope-from=sergey.temerkhanov@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 8034E403C8 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 8034E403C8 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by smtp4.osuosl.org (Postfix) with ESMTPS id 8034E403C8 for ; Mon, 15 Jul 2024 10:50:50 +0000 (UTC) X-CSE-ConnectionGUID: /quAtb38RN+jbSoFy4K3Cg== X-CSE-MsgGUID: unftZgg/TRGrE/y/sxQ1ag== X-IronPort-AV: E=McAfee;i="6700,10204,11133"; a="18609047" X-IronPort-AV: E=Sophos;i="6.09,210,1716274800"; d="scan'208";a="18609047" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2024 03:50:23 -0700 X-CSE-ConnectionGUID: 64AKA/R5RvWUq4G7tf1YtQ== X-CSE-MsgGUID: Cf9nDKKQS6mp6IT4vZkPcA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,210,1716274800"; d="scan'208";a="49545174" Received: from unknown (HELO localhost.igk.intel.com) ([10.211.13.141]) by fmviesa009.fm.intel.com with ESMTP; 15 Jul 2024 03:50:21 -0700 From: Sergey Temerkhanov To: intel-wired-lan@lists.osuosl.org Date: Mon, 15 Jul 2024 12:48:45 +0200 Message-ID: <20240715104845.51419-3-sergey.temerkhanov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240715104845.51419-1-sergey.temerkhanov@intel.com> References: <20240715104845.51419-1-sergey.temerkhanov@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=1721040651; x=1752576651; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=X+n2EA+PpcwiVRODe8SXcZ/ebefjWKERhrirkSfG7uk=; b=lMOgYdwiviHYq0ekw9xzbufGM0bb99oPf96w4scUjX0ubl3rTkTF1Z6n uCXCYlbt0YhZzSUNS3El6RAhJNLzUKF/rxmAZmVhFCnbkVXRBVC8FpLF7 DO6E4T15ZhIQdiPDfLom0HRoVNHXD1Dp9vSeFdq8mtWZff2wRwKzpP4+N iZkfS3Z0lB1HlDuhL3gesnSD+Ol33Jp70fMxOVctcZon0ieVcKkDke5wJ Ocgpj2nRns1UrM/jHhSI4MawlcnZLsIldtyjqzpNr3BhxXAV69gtlBJvD BIBVATreWkDEzpyOaQKtY2NU3b+49kTNR/ucX7iOmCV7AtP0l53zhSizP w==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com 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=lMOgYdwi Subject: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: Skip PTP HW writes during PTP reset procedure 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: Sergey Temerkhanov , netdev@vger.kernel.org, Karol Kolacinski , Przemek Kitszel Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Grzegorz Nitka Block HW write access for the driver while the device is in reset to avoid potential race condition and access to the PTP HW in non-nominal state which could lead to undesired effects Signed-off-by: Grzegorz Nitka Co-developed-by: Karol Kolacinski Signed-off-by: Karol Kolacinski Signed-off-by: Sergey Temerkhanov Fixes: 4aad5335969f ("ice: add individual interrupt allocation") Reviewed-by: Przemek Kitszel --- drivers/net/ethernet/intel/ice/ice_ptp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c index 85b19e94e2ed..1f365bd6f525 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp.c +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c @@ -1420,6 +1420,10 @@ void ice_ptp_link_change(struct ice_pf *pf, u8 port, bool linkup) /* Update cached link status for this port immediately */ ptp_port->link_up = linkup; + /* Skip HW writes if reset is in progress */ + if (pf->hw.reset_ongoing) + return; + switch (ice_get_phy_model(hw)) { case ICE_PHY_E810: /* Do not reconfigure E810 PHY */