sfc: remove phy_op indirection
Originally there were several implementations of PHY operations for the several different PHYs used on Falcon boards. But Falcon is now in a separate driver, and all sfc NICs since then have had MCDI-managed PHYs. Thus, there is no need to indirect through function pointers in efx->phy_op; we can simply call the efx_mcdi_phy_* functions directly. This also hooks up these functions for EF100, which was previously using the dummy_phy_ops. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:

committed by
Jakub Kicinski

parent
7dcc9d8a40
commit
c77289b433
@@ -21,6 +21,7 @@
|
||||
#include "efx_common.h"
|
||||
#include "efx_channels.h"
|
||||
#include "nic.h"
|
||||
#include "mcdi_port_common.h"
|
||||
#include "selftest.h"
|
||||
#include "workarounds.h"
|
||||
|
||||
@@ -99,10 +100,8 @@ static int efx_test_phy_alive(struct efx_nic *efx, struct efx_self_tests *tests)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
if (efx->phy_op->test_alive) {
|
||||
rc = efx->phy_op->test_alive(efx);
|
||||
tests->phy_alive = rc ? -1 : 1;
|
||||
}
|
||||
rc = efx_mcdi_phy_test_alive(efx);
|
||||
tests->phy_alive = rc ? -1 : 1;
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -257,11 +256,8 @@ static int efx_test_phy(struct efx_nic *efx, struct efx_self_tests *tests,
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (!efx->phy_op->run_tests)
|
||||
return 0;
|
||||
|
||||
mutex_lock(&efx->mac_lock);
|
||||
rc = efx->phy_op->run_tests(efx, tests->phy_ext, flags);
|
||||
rc = efx_mcdi_phy_run_tests(efx, tests->phy_ext, flags);
|
||||
mutex_unlock(&efx->mac_lock);
|
||||
if (rc == -EPERM)
|
||||
rc = 0;
|
||||
|
Reference in New Issue
Block a user