diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-04-29 04:20:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-29 20:32:37 -0400 |
commit | 3f926da82f128c68c479247b1771729b9487502a (patch) | |
tree | c55d11e34dc361895a618afa128077176915dc06 /drivers/net/sfc/mdio_10g.c | |
parent | af2a3eac2fe6a6d8e9fdf6927284b34466a7d808 (diff) |
sfc: Use generic MDIO flow control auto-negotiation functions
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 | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/net/sfc/mdio_10g.c b/drivers/net/sfc/mdio_10g.c index 11c231a1f87..6c33459f9ea 100644 --- a/drivers/net/sfc/mdio_10g.c +++ b/drivers/net/sfc/mdio_10g.c | |||
@@ -304,7 +304,7 @@ int efx_mdio_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) | |||
304 | else if (ecmd->advertising & (ADVERTISED_1000baseT_Half | | 304 | else if (ecmd->advertising & (ADVERTISED_1000baseT_Half | |
305 | ADVERTISED_1000baseT_Full)) | 305 | ADVERTISED_1000baseT_Full)) |
306 | reg |= ADVERTISE_NPAGE; | 306 | reg |= ADVERTISE_NPAGE; |
307 | reg |= efx_fc_advertise(efx->wanted_fc); | 307 | reg |= mii_advertise_flowctrl(efx->wanted_fc); |
308 | efx_mdio_write(efx, MDIO_MMD_AN, MDIO_AN_ADVERTISE, reg); | 308 | efx_mdio_write(efx, MDIO_MMD_AN, MDIO_AN_ADVERTISE, reg); |
309 | 309 | ||
310 | /* Set up the (extended) next page if necessary */ | 310 | /* Set up the (extended) next page if necessary */ |
@@ -340,26 +340,6 @@ int efx_mdio_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) | |||
340 | return 0; | 340 | return 0; |
341 | } | 341 | } |
342 | 342 | ||
343 | void efx_mdio_set_pause(struct efx_nic *efx) | ||
344 | { | ||
345 | int reg; | ||
346 | |||
347 | if (efx->phy_op->mmds & MDIO_DEVS_AN) { | ||
348 | /* Set pause capability advertising */ | ||
349 | reg = efx_mdio_read(efx, MDIO_MMD_AN, MDIO_AN_ADVERTISE); | ||
350 | reg &= ~(ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); | ||
351 | reg |= efx_fc_advertise(efx->wanted_fc); | ||
352 | efx_mdio_write(efx, MDIO_MMD_AN, MDIO_AN_ADVERTISE, reg); | ||
353 | |||
354 | /* Restart auto-negotiation */ | ||
355 | reg = efx_mdio_read(efx, MDIO_MMD_AN, MDIO_CTRL1); | ||
356 | if (reg & MDIO_AN_CTRL1_ENABLE) { | ||
357 | reg |= MDIO_AN_CTRL1_RESTART; | ||
358 | efx_mdio_write(efx, MDIO_MMD_AN, MDIO_CTRL1, reg); | ||
359 | } | ||
360 | } | ||
361 | } | ||
362 | |||
363 | enum efx_fc_type efx_mdio_get_pause(struct efx_nic *efx) | 343 | enum efx_fc_type efx_mdio_get_pause(struct efx_nic *efx) |
364 | { | 344 | { |
365 | int lpa; | 345 | int lpa; |