sfc_ef100: fail the probe if NIC uses unsol_ev credits

In the future, EF100 is planned to have a credit-based scheme for
 handling unsolicited events, which drivers will need to use in order
 to function correctly.  However, current EF100 hardware does not yet
 generate unsolicited events and the credit scheme has not yet been
 implemented in firmware.  To prevent compatibility problems later if
 the current driver is used with future firmware which does implement
 it, we check for the corresponding capability flag (which that
 future firmware will set), and if found, we refuse to probe.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Edward Cree 2020-08-03 21:32:16 +01:00 committed by David S. Miller
parent 8e737145e8
commit 4496363bec
1 changed files with 6 additions and 0 deletions

View File

@ -602,6 +602,12 @@ static int ef100_probe_main(struct efx_nic *efx)
goto fail;
}
if (efx_has_cap(efx, UNSOL_EV_CREDIT_SUPPORTED)) {
netif_info(efx, drv, efx->net_dev, "Firmware uses unsolicited-event credits\n");
rc = -EINVAL;
goto fail;
}
rc = ef100_phy_probe(efx);
if (rc)
goto fail;