diff options
author | Shannon Nelson <snelson@pensando.io> | 2021-07-27 10:43:26 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-27 20:15:21 +0100 |
commit | d2662072c094be6dd7544c7752a36a5dc030076c (patch) | |
tree | ba7b3a41268553dbbd39f10471e5f8a3b6fb54a0 /drivers/net/ethernet/pensando/ionic/ionic_if.h | |
parent | c0b03e8399505a5aafe3a38e287213f523d890af (diff) |
ionic: monitor fw status generation
The top 4 bits of the fw_status in dev_info_regs is reserved
for the status generation. This generation number is an
arbitrary value defined when firmware starts up. If the FW
is killed/crashed/stopped and then restarted, it will create
a different generation number. With this mechanism, the host
driver can detect that the FW has crashed and restarted, and
the driver can then take steps to re-initialize its connection.
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_if.h')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_if.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_if.h b/drivers/net/ethernet/pensando/ionic/ionic_if.h index 0478b48d9895..278610ed7227 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_if.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_if.h @@ -2936,6 +2936,8 @@ struct ionic_hwstamp_regs { * @asic_type: Asic type * @asic_rev: Asic revision * @fw_status: Firmware status + * bit 0 - 1 = fw running + * bit 4-7 - 4 bit generation number, changes on fw restart * @fw_heartbeat: Firmware heartbeat counter * @serial_num: Serial number * @fw_version: Firmware version @@ -2949,7 +2951,8 @@ union ionic_dev_info_regs { u8 version; u8 asic_type; u8 asic_rev; -#define IONIC_FW_STS_F_RUNNING 0x1 +#define IONIC_FW_STS_F_RUNNING 0x01 +#define IONIC_FW_STS_F_GENERATION 0xF0 u8 fw_status; u32 fw_heartbeat; char fw_version[IONIC_DEVINFO_FWVERS_BUFLEN]; |