Message ID | 20130913215201.6501131C1BF@corp2gmr1-1.hot.corp.google.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
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. -- 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
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. -- 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
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. -- 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
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. -- 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
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 = {