diff options
author | Edward Cree <ecree@solarflare.com> | 2020-07-27 14:56:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-27 22:26:55 +0300 |
commit | aa86a75fed03bca1372cbaf0c3587f6707453a52 (patch) | |
tree | 1a459e4f3a2a26c8bb23ba674a1add73b0bb0af3 /drivers/net/ethernet | |
parent | c027f2a72a3149a28387a67a58a6cfc585bbcd53 (diff) | |
download | linux-aa86a75fed03bca1372cbaf0c3587f6707453a52.tar.xz |
sfc_ef100: PHY probe stub
We can't actually do the MCDI to probe it fully until we have working
MCDI, which comes later, but we need efx->phy_data to be allocated so
that when we get MCDI events the link-state change handler doesn't
NULL-dereference.
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/sfc/ef100_nic.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index 875bbbdf606c..802ab0ce00fe 100644 --- a/drivers/net/ethernet/sfc/ef100_nic.c +++ b/drivers/net/ethernet/sfc/ef100_nic.c @@ -77,6 +77,16 @@ static irqreturn_t ef100_msi_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } +static int ef100_phy_probe(struct efx_nic *efx) +{ + /* stub: allocate the phy_data */ + efx->phy_data = kzalloc(sizeof(struct efx_mcdi_phy_data), GFP_KERNEL); + if (!efx->phy_data) + return -ENOMEM; + + return 0; +} + /* Other */ @@ -193,6 +203,10 @@ static int ef100_probe_main(struct efx_nic *efx) efx->max_vis = EF100_MAX_VIS; + rc = ef100_phy_probe(efx); + if (rc) + goto fail; + rc = efx_init_channels(efx); if (rc) goto fail; |