diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2013-10-18 22:21:45 +0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-12-13 02:07:15 +0400 |
commit | 0bcf4a645fc027d05d15e79ce48b5893cff28082 (patch) | |
tree | 48f54ac160df82b66b4d0776a8247d1f8c21c8b1 /drivers/net/ethernet/sfc/mcdi.c | |
parent | ef215e64760ef6bd756c2999e7c8cee95b98e30a (diff) | |
download | linux-0bcf4a645fc027d05d15e79ce48b5893cff28082.tar.xz |
sfc: Associate primary and secondary functions of controller
The primary function of an EF10 controller will share its clock
device with other functions in the same domain (which we call
secondary functions). To this end, we need to associate functions
on the same controller.
We do not control probe order, so allow primary and secondary
functions to appear in any order. Maintain global lists of all
primary functions and of unassociated secondary functions,
and a list of secondary functions on each primary function.
Use the VPD serial number to tell whether functions are part of the
same controller. VPD will not be readable by virtual functions, so
this may need to be revisited later.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/mcdi.c')
-rw-r--r-- | drivers/net/ethernet/sfc/mcdi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c index 540f57915d6f..0d5d7b5325e8 100644 --- a/drivers/net/ethernet/sfc/mcdi.c +++ b/drivers/net/ethernet/sfc/mcdi.c @@ -102,6 +102,10 @@ int efx_mcdi_init(struct efx_nic *efx) netif_err(efx, probe, efx->net_dev, "Host already registered with MCPU\n"); + if (efx->mcdi->fn_flags & + (1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_PRIMARY)) + efx->primary = efx; + return 0; } |