Patchwork sfc: SFT9001: Fix condition for LNPGA power-off

login
register
mail settings
Submitter Ben Hutchings
Date Jan. 10, 2009, 11:05 p.m.
Message ID <1231628703.2671.3.camel@hashbaz.i.decadent.org.uk>
Download mbox | patch
Permalink /patch/17769/
State Accepted
Delegated to: David Miller
Headers show

Comments

Ben Hutchings - Jan. 10, 2009, 11:05 p.m.
Only the SFX7101 requires software power control.  This was
incorrectly being applied to the SFT9001 rev A as well.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
 drivers/net/sfc/tenxpress.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
David Miller - Jan. 11, 2009, 8:18 a.m.
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Sat, 10 Jan 2009 23:05:03 +0000

> Only the SFX7101 requires software power control.  This was
> incorrectly being applied to the SFT9001 rev A as well.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

Applied, thanks Ben.
--
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

Patch

diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c
index b976876..9ecb77d 100644
--- a/drivers/net/sfc/tenxpress.c
+++ b/drivers/net/sfc/tenxpress.c
@@ -636,10 +636,11 @@  static void tenxpress_phy_fini(struct efx_nic *efx)
 {
 	int reg;
 
-	if (efx->phy_type == PHY_TYPE_SFT9001B) {
+	if (efx->phy_type == PHY_TYPE_SFT9001B)
 		device_remove_file(&efx->pci_dev->dev,
 				   &dev_attr_phy_short_reach);
-	} else {
+
+	if (efx->phy_type == PHY_TYPE_SFX7101) {
 		/* Power down the LNPGA */
 		reg = (1 << PMA_PMD_LNPGA_POWERDOWN_LBN);
 		mdio_clause45_write(efx, efx->mii.phy_id, MDIO_MMD_PMAPMD,