Commit b1161b18 authored by Mohsin Bashir's avatar Mohsin Bashir Committed by Jakub Kicinski
Browse files

eth: fbnic: Reset hw stats upon PCI error



Upon experiencing a PCI error, fbnic reset the device to recover from
the failure. Reset the hardware stats as part of the device reset to
ensure accurate stats reporting.

Note that the reset is not really resetting the aggregate value to 0,
which may result in a spike for a system collecting deltas in stats.
Rather, the reset re-latches the current value as previous, in case HW
got reset.

Signed-off-by: default avatarMohsin Bashir <mohsin.bashr@gmail.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250825200206.2357713-3-kuba@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2ee5c8c0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -491,6 +491,8 @@ static void __fbnic_pm_attach(struct device *dev)
	struct net_device *netdev = fbd->netdev;
	struct fbnic_net *fbn;

	fbnic_reset_hw_stats(fbd);

	if (fbnic_init_failure(fbd))
		return;