diff options
-rw-r--r-- | drivers/net/sfc/tenxpress.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c index f4d509015f75..1a3495c676c0 100644 --- a/drivers/net/sfc/tenxpress.c +++ b/drivers/net/sfc/tenxpress.c | |||
@@ -301,6 +301,7 @@ static int tenxpress_init(struct efx_nic *efx) | |||
301 | static int tenxpress_phy_init(struct efx_nic *efx) | 301 | static int tenxpress_phy_init(struct efx_nic *efx) |
302 | { | 302 | { |
303 | struct tenxpress_phy_data *phy_data; | 303 | struct tenxpress_phy_data *phy_data; |
304 | u16 old_adv, adv; | ||
304 | int rc = 0; | 305 | int rc = 0; |
305 | 306 | ||
306 | phy_data = kzalloc(sizeof(*phy_data), GFP_KERNEL); | 307 | phy_data = kzalloc(sizeof(*phy_data), GFP_KERNEL); |
@@ -333,6 +334,15 @@ static int tenxpress_phy_init(struct efx_nic *efx) | |||
333 | if (rc < 0) | 334 | if (rc < 0) |
334 | goto fail; | 335 | goto fail; |
335 | 336 | ||
337 | /* Set pause advertising */ | ||
338 | old_adv = efx_mdio_read(efx, MDIO_MMD_AN, MDIO_AN_ADVERTISE); | ||
339 | adv = ((old_adv & ~(ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM)) | | ||
340 | mii_advertise_flowctrl(efx->wanted_fc)); | ||
341 | if (adv != old_adv) { | ||
342 | efx_mdio_write(efx, MDIO_MMD_AN, MDIO_AN_ADVERTISE, adv); | ||
343 | mdio45_nway_restart(&efx->mdio); | ||
344 | } | ||
345 | |||
336 | if (efx->phy_type == PHY_TYPE_SFT9001B) { | 346 | if (efx->phy_type == PHY_TYPE_SFT9001B) { |
337 | rc = device_create_file(&efx->pci_dev->dev, | 347 | rc = device_create_file(&efx->pci_dev->dev, |
338 | &dev_attr_phy_short_reach); | 348 | &dev_attr_phy_short_reach); |