ionic: monitor fw status generation
authorShannon Nelson <snelson@pensando.io>
Tue, 27 Jul 2021 17:43:26 +0000 (10:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jul 2021 19:15:21 +0000 (20:15 +0100)
commitd2662072c094be6dd7544c7752a36a5dc030076c
treeba7b3a41268553dbbd39f10471e5f8a3b6fb54a0
parentc0b03e8399505a5aafe3a38e287213f523d890af
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>
drivers/net/ethernet/pensando/ionic/ionic_dev.c
drivers/net/ethernet/pensando/ionic/ionic_dev.h
drivers/net/ethernet/pensando/ionic/ionic_if.h