cxgbe(4): Fix an assertion that is not valid during attach.

Firmware access from t4_attach takes place without any synchronization.
The driver should not panic (debug kernels) if something goes wrong in
early communication with the firmware.  It should still load so that
it's possible to poke around with cxgbetool.

MFC after:	1 week
Sponsored by:	Chelsio Communications
This commit is contained in:
Navdeep Parhar 2021-03-05 11:28:18 -08:00
parent 8b434feedf
commit 4a4e9c516c

View File

@ -2875,7 +2875,8 @@ t4_fatal_err(struct adapter *sc, bool fw_error)
log(LOG_ALERT, "%s: encountered fatal error, adapter stopped.\n",
device_get_nameunit(sc->dev));
if (fw_error) {
ASSERT_SYNCHRONIZED_OP(sc);
if (sc->flags & CHK_MBOX_ACCESS)
ASSERT_SYNCHRONIZED_OP(sc);
sc->flags |= ADAP_ERR;
} else {
ADAPTER_LOCK(sc);