Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1623088

Re: [PATCHv5] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCHv5] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver
Date 2017-04-13 16:50 +0200
Message-ID <tvOem-4jh-3@gated-at.bofh.it> (permalink)
References <tvHwd-87E-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Juergen Borleis <jbe@pengutronix.de>
Date: Thu, 13 Apr 2017 09:33:39 +0200

> Changes in v5:
> 
> - missing include file to 'net/dsa/tag_lan9303.c' added

This still doesn't build cleanly.

drivers/net/dsa/lan9303_mdio.o: In function `mdio_module_init':
lan9303_mdio.c:(.init.text+0x0): multiple definition of `init_module'
drivers/net/dsa/lan9303_i2c.o:lan9303_i2c.c:(.init.text+0x0): first defined here
drivers/net/dsa/lan9303_mdio.o: In function `mdio_module_exit':
lan9303_mdio.c:(.exit.text+0x0): multiple definition of `cleanup_module'
drivers/net/dsa/lan9303_i2c.o:lan9303_i2c.c:(.exit.text+0x0): first defined here
scripts/Makefile.build:540: recipe for target 'drivers/net/dsa/lan9303.o' failed

Please test with NET_DSA_SMSC_LAN9303=m, NET_DSA_SMSC_LAN9303_I2C=y and
NET_DSA_SMSC_LAN9303_MDIO=y as that is what I used to reproduce the
problem above.

You cannot really use module_i2c_driver() and mdio_module_driver()
at the same time in the same driver module.

You're going to have to have a common module init function which you
code up by hand, which conditionally handles I2C and MDIO based
probing based upon Kconfig symbol settings.

And please more sufficiently test your builds.

Thank you.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv5] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver Juergen Borleis <jbe@pengutronix.de> - 2017-04-13 09:40 +0200
  [PATCH v5 3/4] net: dsa: LAN9303: add I2C managed mode support Juergen Borleis <jbe@pengutronix.de> - 2017-04-13 09:40 +0200
  [PATCH v5 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303 Juergen Borleis <jbe@pengutronix.de> - 2017-04-13 09:40 +0200
  Re: [PATCHv5] net: dsa: add SMSC/Microchip LAN9303 three port  ethernet switch driver David Miller <davem@davemloft.net> - 2017-04-13 16:50 +0200
    Re: [PATCHv5] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver Juergen Borleis <jbe@pengutronix.de> - 2017-04-18 11:20 +0200

csiph-web