HomeFreeBSD

cxgbe(4): Fix illegal hardware access in cxgbe_refresh_stats.

Description

cxgbe(4): Fix illegal hardware access in cxgbe_refresh_stats.

cxgbe_refresh_stats takes into account VI_SKIP_STATS but not
VI_INIT_DONE when deciding whether to read the hardware stats. But
before this change VI_SKIP_STATS was set only for VIs with VI_INIT_DONE.
That meant that cxgbe_refresh_stats always accessed the hardware for
uninitialized VIs, and this is a problem if the adapter is suspended or
in the middle of a reset.

Fix this by setting VI_SKIP_STATS on all VIs during suspend. While
here, ignore VI_INIT_DONE in vi_refresh_stats too to be consistent with
cxgbe_refresh_stats.

MFC after: 1 week
Sponsored by: Chelsio Communications

Details

Provenance
npAuthored on Feb 12 2022, 12:58 AM
Parents
rG0b6a34acda42: [skip ci] fusefs: delete a stray comment from 91972cfcddf
Branches
Unknown
Tags
Unknown