[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <238e42d9-a101-ac78-ea9a-ddcfc817251d@solarflare.com>
Date: Mon, 3 Aug 2020 21:32:16 +0100
From: Edward Cree <ecree@...arflare.com>
To: <linux-net-drivers@...arflare.com>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>
Subject: [PATCH v3 net-next 02/11] 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@...arflare.com>
---
drivers/net/ethernet/sfc/ef100_nic.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c
index 75131bcf4f1a..c2bec2bdbc1f 100644
--- a/drivers/net/ethernet/sfc/ef100_nic.c
+++ b/drivers/net/ethernet/sfc/ef100_nic.c
@@ -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;
Powered by blists - more mailing lists