diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-10-23 10:33:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-24 13:27:25 +0200 |
commit | 18ea024fd6abd1a857de9dc0f588a222cf279521 (patch) | |
tree | a4300e54144d2f508f8f9ce3b98170ca943f7903 /drivers/net/sfc/mdio_10g.c | |
parent | sfc: Move MTD probe after netdev registration and name allocation (diff) | |
download | linux-18ea024fd6abd1a857de9dc0f588a222cf279521.tar.xz linux-18ea024fd6abd1a857de9dc0f588a222cf279521.zip |
sfc: Merge efx_fc_resolve() into efx_mdio_get_pause()
efx_fc_resolve() is specific to MDIO and is not used by any other
function.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/mdio_10g.c')
-rw-r--r-- | drivers/net/sfc/mdio_10g.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/sfc/mdio_10g.c b/drivers/net/sfc/mdio_10g.c index b355872de6c2..25fb20adf4b7 100644 --- a/drivers/net/sfc/mdio_10g.c +++ b/drivers/net/sfc/mdio_10g.c @@ -341,10 +341,14 @@ int efx_mdio_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) enum efx_fc_type efx_mdio_get_pause(struct efx_nic *efx) { - int lpa; + BUILD_BUG_ON(EFX_FC_AUTO & (EFX_FC_RX | EFX_FC_TX)); - if (!(efx->phy_op->mmds & MDIO_DEVS_AN)) + if (!(efx->wanted_fc & EFX_FC_AUTO)) return efx->wanted_fc; - lpa = efx_mdio_read(efx, MDIO_MMD_AN, MDIO_AN_LPA); - return efx_fc_resolve(efx->wanted_fc, lpa); + + WARN_ON(!(efx->mdio.mmds & MDIO_DEVS_AN)); + + return mii_resolve_flowctrl_fdx( + mii_advertise_flowctrl(efx->wanted_fc), + efx_mdio_read(efx, MDIO_MMD_AN, MDIO_AN_LPA)); } |