diff mbox series

[2/2] net: ethernet: ti: build cpsw-common for switchdev

Message ID 20191211125643.1987157-2-arnd@arndb.de
State Accepted
Commit ed56dd8f60cf3d56ca1416288b09eec27bdd5413
Headers show
Series [1/2] net: ethernet: ti: select PAGE_POOL for switchdev driver | expand

Commit Message

Arnd Bergmann Dec. 11, 2019, 12:56 p.m. UTC
Without the common part of the driver, the new file fails to link:

drivers/net/ethernet/ti/cpsw_new.o: In function `cpsw_probe':
cpsw_new.c:(.text+0x312c): undefined reference to `ti_cm_get_macid'

Use the same Makefile hack as before, and build cpsw-common.o for
any driver that needs it.

Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/net/ethernet/ti/Makefile | 1 +
 1 file changed, 1 insertion(+)

-- 
2.20.0

Comments

Grygorii Strashko Dec. 11, 2019, 1:19 p.m. UTC | #1
On 11/12/2019 14:56, Arnd Bergmann wrote:
> Without the common part of the driver, the new file fails to link:

> 

> drivers/net/ethernet/ti/cpsw_new.o: In function `cpsw_probe':

> cpsw_new.c:(.text+0x312c): undefined reference to `ti_cm_get_macid'

> 

> Use the same Makefile hack as before, and build cpsw-common.o for

> any driver that needs it.

> 

> Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> ---

>   drivers/net/ethernet/ti/Makefile | 1 +

>   1 file changed, 1 insertion(+)

> 

> diff --git a/drivers/net/ethernet/ti/Makefile b/drivers/net/ethernet/ti/Makefile

> index d34df8e5cf94..ecf776ad8689 100644

> --- a/drivers/net/ethernet/ti/Makefile

> +++ b/drivers/net/ethernet/ti/Makefile

> @@ -5,6 +5,7 @@

>   

>   obj-$(CONFIG_TI_CPSW) += cpsw-common.o

>   obj-$(CONFIG_TI_DAVINCI_EMAC) += cpsw-common.o

> +obj-$(CONFIG_TI_CPSW_SWITCHDEV) += cpsw-common.o

>   

>   obj-$(CONFIG_TLAN) += tlan.o

>   obj-$(CONFIG_CPMAC) += cpmac.o

> 


Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>


-- 
Best regards,
grygorii
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ti/Makefile b/drivers/net/ethernet/ti/Makefile
index d34df8e5cf94..ecf776ad8689 100644
--- a/drivers/net/ethernet/ti/Makefile
+++ b/drivers/net/ethernet/ti/Makefile
@@ -5,6 +5,7 @@ 
 
 obj-$(CONFIG_TI_CPSW) += cpsw-common.o
 obj-$(CONFIG_TI_DAVINCI_EMAC) += cpsw-common.o
+obj-$(CONFIG_TI_CPSW_SWITCHDEV) += cpsw-common.o
 
 obj-$(CONFIG_TLAN) += tlan.o
 obj-$(CONFIG_CPMAC) += cpmac.o