netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/4] drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
@ 2013-09-13 21:52 akpm
  2013-09-13 23:58 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: akpm @ 2013-09-13 21:52 UTC (permalink / raw)
  To: davem; +Cc: netdev, akpm, ohering, cascardo, jeffm, jslaby

From: Olaf Hering <ohering@suse.com>
Subject: drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties

Use separate table for alias entries in the ehea module, otherwise the
probe() function will operate on the separate ports instead of the
lhea-"root" entry of the device-tree

Addresses https://bugzilla.novell.com/show_bug.cgi?id=435215

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Olaf Hering <ohering@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/net/ethernet/ibm/ehea/ehea_main.c |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff -puN drivers/net/ethernet/ibm/ehea/ehea_main.c~drivers-net-ethernet-ibm-ehea-ehea_mainc-add-alias-entry-for-portn-properties drivers/net/ethernet/ibm/ehea/ehea_main.c
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c~drivers-net-ethernet-ibm-ehea-ehea_mainc-add-alias-entry-for-portn-properties
+++ a/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -102,6 +102,19 @@ static int ehea_probe_adapter(struct pla
 
 static int ehea_remove(struct platform_device *dev);
 
+static struct of_device_id ehea_module_device_table[] = {
+	{
+		.name = "lhea",
+		.compatible = "IBM,lhea",
+	},
+	{
+		.type = "network",
+		.compatible = "IBM,lhea-ethernet",
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(of, ehea_module_device_table);
+
 static struct of_device_id ehea_device_table[] = {
 	{
 		.name = "lhea",
@@ -109,7 +122,6 @@ static struct of_device_id ehea_device_t
 	},
 	{},
 };
-MODULE_DEVICE_TABLE(of, ehea_device_table);
 
 static struct platform_driver ehea_driver = {
 	.driver = {
_

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 1/4] drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
  2013-09-13 21:52 [patch 1/4] drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties akpm
@ 2013-09-13 23:58 ` David Miller
  2013-09-16 20:55   ` Thadeu Lima de Souza Cascardo
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2013-09-13 23:58 UTC (permalink / raw)
  To: akpm; +Cc: netdev, ohering, cascardo, jeffm, jslaby

From: akpm@linux-foundation.org
Date: Fri, 13 Sep 2013 14:52:01 -0700

> From: Olaf Hering <ohering@suse.com>
> Subject: drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
> 
> Use separate table for alias entries in the ehea module, otherwise the
> probe() function will operate on the separate ports instead of the
> lhea-"root" entry of the device-tree
> 
> Addresses https://bugzilla.novell.com/show_bug.cgi?id=435215
> 
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> Signed-off-by: Olaf Hering <ohering@suse.com>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

This can definitely have consequences and in particular potentially cause
a device to not get probed properly.

Therefore I want an ehea driver maintainer to review and ACK this before
I apply it.

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 1/4] drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
  2013-09-13 23:58 ` David Miller
@ 2013-09-16 20:55   ` Thadeu Lima de Souza Cascardo
  2013-09-16 21:01     ` Thadeu Lima de Souza Cascardo
  0 siblings, 1 reply; 5+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2013-09-16 20:55 UTC (permalink / raw)
  To: David Miller; +Cc: akpm, netdev, ohering, jeffm, jslaby

On Fri, Sep 13, 2013 at 07:58:57PM -0400, David Miller wrote:
> From: akpm@linux-foundation.org
> Date: Fri, 13 Sep 2013 14:52:01 -0700
> 
> > From: Olaf Hering <ohering@suse.com>
> > Subject: drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
> > 
> > Use separate table for alias entries in the ehea module, otherwise the
> > probe() function will operate on the separate ports instead of the
> > lhea-"root" entry of the device-tree
> > 
> > Addresses https://bugzilla.novell.com/show_bug.cgi?id=435215
> > 
> > Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> > Signed-off-by: Olaf Hering <ohering@suse.com>
> > Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> > Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> 
> This can definitely have consequences and in particular potentially cause
> a device to not get probed properly.
> 
> Therefore I want an ehea driver maintainer to review and ACK this before
> I apply it.
> 
> Thanks.
> 

After taking a glance at the patch, it doesn't seem to change probing,
since it keeps the same table for the driver itself. It seems this only
changes alias, so the driver will be loaded under some device-tree
layouts not currently matched by the current alias.

That last part is the one that bothers me. I still need to find a system
where the current modalias won't work and this patch is needed. I'll see
if I can put more effort into that and find a system as described in the
bug.

Regards.
Thadeu Cascardo.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 1/4] drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
  2013-09-16 20:55   ` Thadeu Lima de Souza Cascardo
@ 2013-09-16 21:01     ` Thadeu Lima de Souza Cascardo
  2013-09-17  1:29       ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2013-09-16 21:01 UTC (permalink / raw)
  To: David Miller; +Cc: akpm, netdev, ohering, jeffm, jslaby

On Mon, Sep 16, 2013 at 05:55:43PM -0300, Thadeu Lima de Souza Cascardo wrote:
> On Fri, Sep 13, 2013 at 07:58:57PM -0400, David Miller wrote:
> > From: akpm@linux-foundation.org
> > Date: Fri, 13 Sep 2013 14:52:01 -0700
> > 
> > > From: Olaf Hering <ohering@suse.com>
> > > Subject: drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
> > > 
> > > Use separate table for alias entries in the ehea module, otherwise the
> > > probe() function will operate on the separate ports instead of the
> > > lhea-"root" entry of the device-tree
> > > 
> > > Addresses https://bugzilla.novell.com/show_bug.cgi?id=435215
> > > 
> > > Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> > > Signed-off-by: Olaf Hering <ohering@suse.com>
> > > Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> > > Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> > > Cc: "David S. Miller" <davem@davemloft.net>
> > > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > 
> > This can definitely have consequences and in particular potentially cause
> > a device to not get probed properly.
> > 
> > Therefore I want an ehea driver maintainer to review and ACK this before
> > I apply it.
> > 
> > Thanks.
> > 
> 
> After taking a glance at the patch, it doesn't seem to change probing,
> since it keeps the same table for the driver itself. It seems this only
> changes alias, so the driver will be loaded under some device-tree
> layouts not currently matched by the current alias.
> 
> That last part is the one that bothers me. I still need to find a system
> where the current modalias won't work and this patch is needed. I'll see
> if I can put more effort into that and find a system as described in the
> bug.
> 
> Regards.
> Thadeu Cascardo.

Sorry for the noise. I just checked again the bug, and had to read
between the lines that this issue might happen with the generation of
initrd, when the scripts check for /sys/class/net/eth0/device/modalias,
which links to the port device at
/sys/devices/ibmebus/23c00400.lhea/port0/.

I think that should be clarified in the log message. Besides that, since
this has also been in the field for a long time:

Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>

Regards.
Cascardo.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 1/4] drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
  2013-09-16 21:01     ` Thadeu Lima de Souza Cascardo
@ 2013-09-17  1:29       ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2013-09-17  1:29 UTC (permalink / raw)
  To: cascardo; +Cc: akpm, netdev, ohering, jeffm, jslaby

From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Mon, 16 Sep 2013 18:01:41 -0300

> Sorry for the noise. I just checked again the bug, and had to read
> between the lines that this issue might happen with the generation of
> initrd, when the scripts check for /sys/class/net/eth0/device/modalias,
> which links to the port device at
> /sys/devices/ibmebus/23c00400.lhea/port0/.
> 
> I think that should be clarified in the log message. Besides that, since
> this has also been in the field for a long time:
> 
> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>

I adjusted the commit message and applied this, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-17  1:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 21:52 [patch 1/4] drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties akpm
2013-09-13 23:58 ` David Miller
2013-09-16 20:55   ` Thadeu Lima de Souza Cascardo
2013-09-16 21:01     ` Thadeu Lima de Souza Cascardo
2013-09-17  1:29       ` 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).