ixgbe: fix media cage present detection for E610 device
authorPiotr Kwapulinski <piotr.kwapulinski@intel.com>
Mon, 24 Feb 2025 19:06:45 +0000 (11:06 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 26 Feb 2025 03:09:40 +0000 (19:09 -0800)
The commit 23c0e5a16bcc ("ixgbe: Add link management support for E610
device") introduced incorrect checking of media cage presence for E610
device. Fix it.

Fixes: 23c0e5a16bcc ("ixgbe: Add link management support for E610 device")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/e7d73b32-f12a-49d1-8b60-1ef83359ec13@stanley.mountain/
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Bharath R <bharath.r@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://patch.msgid.link/20250224190647.3601930-6-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c

index 683c668672d65535fca3b2fe6f58a9deda1188fa..cb07ecd8937d34840acc2dfd3e517f6f2c2ba5eb 100644 (file)
@@ -1122,7 +1122,7 @@ static bool ixgbe_is_media_cage_present(struct ixgbe_hw *hw)
         * returns error (ENOENT), then no cage present. If no cage present then
         * connection type is backplane or BASE-T.
         */
-       return ixgbe_aci_get_netlist_node(hw, cmd, NULL, NULL);
+       return !ixgbe_aci_get_netlist_node(hw, cmd, NULL, NULL);
 }
 
 /**