* [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240
@ 2016-02-11 10:44 Sascha Hauer
2016-02-11 10:44 ` [PATCH 2/2] net: dsa: remove phy_disconnect from error path Sascha Hauer
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Sascha Hauer @ 2016-02-11 10:44 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, Andrew Lunn, Guenter Roeck, Sascha Hauer
The Marvell 88E6240 has been tested successfully without further
changes. Add entry to the table of supported devices.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/net/dsa/mv88e6352.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/mv88e6352.c b/drivers/net/dsa/mv88e6352.c
index cc6c545..a47f52f 100644
--- a/drivers/net/dsa/mv88e6352.c
+++ b/drivers/net/dsa/mv88e6352.c
@@ -25,6 +25,7 @@
static const struct mv88e6xxx_switch_id mv88e6352_table[] = {
{ PORT_SWITCH_ID_6172, "Marvell 88E6172" },
{ PORT_SWITCH_ID_6176, "Marvell 88E6176" },
+ { PORT_SWITCH_ID_6240, "Marvell 88E6240" },
{ PORT_SWITCH_ID_6320, "Marvell 88E6320" },
{ PORT_SWITCH_ID_6320_A1, "Marvell 88E6320 (A1)" },
{ PORT_SWITCH_ID_6320_A2, "Marvell 88e6320 (A2)" },
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] net: dsa: remove phy_disconnect from error path
2016-02-11 10:44 [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240 Sascha Hauer
@ 2016-02-11 10:44 ` Sascha Hauer
2016-02-11 15:39 ` Vivien Didelot
` (2 more replies)
2016-02-11 15:45 ` [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240 Andrew Lunn
2016-02-16 21:05 ` David Miller
2 siblings, 3 replies; 8+ messages in thread
From: Sascha Hauer @ 2016-02-11 10:44 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, Andrew Lunn, Guenter Roeck, Sascha Hauer
The phy has not been initialized, disconnecting it in the error
path results in a NULL pointer exception. Drop the phy_disconnect
from the error path.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
net/dsa/slave.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 40b9ca7..91e3b2f 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1194,7 +1194,6 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent,
if (ret) {
netdev_err(master, "error %d registering interface %s\n",
ret, slave_dev->name);
- phy_disconnect(p->phy);
ds->ports[port] = NULL;
free_netdev(slave_dev);
return ret;
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] net: dsa: remove phy_disconnect from error path
2016-02-11 10:44 ` [PATCH 2/2] net: dsa: remove phy_disconnect from error path Sascha Hauer
@ 2016-02-11 15:39 ` Vivien Didelot
2016-02-15 8:52 ` Neil Armstrong
2016-02-11 15:48 ` Andrew Lunn
2016-02-16 21:05 ` David Miller
2 siblings, 1 reply; 8+ messages in thread
From: Vivien Didelot @ 2016-02-11 15:39 UTC (permalink / raw)
To: Sascha Hauer, netdev
Cc: linux-kernel, Andrew Lunn, Guenter Roeck, Sascha Hauer, narmstrong
Hi Sascha,
Sascha Hauer <s.hauer@pengutronix.de> writes:
> The phy has not been initialized, disconnecting it in the error
> path results in a NULL pointer exception. Drop the phy_disconnect
> from the error path.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> net/dsa/slave.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> index 40b9ca7..91e3b2f 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/slave.c
> @@ -1194,7 +1194,6 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent,
> if (ret) {
> netdev_err(master, "error %d registering interface %s\n",
> ret, slave_dev->name);
> - phy_disconnect(p->phy);
> ds->ports[port] = NULL;
> free_netdev(slave_dev);
> return ret;
I'm adding Neil in the loop, since he did some work similar to this, if
I'm not mistaken.
Thanks,
-v
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240
2016-02-11 10:44 [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240 Sascha Hauer
2016-02-11 10:44 ` [PATCH 2/2] net: dsa: remove phy_disconnect from error path Sascha Hauer
@ 2016-02-11 15:45 ` Andrew Lunn
2016-02-16 21:05 ` David Miller
2 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2016-02-11 15:45 UTC (permalink / raw)
To: Sascha Hauer; +Cc: netdev, linux-kernel, Guenter Roeck
On Thu, Feb 11, 2016 at 11:44:48AM +0100, Sascha Hauer wrote:
> The Marvell 88E6240 has been tested successfully without further
> changes. Add entry to the table of supported devices.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Thanks
Andrew
> ---
> drivers/net/dsa/mv88e6352.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/dsa/mv88e6352.c b/drivers/net/dsa/mv88e6352.c
> index cc6c545..a47f52f 100644
> --- a/drivers/net/dsa/mv88e6352.c
> +++ b/drivers/net/dsa/mv88e6352.c
> @@ -25,6 +25,7 @@
> static const struct mv88e6xxx_switch_id mv88e6352_table[] = {
> { PORT_SWITCH_ID_6172, "Marvell 88E6172" },
> { PORT_SWITCH_ID_6176, "Marvell 88E6176" },
> + { PORT_SWITCH_ID_6240, "Marvell 88E6240" },
> { PORT_SWITCH_ID_6320, "Marvell 88E6320" },
> { PORT_SWITCH_ID_6320_A1, "Marvell 88E6320 (A1)" },
> { PORT_SWITCH_ID_6320_A2, "Marvell 88e6320 (A2)" },
> --
> 2.7.0.rc3
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] net: dsa: remove phy_disconnect from error path
2016-02-11 10:44 ` [PATCH 2/2] net: dsa: remove phy_disconnect from error path Sascha Hauer
2016-02-11 15:39 ` Vivien Didelot
@ 2016-02-11 15:48 ` Andrew Lunn
2016-02-16 21:05 ` David Miller
2 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2016-02-11 15:48 UTC (permalink / raw)
To: Sascha Hauer; +Cc: netdev, linux-kernel, Guenter Roeck
On Thu, Feb 11, 2016 at 11:44:49AM +0100, Sascha Hauer wrote:
> The phy has not been initialized, disconnecting it in the error
> path results in a NULL pointer exception. Drop the phy_disconnect
> from the error path.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Hi Sascha
The fix looks correct, since the phy should be bound to the device in
the following dsa_slave_phy_setup() call.
I'm not sure if Neil also fixed this...
Anyway,
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
> ---
> net/dsa/slave.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> index 40b9ca7..91e3b2f 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/slave.c
> @@ -1194,7 +1194,6 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent,
> if (ret) {
> netdev_err(master, "error %d registering interface %s\n",
> ret, slave_dev->name);
> - phy_disconnect(p->phy);
> ds->ports[port] = NULL;
> free_netdev(slave_dev);
> return ret;
> --
> 2.7.0.rc3
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] net: dsa: remove phy_disconnect from error path
2016-02-11 15:39 ` Vivien Didelot
@ 2016-02-15 8:52 ` Neil Armstrong
0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2016-02-15 8:52 UTC (permalink / raw)
To: Vivien Didelot, Sascha Hauer, netdev
Cc: linux-kernel, Andrew Lunn, Guenter Roeck
On 02/11/2016 04:39 PM, Vivien Didelot wrote:
> Hi Sascha,
>
> Sascha Hauer <s.hauer@pengutronix.de> writes:
>
>> The phy has not been initialized, disconnecting it in the error
>> path results in a NULL pointer exception. Drop the phy_disconnect
>> from the error path.
>>
>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>> ---
>> net/dsa/slave.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
>> index 40b9ca7..91e3b2f 100644
>> --- a/net/dsa/slave.c
>> +++ b/net/dsa/slave.c
>> @@ -1194,7 +1194,6 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent,
>> if (ret) {
>> netdev_err(master, "error %d registering interface %s\n",
>> ret, slave_dev->name);
>> - phy_disconnect(p->phy);
>> ds->ports[port] = NULL;
>> free_netdev(slave_dev);
>> return ret;
>
> I'm adding Neil in the loop, since he did some work similar to this, if
> I'm not mistaken.
>
> Thanks,
> -v
>
He's right, the phy is not yet created in this error path.
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Thanks Vivien,
Neil
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240
2016-02-11 10:44 [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240 Sascha Hauer
2016-02-11 10:44 ` [PATCH 2/2] net: dsa: remove phy_disconnect from error path Sascha Hauer
2016-02-11 15:45 ` [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240 Andrew Lunn
@ 2016-02-16 21:05 ` David Miller
2 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2016-02-16 21:05 UTC (permalink / raw)
To: s.hauer; +Cc: netdev, linux-kernel, andrew, linux
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Thu, 11 Feb 2016 11:44:48 +0100
> The Marvell 88E6240 has been tested successfully without further
> changes. Add entry to the table of supported devices.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Applied.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] net: dsa: remove phy_disconnect from error path
2016-02-11 10:44 ` [PATCH 2/2] net: dsa: remove phy_disconnect from error path Sascha Hauer
2016-02-11 15:39 ` Vivien Didelot
2016-02-11 15:48 ` Andrew Lunn
@ 2016-02-16 21:05 ` David Miller
2 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2016-02-16 21:05 UTC (permalink / raw)
To: s.hauer; +Cc: netdev, linux-kernel, andrew, linux
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Thu, 11 Feb 2016 11:44:49 +0100
> The phy has not been initialized, disconnecting it in the error
> path results in a NULL pointer exception. Drop the phy_disconnect
> from the error path.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Applied.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-02-16 21:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-11 10:44 [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240 Sascha Hauer
2016-02-11 10:44 ` [PATCH 2/2] net: dsa: remove phy_disconnect from error path Sascha Hauer
2016-02-11 15:39 ` Vivien Didelot
2016-02-15 8:52 ` Neil Armstrong
2016-02-11 15:48 ` Andrew Lunn
2016-02-16 21:05 ` David Miller
2016-02-11 15:45 ` [PATCH 1/2] net: dsa: mv88e6xxx: Add support for Marvell 88E6240 Andrew Lunn
2016-02-16 21:05 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).