Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1181739
| From | Stas Sergeev <stsp@list.ru> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/3] mvneta: use inband status only when explicitly enabled |
| Date | 2015-07-10 18:50 +0200 |
| Message-ID | <pKJER-8o8-9@gated-at.bofh.it> (permalink) |
| References | <pKJvc-8kG-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The commit 898b2970e2c9 ("mvneta: implement SGMII-based in-band link state
signaling") implemented the link parameters auto-negotiation unconditionally.
Unfortunately it appears that some HW that implements SGMII protocol,
doesn't generate the inband status, so it is not possible to auto-negotiate
anything with such HW.
This patch enables the auto-negotiation only if the 'autoneg' DT property
is set to 1.
For old configurations where the 'autoneg' property is not specified, the
default is to not use auto-negotiation.
This patch fixes the following regression:
https://lkml.org/lkml/2015/7/8/865
and is therefore CCed to stable.
Signed-off-by: Stas Sergeev <stsp@users.sourceforge.net>
CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
CC: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: stable@vger.kernel.org
---
drivers/net/ethernet/marvell/mvneta.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 74176ec..d4c29a3 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3009,7 +3009,7 @@ static int mvneta_probe(struct platform_device *pdev)
char hw_mac_addr[ETH_ALEN];
const char *mac_from;
int phy_mode;
- int fixed_phy = 0;
+ int autoneg_link = 0;
int err;
/* Our multiqueue support is not complete, so for now, only
@@ -3043,7 +3043,7 @@ static int mvneta_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "cannot register fixed PHY\n");
goto err_free_irq;
}
- fixed_phy = 1;
+ autoneg_link = of_phy_is_autoneg_link(dn);
/* In the case of a fixed PHY, the DT node associated
* to the PHY is the Ethernet MAC DT node.
@@ -3067,8 +3067,7 @@ static int mvneta_probe(struct platform_device *pdev)
pp = netdev_priv(dev);
pp->phy_node = phy_node;
pp->phy_interface = phy_mode;
- pp->use_inband_status = (phy_mode == PHY_INTERFACE_MODE_SGMII) &&
- fixed_phy;
+ pp->use_inband_status = autoneg_link;
pp->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(pp->clk)) {
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/2] net: enable inband link state negotiation only when explicitly requested Stas Sergeev <stsp@list.ru> - 2015-07-10 18:40 +0200
[PATCH 3/3] mvneta: use inband status only when explicitly enabled Stas Sergeev <stsp@list.ru> - 2015-07-10 18:50 +0200
[PATCH 1/3] fixed_phy: handle link-down case Stas Sergeev <stsp@list.ru> - 2015-07-10 18:50 +0200
Re: [PATCH 1/3] fixed_phy: handle link-down case Stas Sergeev <stsp@list.ru> - 2015-07-11 11:00 +0200
[PATCH 2/3] of_mdio: add new DT property 'autoneg' for fixed-link Stas Sergeev <stsp@list.ru> - 2015-07-10 18:50 +0200
Re: [PATCH 2/3] of_mdio: add new DT property 'autoneg' for fixed-link Stas Sergeev <stsp@list.ru> - 2015-07-11 11:20 +0200
Re: [PATCH v2 0/2] net: enable inband link state negotiation only when explicitly requested Sebastien Rannou <mxs@sbrk.org> - 2015-07-13 12:00 +0200
Re: [PATCH v2 0/2] net: enable inband link state negotiation only when explicitly requested Stas Sergeev <stsp@list.ru> - 2015-07-13 12:00 +0200
csiph-web