[v1,08/22] net/ixgbe/base: fix crash while loading driver

Message ID 577c1cb1250710da2839079d85a8e9e83fa34c7e.1713964708.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded
Delegated to: Bruce Richardson
Headers
Series Update IXGBE base driver |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Anatoly Burakov April 24, 2024, 1:21 p.m. UTC
  From: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>

Issue observed: system crash While loading the driver when debug macros
were defined.

The solution removes the debug macro call from
ixgbe_set_mac_type() function which causes the crash.

So far, the ixgbe_set_mac_type() function has called in the ixgbe driver
ixgbe_probe() function before the struct ixgbe_hw is properly defined.
In this case, the field back of the structure that must contain
pointer to an adapter has not yet been defined and should not be used
to obtain driver information which is needed in debug macros.
Moreover bearing in mind the recommendations to not print out excessive
amount of information it was decided to remove the debug information.

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Tyl, RadoslawX <radoslawx.tyl@intel.com>
Reviewed-by: Skajewski, PiotrX <piotrx.skajewski@intel.com>
Tested-by: nosbuild <nosbuild@intel.com>
Reviewed-by: Michael, Alice <alice.michael@intel.com>
---

Notes:
    This fix seems to be kernel-specific, so Cc:stable was intentionally omitted.

 drivers/net/ixgbe/base/ixgbe_api.c | 2 --
 1 file changed, 2 deletions(-)
  

Patch

diff --git a/drivers/net/ixgbe/base/ixgbe_api.c b/drivers/net/ixgbe/base/ixgbe_api.c
index b322c181b4..89e1650d63 100644
--- a/drivers/net/ixgbe/base/ixgbe_api.c
+++ b/drivers/net/ixgbe/base/ixgbe_api.c
@@ -216,8 +216,6 @@  s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)
 		break;
 	}
 
-	DEBUGOUT2("ixgbe_set_mac_type found mac: %d, returns: %d\n",
-		  hw->mac.type, ret_val);
 	return ret_val;
 }