Skip to content

Commit

Permalink
sfc_ef100: fail the probe if NIC uses unsol_ev credits
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Edward Cree authored and David S. Miller committed Aug 4, 2020
1 parent 8e73714 commit 4496363
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/ethernet/sfc/ef100_nic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4496363

Please sign in to comment.