* [PATCH 1/7] net: nps_enet: Fix module autoload
2016-10-17 14:05 [PATCH 0/7] net: Fix module autoload for several platform drivers Javier Martinez Canillas
@ 2016-10-17 14:05 ` Javier Martinez Canillas
2016-10-17 14:05 ` [PATCH 2/7] net: ethernet: nb8800: " Javier Martinez Canillas
` (6 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 14:05 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Arnd Bergmann, Lada Trimasova,
Noam Camus, Elad Kanfi, David S. Miller, netdev, Gilad Ben-Yossef
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/net/ethernet/ezchip/nps_enet.ko | grep alias
$
After this patch:
$ modinfo drivers/net/ethernet/ezchip/nps_enet.ko | grep alias
alias: of:N*T*Cezchip,nps-mgt-enetC*
alias: of:N*T*Cezchip,nps-mgt-enet
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/net/ethernet/ezchip/nps_enet.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ezchip/nps_enet.c b/drivers/net/ethernet/ezchip/nps_enet.c
index f928e6f79c89..223f35cc034c 100644
--- a/drivers/net/ethernet/ezchip/nps_enet.c
+++ b/drivers/net/ethernet/ezchip/nps_enet.c
@@ -669,6 +669,7 @@ static const struct of_device_id nps_enet_dt_ids[] = {
{ .compatible = "ezchip,nps-mgt-enet" },
{ /* Sentinel */ }
};
+MODULE_DEVICE_TABLE(of, nps_enet_dt_ids);
static struct platform_driver nps_enet_driver = {
.probe = nps_enet_probe,
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/7] net: ethernet: nb8800: Fix module autoload
2016-10-17 14:05 [PATCH 0/7] net: Fix module autoload for several platform drivers Javier Martinez Canillas
2016-10-17 14:05 ` [PATCH 1/7] net: nps_enet: Fix module autoload Javier Martinez Canillas
@ 2016-10-17 14:05 ` Javier Martinez Canillas
2016-10-17 14:09 ` Måns Rullgård
2016-10-17 14:05 ` [PATCH 3/7] net: hns: Fix hns_dsaf module autoload for OF registration Javier Martinez Canillas
` (5 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 14:05 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Måns Rullgård, netdev,
David S. Miller, Jarod Wilson, Arnd Bergmann, Sebastian Frias,
Florian Fainelli, Philippe Reynes
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ $ modinfo drivers/net/ethernet/aurora/nb8800.ko | grep alias
$
After this patch:
$ modinfo drivers/net/ethernet/aurora/nb8800.ko | grep alias
alias: of:N*T*Csigma,smp8734-ethernetC*
alias: of:N*T*Csigma,smp8734-ethernet
alias: of:N*T*Csigma,smp8642-ethernetC*
alias: of:N*T*Csigma,smp8642-ethernet
alias: of:N*T*Caurora,nb8800C*
alias: of:N*T*Caurora,nb8800
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/net/ethernet/aurora/nb8800.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
index 453dc0967125..d5f2ad1a5a30 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -1357,6 +1357,7 @@ static const struct of_device_id nb8800_dt_ids[] = {
},
{ }
};
+MODULE_DEVICE_TABLE(of, nb8800_dt_ids);
static int nb8800_probe(struct platform_device *pdev)
{
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 2/7] net: ethernet: nb8800: Fix module autoload
2016-10-17 14:05 ` [PATCH 2/7] net: ethernet: nb8800: " Javier Martinez Canillas
@ 2016-10-17 14:09 ` Måns Rullgård
0 siblings, 0 replies; 11+ messages in thread
From: Måns Rullgård @ 2016-10-17 14:09 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, netdev, David S. Miller, Jarod Wilson,
Arnd Bergmann, Sebastian Frias, Florian Fainelli, Philippe Reynes
Javier Martinez Canillas <javier@osg.samsung.com> writes:
> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
>
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
>
> Before this patch:
>
> $ $ modinfo drivers/net/ethernet/aurora/nb8800.ko | grep alias
> $
>
> After this patch:
>
> $ modinfo drivers/net/ethernet/aurora/nb8800.ko | grep alias
> alias: of:N*T*Csigma,smp8734-ethernetC*
> alias: of:N*T*Csigma,smp8734-ethernet
> alias: of:N*T*Csigma,smp8642-ethernetC*
> alias: of:N*T*Csigma,smp8642-ethernet
> alias: of:N*T*Caurora,nb8800C*
> alias: of:N*T*Caurora,nb8800
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Mans Rullgard <mans@mansr.com>
> ---
>
> drivers/net/ethernet/aurora/nb8800.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
> index 453dc0967125..d5f2ad1a5a30 100644
> --- a/drivers/net/ethernet/aurora/nb8800.c
> +++ b/drivers/net/ethernet/aurora/nb8800.c
> @@ -1357,6 +1357,7 @@ static const struct of_device_id nb8800_dt_ids[] = {
> },
> { }
> };
> +MODULE_DEVICE_TABLE(of, nb8800_dt_ids);
>
> static int nb8800_probe(struct platform_device *pdev)
> {
> --
--
Måns Rullgård
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/7] net: hns: Fix hns_dsaf module autoload for OF registration
2016-10-17 14:05 [PATCH 0/7] net: Fix module autoload for several platform drivers Javier Martinez Canillas
2016-10-17 14:05 ` [PATCH 1/7] net: nps_enet: Fix module autoload Javier Martinez Canillas
2016-10-17 14:05 ` [PATCH 2/7] net: ethernet: nb8800: " Javier Martinez Canillas
@ 2016-10-17 14:05 ` Javier Martinez Canillas
2016-10-17 14:05 ` [PATCH 4/7] net: qcom/emac: Fix " Javier Martinez Canillas
` (4 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 14:05 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, netdev, Kejian Yan, Daode Huang,
Salil Mehta, Yisen Zhuang, Wei Yongjun, David S. Miller, oulijun,
Qianqian Xie
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/net/ethernet/hisilicon/hns/hns_dsaf.ko | grep alias
alias: acpi*:HISI00B2:*
alias: acpi*:HISI00B1:*
After this patch:
$ modinfo drivers/net/ethernet/hisilicon/hns/hns_dsaf.ko | grep alias
alias: acpi*:HISI00B2:*
alias: acpi*:HISI00B1:*
alias: of:N*T*Chisilicon,hns-dsaf-v2C*
alias: of:N*T*Chisilicon,hns-dsaf-v2
alias: of:N*T*Chisilicon,hns-dsaf-v1C*
alias: of:N*T*Chisilicon,hns-dsaf-v1
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
index 8d70377f6624..8ea3d95fa483 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
@@ -2751,6 +2751,7 @@ static const struct of_device_id g_dsaf_match[] = {
{.compatible = "hisilicon,hns-dsaf-v2"},
{}
};
+MODULE_DEVICE_TABLE(of, g_dsaf_match);
static struct platform_driver g_dsaf_driver = {
.probe = hns_dsaf_probe,
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 4/7] net: qcom/emac: Fix module autoload for OF registration
2016-10-17 14:05 [PATCH 0/7] net: Fix module autoload for several platform drivers Javier Martinez Canillas
` (2 preceding siblings ...)
2016-10-17 14:05 ` [PATCH 3/7] net: hns: Fix hns_dsaf module autoload for OF registration Javier Martinez Canillas
@ 2016-10-17 14:05 ` Javier Martinez Canillas
2016-10-17 14:40 ` Timur Tabi
2016-10-17 14:05 ` [PATCH 5/7] net: hisilicon: Fix hns_mdio " Javier Martinez Canillas
` (3 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 14:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Javier Martinez Canillas, netdev, Timur Tabi
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/net/ethernet/qualcomm/emac/qcom-emac.ko | grep alias
alias: platform:qcom-emac
After this patch:
$ modinfo drivers/net/ethernet/qualcomm/emac/qcom-emac.ko | grep alias
alias: platform:qcom-emac
alias: of:N*T*Cqcom,fsm9900-emacC*
alias: of:N*T*Cqcom,fsm9900-emac
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/net/ethernet/qualcomm/emac/emac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c
index 9bf3b2b82e95..4fede4b86538 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac.c
@@ -575,6 +575,7 @@ static const struct of_device_id emac_dt_match[] = {
},
{}
};
+MODULE_DEVICE_TABLE(of, emac_dt_match);
#if IS_ENABLED(CONFIG_ACPI)
static const struct acpi_device_id emac_acpi_match[] = {
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 4/7] net: qcom/emac: Fix module autoload for OF registration
2016-10-17 14:05 ` [PATCH 4/7] net: qcom/emac: Fix " Javier Martinez Canillas
@ 2016-10-17 14:40 ` Timur Tabi
0 siblings, 0 replies; 11+ messages in thread
From: Timur Tabi @ 2016-10-17 14:40 UTC (permalink / raw)
To: Javier Martinez Canillas, linux-kernel; +Cc: netdev
Javier Martinez Canillas wrote:
> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
>
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
>
> Before this patch:
>
> $ modinfo drivers/net/ethernet/qualcomm/emac/qcom-emac.ko | grep alias
> alias: platform:qcom-emac
>
> After this patch:
>
> $ modinfo drivers/net/ethernet/qualcomm/emac/qcom-emac.ko | grep alias
> alias: platform:qcom-emac
> alias: of:N*T*Cqcom,fsm9900-emacC*
> alias: of:N*T*Cqcom,fsm9900-emac
>
> Signed-off-by: Javier Martinez Canillas<javier@osg.samsung.com>
Acked-by: Timur Tabi <timur@codeaurora.org>
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, hosted by The Linux Foundation.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 5/7] net: hisilicon: Fix hns_mdio module autoload for OF registration
2016-10-17 14:05 [PATCH 0/7] net: Fix module autoload for several platform drivers Javier Martinez Canillas
` (3 preceding siblings ...)
2016-10-17 14:05 ` [PATCH 4/7] net: qcom/emac: Fix " Javier Martinez Canillas
@ 2016-10-17 14:05 ` Javier Martinez Canillas
2016-10-17 14:05 ` [PATCH 6/7] net: dsa: b53: Fix module autoload Javier Martinez Canillas
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 14:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Javier Martinez Canillas, netdev, Salil Mehta, Yisen Zhuang
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/net/ethernet/hisilicon//hns_mdio.ko | grep alias
alias: platform:Hi-HNS_MDIO
alias: acpi*:HISI0141:*
After this patch:
$ modinfo drivers/net/ethernet/hisilicon//hns_mdio.ko | grep alias
alias: platform:Hi-HNS_MDIO
alias: of:N*T*Chisilicon,hns-mdioC*
alias: of:N*T*Chisilicon,hns-mdio
alias: of:N*T*Chisilicon,mdioC*
alias: of:N*T*Chisilicon,mdio
alias: acpi*:HISI0141:*
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/net/ethernet/hisilicon/hns_mdio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/hisilicon/hns_mdio.c b/drivers/net/ethernet/hisilicon/hns_mdio.c
index 33f4c483af0f..501eb2090ca6 100644
--- a/drivers/net/ethernet/hisilicon/hns_mdio.c
+++ b/drivers/net/ethernet/hisilicon/hns_mdio.c
@@ -563,6 +563,7 @@ static const struct of_device_id hns_mdio_match[] = {
{.compatible = "hisilicon,hns-mdio"},
{}
};
+MODULE_DEVICE_TABLE(of, hns_mdio_match);
static const struct acpi_device_id hns_mdio_acpi_match[] = {
{ "HISI0141", 0 },
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 6/7] net: dsa: b53: Fix module autoload
2016-10-17 14:05 [PATCH 0/7] net: Fix module autoload for several platform drivers Javier Martinez Canillas
` (4 preceding siblings ...)
2016-10-17 14:05 ` [PATCH 5/7] net: hisilicon: Fix hns_mdio " Javier Martinez Canillas
@ 2016-10-17 14:05 ` Javier Martinez Canillas
2016-10-17 14:05 ` [PATCH 7/7] net: dsa: bcm_sf2: Fix module autoload for OF registration Javier Martinez Canillas
2016-10-17 17:03 ` [PATCH 0/7] net: Fix module autoload for several platform drivers David Miller
7 siblings, 0 replies; 11+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 14:05 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, netdev, Andrew Lunn, Vivien Didelot,
Florian Fainelli
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/net/dsa/b53/b53_mmap.ko | grep alias
$
After this patch:
$ modinfo drivers/net/dsa/b53/b53_mmap.ko | grep alias
alias: of:N*T*Cbrcm,bcm63xx-switchC*
alias: of:N*T*Cbrcm,bcm63xx-switch
alias: of:N*T*Cbrcm,bcm6368-switchC*
alias: of:N*T*Cbrcm,bcm6368-switch
alias: of:N*T*Cbrcm,bcm6328-switchC*
alias: of:N*T*Cbrcm,bcm6328-switch
alias: of:N*T*Cbrcm,bcm3384-switchC*
alias: of:N*T*Cbrcm,bcm3384-switch
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/net/dsa/b53/b53_mmap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index 76fb8552c9d9..ef63d24fef81 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -256,6 +256,7 @@ static const struct of_device_id b53_mmap_of_table[] = {
{ .compatible = "brcm,bcm63xx-switch" },
{ /* sentinel */ },
};
+MODULE_DEVICE_TABLE(of, b53_mmap_of_table);
static struct platform_driver b53_mmap_driver = {
.probe = b53_mmap_probe,
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 7/7] net: dsa: bcm_sf2: Fix module autoload for OF registration
2016-10-17 14:05 [PATCH 0/7] net: Fix module autoload for several platform drivers Javier Martinez Canillas
` (5 preceding siblings ...)
2016-10-17 14:05 ` [PATCH 6/7] net: dsa: b53: Fix module autoload Javier Martinez Canillas
@ 2016-10-17 14:05 ` Javier Martinez Canillas
2016-10-17 17:03 ` [PATCH 0/7] net: Fix module autoload for several platform drivers David Miller
7 siblings, 0 replies; 11+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 14:05 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, netdev, Florian Fainelli,
Vivien Didelot, Andrew Lunn
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/net/dsa/bcm_sf2.ko | grep alias
alias: platform:brcm-sf2
After this patch:
$ modinfo drivers/net/dsa/bcm_sf2.ko | grep alias
alias: platform:brcm-sf2
alias: of:N*T*Cbrcm,bcm7445-switch-v4.0C*
alias: of:N*T*Cbrcm,bcm7445-switch-v4.0
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/net/dsa/bcm_sf2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index e218887f18b7..0427009bc924 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -1158,6 +1158,7 @@ static const struct of_device_id bcm_sf2_of_match[] = {
{ .compatible = "brcm,bcm7445-switch-v4.0" },
{ /* sentinel */ },
};
+MODULE_DEVICE_TABLE(of, bcm_sf2_of_match);
static struct platform_driver bcm_sf2_driver = {
.probe = bcm_sf2_sw_probe,
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 0/7] net: Fix module autoload for several platform drivers
2016-10-17 14:05 [PATCH 0/7] net: Fix module autoload for several platform drivers Javier Martinez Canillas
` (6 preceding siblings ...)
2016-10-17 14:05 ` [PATCH 7/7] net: dsa: bcm_sf2: Fix module autoload for OF registration Javier Martinez Canillas
@ 2016-10-17 17:03 ` David Miller
7 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2016-10-17 17:03 UTC (permalink / raw)
To: javier
Cc: linux-kernel, arnd, timur, noamca, xieqianqian, vivien.didelot,
Lada.Trimasova, huangdaode, sf84, f.fainelli, eladkan,
weiyongjun1, salil.mehta, yisen.zhuang, andrew, yankejian,
tremyfr, mans, netdev, giladby, jarod, oulijun
From: Javier Martinez Canillas <javier@osg.samsung.com>
Date: Mon, 17 Oct 2016 11:05:39 -0300
> I noticed that module autoload won't be working in a bunch of platform
> drivers in the net subsystem and this patch series contains the fixes.
Looks good, series applied, thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread