HomeFreeBSD

ena: Extend support to 256 reset reasons

Description

ena: Extend support to 256 reset reasons

Currently we only use 4 bits in order to define the reset reason.
This allows us to define 16 reset reasons which have already been used
up. In order to allow for more reset reasons to be defined and detected
this patch will extend the reset reason up to 8 bits which allows
256 reset reasons.

For backward compatibility reasons, bits 28-31 will represent the LSB
and bits 24-27 will represent the MSB in the relevant register.

Also, in case the device does not support extended reset reasons, the
driver will identify it and fall back to GENERIC reset reason.
When using an old driver all reset reasons are mapped correctly
except of ENA_REGS_RESET_RX_DESCRIPTOR_MALFORMED since it was
already defined before extending the reset reasons support, in this case
the device will interpret the reset reason as ENA_REGS_RESET_NORMAL.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

Details

Provenance
osamaabb_amazon.comAuthored on Aug 4 2024, 11:15 AM
Parents
rGa20a329b107f: ena: Add rx_overruns to keep alive desc and admin stats
Branches
Unknown
Tags
Unknown