]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
ice: register devlink prior to creating health reporters
authorPrzemek Kitszel <przemyslaw.kitszel@intel.com>
Wed, 19 Feb 2025 13:30:39 +0000 (14:30 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 5 Mar 2025 16:45:45 +0000 (08:45 -0800)
ice_health_init() was introduced in the commit 2a82874a3b7b ("ice: add
Tx hang devlink health reporter"). The call to it should have been put
after ice_devlink_register(). It went unnoticed until next reporter by
Konrad, which receives events from FW. FW is reporting all events, also
from prior driver load, and thus it is not unlikely to have something
at the very beginning. And that results in a splat:
[   24.455950]  ? devlink_recover_notify.constprop.0+0x198/0x1b0
[   24.455973]  devlink_health_report+0x5d/0x2a0
[   24.455976]  ? __pfx_ice_health_status_lookup_compare+0x10/0x10 [ice]
[   24.456044]  ice_process_health_status_event+0x1b7/0x200 [ice]

Do the analogous thing for deinit patch.

Fixes: 85d6164ec56d ("ice: add fw and port health reporters")
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Konrad Knitter <konrad.knitter@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Tested-by: Sunitha Mekala <sunithax.d.mekala@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_main.c

index c3a0fb97c5ee4f3410b8ba7534731fda328f682e..e13bd5a6cb6c4e92eb73596152071c9ac3a3664f 100644 (file)
@@ -5065,16 +5065,16 @@ static int ice_init_devlink(struct ice_pf *pf)
                return err;
 
        ice_devlink_init_regions(pf);
-       ice_health_init(pf);
        ice_devlink_register(pf);
+       ice_health_init(pf);
 
        return 0;
 }
 
 static void ice_deinit_devlink(struct ice_pf *pf)
 {
-       ice_devlink_unregister(pf);
        ice_health_deinit(pf);
+       ice_devlink_unregister(pf);
        ice_devlink_destroy_regions(pf);
        ice_devlink_unregister_params(pf);
 }