netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>,
	Jan Sokolowski <jan.sokolowski@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com>
Subject: [PATCH net 3/3] ice: Fix safe mode when DDP is missing
Date: Wed, 11 Oct 2023 16:33:34 -0700	[thread overview]
Message-ID: <20231011233334.336092-4-jacob.e.keller@intel.com> (raw)
In-Reply-To: <20231011233334.336092-1-jacob.e.keller@intel.com>

From: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>

One thing is broken in the safe mode, that is
ice_deinit_features() is being executed even
that ice_init_features() was not causing stack
trace during pci_unregister_driver().

Add check on the top of the function.

Fixes: 5b246e533d01 ("ice: split probe into smaller functions")
Signed-off-by: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
---
 drivers/net/ethernet/intel/ice/ice_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 6550c46e4e36..7784135160fd 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -4684,6 +4684,9 @@ static void ice_init_features(struct ice_pf *pf)
 
 static void ice_deinit_features(struct ice_pf *pf)
 {
+	if (ice_is_safe_mode(pf))
+		return;
+
 	ice_deinit_lag(pf);
 	if (test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags))
 		ice_cfg_lldp_mib_change(&pf->hw, false);
-- 
2.41.0


  parent reply	other threads:[~2023-10-11 23:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 23:33 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2023-10-11 (i40e, ice) Jacob Keller
2023-10-11 23:33 ` [PATCH net 1/3] i40e: prevent crash on probe if hw registers have invalid values Jacob Keller
2023-10-11 23:33 ` [PATCH net 2/3] ice: reset first in crash dump kernels Jacob Keller
2023-10-11 23:33 ` Jacob Keller [this message]
2023-10-14  0:56 ` [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2023-10-11 (i40e, ice) Jakub Kicinski
2023-10-14  1:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231011233334.336092-4-jacob.e.keller@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=davem@davemloft.net \
    --cc=himasekharx.reddy.pucha@intel.com \
    --cc=jan.sokolowski@intel.com \
    --cc=kuba@kernel.org \
    --cc=mateuszx.pacuszka@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).