Skip to content

Commit 4496363

Browse files
ecree-solarflaredavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8e73714 commit 4496363

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/sfc/ef100_nic.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,12 @@ static int ef100_probe_main(struct efx_nic *efx)
602602
goto fail;
603603
}
604604

605+
if (efx_has_cap(efx, UNSOL_EV_CREDIT_SUPPORTED)) {
606+
netif_info(efx, drv, efx->net_dev, "Firmware uses unsolicited-event credits\n");
607+
rc = -EINVAL;
608+
goto fail;
609+
}
610+
605611
rc = ef100_phy_probe(efx);
606612
if (rc)
607613
goto fail;

0 commit comments

Comments
 (0)