diff options
author | Edward Cree <ecree@solarflare.com> | 2020-08-03 21:38:49 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-03 18:22:55 -0700 |
commit | ef2c57b956143c300adef4b89438e1da3db4cf32 (patch) | |
tree | 807284814ce847663cc9382a799821bb6eb06b09 /drivers/net | |
parent | 43c3df0d56474dd27e1f2a1ca70e9060d341e695 (diff) |
sfc_ef100: read pf_index at probe time
We'll need it later, for VF representors.
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/sfc/ef100_nic.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/ef100_nic.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index 90fc44052abf..10748efbf98e 100644 --- a/drivers/net/ethernet/sfc/ef100_nic.c +++ b/drivers/net/ethernet/sfc/ef100_nic.c @@ -1096,6 +1096,10 @@ static int ef100_probe_main(struct efx_nic *efx) if (rc) goto fail; + rc = efx_get_pf_index(efx, &nic_data->pf_index); + if (rc) + goto fail; + rc = efx_ef100_init_datapath_caps(efx); if (rc < 0) goto fail; diff --git a/drivers/net/ethernet/sfc/ef100_nic.h b/drivers/net/ethernet/sfc/ef100_nic.h index 7c2d37490074..4a64c9438493 100644 --- a/drivers/net/ethernet/sfc/ef100_nic.h +++ b/drivers/net/ethernet/sfc/ef100_nic.h @@ -63,6 +63,7 @@ struct ef100_nic_data { u32 datapath_caps; u32 datapath_caps2; u32 datapath_caps3; + unsigned int pf_index; u16 warm_boot_count; u8 port_id[ETH_ALEN]; DECLARE_BITMAP(evq_phases, EFX_MAX_CHANNELS); |