aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-10-12 05:27:07 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-13 02:59:09 -0400
commitc634263df5890daafe0ea470faee3305736bbc3d (patch)
treecdc30a976e3d1bb0e3d57633d1917c5f28e69518 /drivers/net/sfc
parent27fbc7db52315d6ec37fe3292c1b2ee62180c643 (diff)
sfc: 10Xpress: Initialise pause advertising flags
The mdio module now handles reconfiguration of pause advertising through ethtool, but not initialisation. Add the necessary initialisation to tenxpress_phy_init(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/tenxpress.c10
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)
301static int tenxpress_phy_init(struct efx_nic *efx) 301static 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);