* [PATCH 1/3] drivers: net: cpsw: fix parsing of phy-handle DT property in dual_emac config
2015-12-23 0:36 [PATCH 0/3] drivers: net: cpsw: phy-handle fixes David Rivshin (Allworx)
@ 2015-12-23 0:36 ` David Rivshin (Allworx)
2015-12-23 0:36 ` [PATCH 2/3] drivers: net: cpsw: fix error messages when using phy-handle DT property David Rivshin (Allworx)
` (3 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: David Rivshin (Allworx) @ 2015-12-23 0:36 UTC (permalink / raw)
To: netdev
Cc: linux-arm-kernel, linux-omap, devicetree, David Miller,
Heiko Schocher, Mugunthan V N, Markus Brunner, Pascal Speck,
Daniel Trautmann
From: David Rivshin <drivshin@allworx.com>
Commit 9e42f715264ff158478fa30eaed847f6e131366b ("drivers: net: cpsw: add
phy-handle parsing") saved the "phy-handle" phandle into a new cpsw_priv
field. However, phy connections are per-slave, so the phy_node field should
be in cpsw_slave_data rather than cpsw_priv.
This would go unnoticed in a single emac configuration. But in dual_emac
mode, the last "phy-handle" property parsed for either slave would be used
by both of them, causing them both to refer to the same phy_device.
Fixes: 9e42f715264f ("drivers: net: cpsw: add phy-handle parsing")
Signed-off-by: David Rivshin <drivshin@allworx.com>
---
You may want to consider this for 4.3-stable. It manages to apply
on top of v4.3.3 with 'git am -C1', or I can produce a separate
patch against v4.3.3 if preferred.
drivers/net/ethernet/ti/cpsw.c | 13 ++++++-------
drivers/net/ethernet/ti/cpsw.h | 1 +
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 3b489ca..8ad0ed8 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -363,15 +363,14 @@ static inline void slave_write(struct cpsw_slave *slave, u32 val, u32 offset)
__raw_writel(val, slave->regs + offset);
}
struct cpsw_priv {
spinlock_t lock;
struct platform_device *pdev;
struct net_device *ndev;
- struct device_node *phy_node;
struct napi_struct napi_rx;
struct napi_struct napi_tx;
struct device *dev;
struct cpsw_platform_data data;
struct cpsw_ss_regs __iomem *regs;
struct cpsw_wr_regs __iomem *wr_regs;
u8 __iomem *hw_stats;
@@ -1144,16 +1143,16 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv)
if (priv->data.dual_emac)
cpsw_add_dual_emac_def_ale_entries(priv, slave, slave_port);
else
cpsw_ale_add_mcast(priv->ale, priv->ndev->broadcast,
1 << slave_port, 0, 0, ALE_MCAST_FWD_2);
- if (priv->phy_node)
- slave->phy = of_phy_connect(priv->ndev, priv->phy_node,
+ if (slave->data->phy_node)
+ slave->phy = of_phy_connect(priv->ndev, slave->data->phy_node,
&cpsw_adjust_link, 0, slave->data->phy_if);
else
slave->phy = phy_connect(priv->ndev, slave->data->phy_id,
&cpsw_adjust_link, slave->data->phy_if);
if (IS_ERR(slave->phy)) {
dev_err(priv->dev, "phy %s not found on slave %d\n",
slave->data->phy_id, slave->slave_num);
@@ -1936,20 +1935,19 @@ static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv,
slave->data = data;
slave->regs = regs + slave_reg_ofs;
slave->sliver = regs + sliver_reg_ofs;
slave->port_vlan = data->dual_emac_res_vlan;
}
-static int cpsw_probe_dt(struct cpsw_priv *priv,
+static int cpsw_probe_dt(struct cpsw_platform_data *data,
struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
struct device_node *slave_node;
- struct cpsw_platform_data *data = &priv->data;
int i = 0, ret;
u32 prop;
if (!node)
return -EINVAL;
if (of_property_read_u32(node, "slaves", &prop)) {
@@ -2029,15 +2027,16 @@ static int cpsw_probe_dt(struct cpsw_priv *priv,
int lenp;
const __be32 *parp;
/* This is no slave child node, continue */
if (strcmp(slave_node->name, "slave"))
continue;
- priv->phy_node = of_parse_phandle(slave_node, "phy-handle", 0);
+ slave_data->phy_node = of_parse_phandle(slave_node,
+ "phy-handle", 0);
parp = of_get_property(slave_node, "phy_id", &lenp);
if (of_phy_is_fixed_link(slave_node)) {
struct device_node *phy_node;
struct phy_device *phy_dev;
/* In the case of a fixed PHY, the DT node associated
* to the PHY is the Ethernet MAC DT node.
@@ -2270,15 +2269,15 @@ static int cpsw_probe(struct platform_device *pdev)
* This may be required here for child devices.
*/
pm_runtime_enable(&pdev->dev);
/* Select default pin state */
pinctrl_pm_select_default_state(&pdev->dev);
- if (cpsw_probe_dt(priv, pdev)) {
+ if (cpsw_probe_dt(&priv->data, pdev)) {
dev_err(&pdev->dev, "cpsw: platform data missing\n");
ret = -ENODEV;
goto clean_runtime_disable_ret;
}
data = &priv->data;
if (is_valid_ether_addr(data->slave_data[0].mac_addr)) {
diff --git a/drivers/net/ethernet/ti/cpsw.h b/drivers/net/ethernet/ti/cpsw.h
index 442a703..e50afd1 100644
--- a/drivers/net/ethernet/ti/cpsw.h
+++ b/drivers/net/ethernet/ti/cpsw.h
@@ -14,14 +14,15 @@
#ifndef __CPSW_H__
#define __CPSW_H__
#include <linux/if_ether.h>
#include <linux/phy.h>
struct cpsw_slave_data {
+ struct device_node *phy_node;
char phy_id[MII_BUS_ID_SIZE];
int phy_if;
u8 mac_addr[ETH_ALEN];
u16 dual_emac_res_vlan; /* Reserved VLAN for DualEMAC */
};
struct cpsw_platform_data {
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] drivers: net: cpsw: fix error messages when using phy-handle DT property
2015-12-23 0:36 [PATCH 0/3] drivers: net: cpsw: phy-handle fixes David Rivshin (Allworx)
2015-12-23 0:36 ` [PATCH 1/3] drivers: net: cpsw: fix parsing of phy-handle DT property in dual_emac config David Rivshin (Allworx)
@ 2015-12-23 0:36 ` David Rivshin (Allworx)
2015-12-29 20:30 ` Rob Herring
2015-12-23 0:36 ` [PATCH 3/3] drivers: net: cpsw: use of_phy_connect() in fixed-link case David Rivshin (Allworx)
` (2 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: David Rivshin (Allworx) @ 2015-12-23 0:36 UTC (permalink / raw)
To: netdev
Cc: linux-arm-kernel, linux-omap, devicetree, David Miller,
Heiko Schocher, Mugunthan V N, Markus Brunner, Pascal Speck,
Daniel Trautmann
From: David Rivshin <drivshin@allworx.com>
The phy-handle, phy_id, and fixed-link properties are mutually exclusive,
and only one need be specified. However if phy-handle was specified, an
error message would complain about the lack of phy_id or fixed-link.
Also, if phy-handle was specified and the subsequent of_phy_connect()
failed, the error message still referenced slaved->data->phy_id, which
would be empty. Instead, use the name of the device_node as a useful
identifier.
Fixes: 9e42f715264f ("drivers: net: cpsw: add phy-handle parsing")
Signed-off-by: David Rivshin <drivshin@allworx.com>
---
This would require some adjustments to backport to 4.3-stable due to
other changes in this area. Let me know if you want a version of this
against v4.3.3.
Documentation/devicetree/bindings/net/cpsw.txt | 4 ++--
drivers/net/ethernet/ti/cpsw.c | 17 +++++++++++++----
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
index 28a4781..3033c0f 100644
--- a/Documentation/devicetree/bindings/net/cpsw.txt
+++ b/Documentation/devicetree/bindings/net/cpsw.txt
@@ -46,16 +46,16 @@ Optional properties:
- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
- mac-address : See ethernet.txt file in the same directory
- phy_id : Specifies slave phy id
- phy-handle : See ethernet.txt file in the same directory
Slave sub-nodes:
- fixed-link : See fixed-link.txt file in the same directory
- Either the property phy_id, or the sub-node
- fixed-link can be specified
+
+Note: Exactly one of phy_id, phy-handle, or fixed-link must be specified.
Note: "ti,hwmods" field is used to fetch the base address and irq
resources from TI, omap hwmod data base during device registration.
Future plan is to migrate hwmod data base contents into device tree
blob so that, all the required data will be used from device tree dts
file.
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 8ad0ed8..f9029e7 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1150,16 +1150,19 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv)
if (slave->data->phy_node)
slave->phy = of_phy_connect(priv->ndev, slave->data->phy_node,
&cpsw_adjust_link, 0, slave->data->phy_if);
else
slave->phy = phy_connect(priv->ndev, slave->data->phy_id,
&cpsw_adjust_link, slave->data->phy_if);
if (IS_ERR(slave->phy)) {
- dev_err(priv->dev, "phy %s not found on slave %d\n",
- slave->data->phy_id, slave->slave_num);
+ dev_err(priv->dev, "phy \"%s\" not found on slave %d\n",
+ slave->data->phy_node ?
+ slave->data->phy_node->full_name :
+ slave->data->phy_id,
+ slave->slave_num);
slave->phy = NULL;
} else {
dev_info(priv->dev, "phy found : id is : 0x%x\n",
slave->phy->phy_id);
phy_start(slave->phy);
/* Configure GMII_SEL register */
@@ -2030,15 +2033,19 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
/* This is no slave child node, continue */
if (strcmp(slave_node->name, "slave"))
continue;
slave_data->phy_node = of_parse_phandle(slave_node,
"phy-handle", 0);
parp = of_get_property(slave_node, "phy_id", &lenp);
- if (of_phy_is_fixed_link(slave_node)) {
+ if (slave_data->phy_node) {
+ dev_dbg(&pdev->dev,
+ "slave[%d] using phy-handle=\"%s\"\n",
+ i, slave_data->phy_node->full_name);
+ } else if (of_phy_is_fixed_link(slave_node)) {
struct device_node *phy_node;
struct phy_device *phy_dev;
/* In the case of a fixed PHY, the DT node associated
* to the PHY is the Ethernet MAC DT node.
*/
ret = of_phy_register_fixed_link(slave_node);
@@ -2066,15 +2073,17 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
if (!mdio) {
dev_err(&pdev->dev, "Missing mdio platform device\n");
return -EINVAL;
}
snprintf(slave_data->phy_id, sizeof(slave_data->phy_id),
PHY_ID_FMT, mdio->name, phyid);
} else {
- dev_err(&pdev->dev, "No slave[%d] phy_id or fixed-link property\n", i);
+ dev_err(&pdev->dev,
+ "No slave[%d] phy_id, phy-handle, or fixed-link property\n",
+ i);
goto no_phy_slave;
}
slave_data->phy_if = of_get_phy_mode(slave_node);
if (slave_data->phy_if < 0) {
dev_err(&pdev->dev, "Missing or malformed slave[%d] phy-mode property\n",
i);
return slave_data->phy_if;
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/3] drivers: net: cpsw: fix error messages when using phy-handle DT property
2015-12-23 0:36 ` [PATCH 2/3] drivers: net: cpsw: fix error messages when using phy-handle DT property David Rivshin (Allworx)
@ 2015-12-29 20:30 ` Rob Herring
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2015-12-29 20:30 UTC (permalink / raw)
To: David Rivshin (Allworx)
Cc: netdev, linux-arm-kernel, linux-omap, devicetree, David Miller,
Heiko Schocher, Mugunthan V N, Markus Brunner, Pascal Speck,
Daniel Trautmann
On Tue, Dec 22, 2015 at 07:36:33PM -0500, David Rivshin (Allworx) wrote:
> From: David Rivshin <drivshin@allworx.com>
>
> The phy-handle, phy_id, and fixed-link properties are mutually exclusive,
> and only one need be specified. However if phy-handle was specified, an
> error message would complain about the lack of phy_id or fixed-link.
>
> Also, if phy-handle was specified and the subsequent of_phy_connect()
> failed, the error message still referenced slaved->data->phy_id, which
> would be empty. Instead, use the name of the device_node as a useful
> identifier.
>
> Fixes: 9e42f715264f ("drivers: net: cpsw: add phy-handle parsing")
> Signed-off-by: David Rivshin <drivshin@allworx.com>
> ---
> This would require some adjustments to backport to 4.3-stable due to
> other changes in this area. Let me know if you want a version of this
> against v4.3.3.
>
> Documentation/devicetree/bindings/net/cpsw.txt | 4 ++--
For the binding:
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/3] drivers: net: cpsw: use of_phy_connect() in fixed-link case
2015-12-23 0:36 [PATCH 0/3] drivers: net: cpsw: phy-handle fixes David Rivshin (Allworx)
2015-12-23 0:36 ` [PATCH 1/3] drivers: net: cpsw: fix parsing of phy-handle DT property in dual_emac config David Rivshin (Allworx)
2015-12-23 0:36 ` [PATCH 2/3] drivers: net: cpsw: fix error messages when using phy-handle DT property David Rivshin (Allworx)
@ 2015-12-23 0:36 ` David Rivshin (Allworx)
2015-12-23 17:04 ` [PATCH 0/3] drivers: net: cpsw: phy-handle fixes David Miller
[not found] ` <CABr+WT=oDpp56jouAD57UM8_38geD1MMizZcDnx14maf2ohpCw@mail.gmail.com>
4 siblings, 0 replies; 12+ messages in thread
From: David Rivshin (Allworx) @ 2015-12-23 0:36 UTC (permalink / raw)
To: netdev
Cc: linux-arm-kernel, linux-omap, devicetree, David Miller,
Heiko Schocher, Mugunthan V N, Markus Brunner, Pascal Speck,
Daniel Trautmann
From: David Rivshin <drivshin@allworx.com>
If a fixed-link DT subnode is used, the phy_device was looked up so
that a PHY ID string could be constructed and passed to phy_connect().
This is not necessary, as the device_node can be passed directly to
of_phy_connect() instead. This reuses the same codepath as if the
phy-handle DT property was used.
Signed-off-by: David Rivshin <drivshin@allworx.com>
---
drivers/net/ethernet/ti/cpsw.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index f9029e7..94b818c 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2038,29 +2038,21 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
"phy-handle", 0);
parp = of_get_property(slave_node, "phy_id", &lenp);
if (slave_data->phy_node) {
dev_dbg(&pdev->dev,
"slave[%d] using phy-handle=\"%s\"\n",
i, slave_data->phy_node->full_name);
} else if (of_phy_is_fixed_link(slave_node)) {
- struct device_node *phy_node;
- struct phy_device *phy_dev;
-
/* In the case of a fixed PHY, the DT node associated
* to the PHY is the Ethernet MAC DT node.
*/
ret = of_phy_register_fixed_link(slave_node);
if (ret)
return ret;
- phy_node = of_node_get(slave_node);
- phy_dev = of_phy_find_device(phy_node);
- if (!phy_dev)
- return -ENODEV;
- snprintf(slave_data->phy_id, sizeof(slave_data->phy_id),
- PHY_ID_FMT, phy_dev->bus->id, phy_dev->addr);
+ slave_data->phy_node = of_node_get(slave_node);
} else if (parp) {
u32 phyid;
struct device_node *mdio_node;
struct platform_device *mdio;
if (lenp != (sizeof(__be32) * 2)) {
dev_err(&pdev->dev, "Invalid slave[%d] phy_id property\n", i);
--
2.5.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] drivers: net: cpsw: phy-handle fixes
2015-12-23 0:36 [PATCH 0/3] drivers: net: cpsw: phy-handle fixes David Rivshin (Allworx)
` (2 preceding siblings ...)
2015-12-23 0:36 ` [PATCH 3/3] drivers: net: cpsw: use of_phy_connect() in fixed-link case David Rivshin (Allworx)
@ 2015-12-23 17:04 ` David Miller
2015-12-23 18:35 ` Markus Brunner
[not found] ` <CABr+WT=oDpp56jouAD57UM8_38geD1MMizZcDnx14maf2ohpCw@mail.gmail.com>
4 siblings, 1 reply; 12+ messages in thread
From: David Miller @ 2015-12-23 17:04 UTC (permalink / raw)
To: drivshin.allworx
Cc: netdev, linux-arm-kernel, linux-omap, devicetree, hs,
mugunthanvnm, systemprogrammierung.brunner, kernel, dtrautmann
From: "David Rivshin (Allworx)" <drivshin.allworx@gmail.com>
Date: Tue, 22 Dec 2015 19:36:31 -0500
> Testing by anyone who has real hardware using phy-handle or dual_emac
> with fixed-link would be appreciated.
I'm going to wait for such testing before applying this series.
Thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] drivers: net: cpsw: phy-handle fixes
2015-12-23 17:04 ` [PATCH 0/3] drivers: net: cpsw: phy-handle fixes David Miller
@ 2015-12-23 18:35 ` Markus Brunner
2015-12-23 21:51 ` David Rivshin (Allworx)
0 siblings, 1 reply; 12+ messages in thread
From: Markus Brunner @ 2015-12-23 18:35 UTC (permalink / raw)
To: David Miller
Cc: drivshin.allworx, netdev, linux-arm-kernel, linux-omap,
devicetree, hs, mugunthanvnm, kernel, dtrautmann
On Wednesday 23 December 2015 12:04:25 David Miller wrote:
> From: "David Rivshin (Allworx)" <drivshin.allworx@gmail.com>
> Date: Tue, 22 Dec 2015 19:36:31 -0500
>
> > Testing by anyone who has real hardware using phy-handle or dual_emac
> > with fixed-link would be appreciated.
>
> I'm going to wait for such testing before applying this series.
>
> Thanks.
Successfully tested the following 3 configurations.
1. emac0 with phy_id and emac1 with fixed phy
2. emac0 with phy-handle and emac1 with fixed phy
3. emac0 with fixed phy and emac1 with fixed phy
Below are the affected DT nodes, with one cpsw_emac0 node choosen for each
test.
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <5>;
phy-mode = "mii";
dual_emac_res_vlan = <4093>;
};
&cpsw_emac0 {
phy-mode = "mii";
dual_emac_res_vlan = <4093>;
phy-handle = <&phy0>;
};
&cpsw_emac0 {
phy-mode = "mii";
dual_emac_res_vlan = <4093>;
fixed-link {
speed = <100>;
full-duplex;
};
};
&cpsw_emac1 {
dual_emac_res_vlan = <4094>;
phy-mode = "mii";
fixed-link {
speed = <100>;
full-duplex;
};
};
&davinci_mdio {
status = "okay";
phy0: ethernet-phy@0 {
reg = <5>;
};
};
ps: I don't have access to the board for the next 2 weeks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] drivers: net: cpsw: phy-handle fixes
2015-12-23 18:35 ` Markus Brunner
@ 2015-12-23 21:51 ` David Rivshin (Allworx)
0 siblings, 0 replies; 12+ messages in thread
From: David Rivshin (Allworx) @ 2015-12-23 21:51 UTC (permalink / raw)
To: Markus Brunner, Grygorii Strashko
Cc: David Miller, netdev, linux-arm-kernel, linux-omap, devicetree,
hs, mugunthanvnm, kernel, dtrautmann
On Wed, 23 Dec 2015 19:35:37 +0100
Markus Brunner <systemprogrammierung.brunner@gmail.com> wrote:
> On Wednesday 23 December 2015 12:04:25 David Miller wrote:
> > From: "David Rivshin (Allworx)" <drivshin.allworx@gmail.com>
> > Date: Tue, 22 Dec 2015 19:36:31 -0500
> >
> > > Testing by anyone who has real hardware using phy-handle or
> > > dual_emac with fixed-link would be appreciated.
> >
> > I'm going to wait for such testing before applying this series.
> >
> > Thanks.
>
> Successfully tested the following 3 configurations.
> 1. emac0 with phy_id and emac1 with fixed phy
> 2. emac0 with phy-handle and emac1 with fixed phy
> 3. emac0 with fixed phy and emac1 with fixed phy
Great, thanks for testing. Using the same technique
for the phy-handle case as you, I also just tested:
- (EVMSK) dual emac, phy-handle property in both slaves
I think that covers all the interesting cases.
Dave,
I actually just received a note off-list reporting a problem
with this series on the dm8148-t410 board. So please hold off
applying this series for now. If it turns out to be a real
problem I'll have a v2.
[...]
> &davinci_mdio {
> status = "okay";
> phy0: ethernet-phy@0 {
> reg = <5>;
> };
> };
I was unaware that the davinci-mdio driver creates PHY devices
from child nodes. The davinci-mdio.txt binding documentation
makes no mention of that. By comparison the emac_rockchip.txt
file does talk about it.
Now that I take a closer look at the code, it looks like that
capability was added in commit 0a0ea0687281 ("net: davinci_mdio:
allow to create phys from dt"), but it didn't update the binding.
Grygorii, was that just an oversight, or capability that's not
supposed to be used?
^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <CABr+WT=oDpp56jouAD57UM8_38geD1MMizZcDnx14maf2ohpCw@mail.gmail.com>]
* Re: [PATCH 0/3] drivers: net: cpsw: phy-handle fixes
[not found] ` <CABr+WT=oDpp56jouAD57UM8_38geD1MMizZcDnx14maf2ohpCw@mail.gmail.com>
@ 2015-12-23 21:54 ` David Rivshin (Allworx)
[not found] ` <CABr+WTm=Oo16=qB6dyO6ZhUUz0307ROi=o270Rac2R4W5-usjg@mail.gmail.com>
0 siblings, 1 reply; 12+ messages in thread
From: David Rivshin (Allworx) @ 2015-12-23 21:54 UTC (permalink / raw)
To: Nicolas Chauvet
Cc: netdev, Markus Brunner, devicetree, Daniel Trautmann, linux-omap,
Mugunthan V N, Pascal Speck, Heiko Schocher, David Miller,
linux-arm-kernel
On Wed, 23 Dec 2015 22:20:58 +0100
Nicolas Chauvet <kwizart@gmail.com> wrote:
> 2015-12-23 1:36 GMT+01:00 David Rivshin (Allworx) <
> drivshin.allworx@gmail.com>:
>
> > From: David Rivshin <drivshin@allworx.com>
> >
> > This series is based on the tip of the net tree.
> >
> > The first patch fixes a bug that makes dual_emac mode break if
> > either slave uses the phy-handle property in the devicetree.
> >
> > The second patch fixes some cosmetic problems with error messages,
> > and also makes the binding documentation more explicit.
> >
> > The third patch cleans up the fixed-link case to work like
> > the now-fixed phy-handle case.
> >
> > I have tested on the following hardware configurations:
> > - (EVMSK) dual emac, phy_id property in both slaves
> > - (BeagleBoneBlack) single emac, phy_id property
> > - (custom) single emac, fixed-link subnode
> > Note that I don't have a board which would uses a phy-handle
> > property, though I have used hacked devicetrees to exercise the
> > code paths. Testing by anyone who has real hardware using
> > phy-handle or dual_emac with fixed-link would be appreciated.
> >
> > David Rivshin (3):
> > drivers: net: cpsw: fix parsing of phy-handle DT property in
> > dual_emac config
> > drivers: net: cpsw: fix error messages when using phy-handle DT
> > property
> > drivers: net: cpsw: use of_phy_connect() in fixed-link case
> >
> > Documentation/devicetree/bindings/net/cpsw.txt | 4 +--
> > drivers/net/ethernet/ti/cpsw.c | 40
> > +++++++++++++-------------
> > drivers/net/ethernet/ti/cpsw.h | 1 +
> > 3 files changed, 23 insertions(+), 22 deletions(-)
> >
> >
> This serie failed with me on dm8418 hp-t410 on top of linux-next from
> today whereas the same patch level and same methods without this
> serie is working fine.
> I wasn't able to ping anything on a minimal rootfs with static ip set
> from cmdline from kernel.
>
> Sorry for the lack of details, feel free to add me to any other
> revision of the patch if any.
> I will be able to do more testing next month.
(Sorry for the duplicate, doing a reply-all this time. Not sure why it
looked like a non-list email the first time)
Thanks for testing. I found the dm8148-t410.dts devicetree in the
kernel source, and it uses the phy_id for both slaves, just like the
EVMSK board I tested. So I can't think of an obvious reason for the
problem.
Would you be able to send the 'dmesg' log from right after bootup?
I'm hoping there is an error message in there with some clue.
Just to verify, is your linux-next tree up-to-date? This series needs
to be applied is based on another recent series of 3 patches to cpsw.c.
Although I doubt it would apply cleanly at all without those.
^ permalink raw reply [flat|nested] 12+ messages in thread