diff mbox

[net-2.6] sfc: 10Xpress: Report support for pause frames

Message ID 1256250314.2785.22.camel@achroite
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ben Hutchings Oct. 22, 2009, 10:25 p.m. UTC
Commits 27fbc7d 'mdio: Expose pause frame advertising flags to ethtool'
and c634263 'sfc: 10Xpress: Initialise pause advertising flags'
added to our reported advertising flags.

efx_mdio_set_settings() requires that all advertising flags are
also present in the supported flags, so make sure that is true.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
This fixes a regression in 2.6.32: after resetting a 10Xpress PHY we
fail to reconfigure it if pause frames are enabled.  Manually changing
pause frame settings will also fail.

Ben.

 drivers/net/sfc/tenxpress.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Ben Hutchings Oct. 22, 2009, 10:30 p.m. UTC | #1
On Thu, 2009-10-22 at 23:25 +0100, Ben Hutchings wrote:
> Commits 27fbc7d 'mdio: Expose pause frame advertising flags to ethtool'
> and c634263 'sfc: 10Xpress: Initialise pause advertising flags'
> added to our reported advertising flags.
> 
> efx_mdio_set_settings() requires that all advertising flags are
> also present in the supported flags, so make sure that is true.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> This fixes a regression in 2.6.32: after resetting a 10Xpress PHY we
> fail to reconfigure it if pause frames are enabled.  Manually changing
> pause frame settings will also fail.

Sorry, I was mistaken - those earlier commits are only in net-next-2.6,
so this is not needed for 2.6.32.

Ben.
David Miller Oct. 23, 2009, 1:31 a.m. UTC | #2
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 22 Oct 2009 23:25:14 +0100

> Commits 27fbc7d 'mdio: Expose pause frame advertising flags to ethtool'
> and c634263 'sfc: 10Xpress: Initialise pause advertising flags'
> added to our reported advertising flags.
> 
> efx_mdio_set_settings() requires that all advertising flags are
> also present in the supported flags, so make sure that is true.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Oct. 23, 2009, 1:35 a.m. UTC | #3
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 22 Oct 2009 23:30:02 +0100

> Sorry, I was mistaken - those earlier commits are only in net-next-2.6,
> so this is not needed for 2.6.32.

Ok, I'll move the patch over to net-next-2.6 then, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c
index 1a3495c..352cc56 100644
--- a/drivers/net/sfc/tenxpress.c
+++ b/drivers/net/sfc/tenxpress.c
@@ -752,6 +752,7 @@  tenxpress_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd)
 
 	mdio45_ethtool_gset_npage(&efx->mdio, ecmd, adv, lpa);
 
+	ecmd->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
 	if (efx->phy_type != PHY_TYPE_SFX7101) {
 		ecmd->supported |= (SUPPORTED_100baseT_Full |
 				    SUPPORTED_1000baseT_Full);