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


Groups > linux.kernel > #1579820

Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency
Date 2017-02-13 15:40 +0100
Message-ID <tapXj-4TG-21@gated-at.bofh.it> (permalink)
References (1 earlier) <t9iEy-3nS-11@gated-at.bofh.it> <t9nEd-6Co-11@gated-at.bofh.it> <t9pG1-87P-1@gated-at.bofh.it> <t9qsq-8pJ-3@gated-at.bofh.it> <t9r58-r9-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Feb 10, 2017 at 10:32 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Fri, Feb 10, 2017 at 9:57 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
>> On 02/10/2017 12:05 PM, Arnd Bergmann wrote:
>>> On Friday, February 10, 2017 9:42:21 AM CET Florian Fainelli wrote:
>>>> On 02/10/2017 12:20 AM, Arnd Bergmann wrote:
>>>>> On Thu, Feb 9, 2017 at 7:22 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
>>>>>> On 02/09/2017 07:08 AM, Arnd Bergmann wrote:
>>>>>> I disabled CONFIG_NETDEVICES to force CONFIG_PHY not to be set here, and
>>>>>> I was not able to reproduce this, what am I missing?
>>>>>
>>>>> In the ARMv5 allmodconfig build, this fails because CONFIG_PHY=m, and
>>>>> we can't call into it. You could use IS_BUILTIN instead of IS_ENABLED in
>>>>> the header as a oneline workaround, but I think that would be more confusing
>>>>> to real users that try to use CONFIG_PHY=m without realizing why they lose
>>>>> access to their switch.
>>>>
>>>> I see, this patch should also help fixing this:
>>>>
>>>> http://patchwork.ozlabs.org/patch/726381/
>>>
>>> I think you still have the same problem, as you can still have the
>>> boardinfo registration in a loadable module.
>>
>> The patch exports mdiobus_register_board_info() so that should solve
>> your problem here, and I did verify this with a loadable module that
>> references mdiobus_register_board_info() in that case.
>
> No, that's a different problem. What you get with arm allmodconfig
> (try it!) is that mdio-bus.ko is a loadable module, but referenced
> from built-in code rather than the other way around. Exporting
> the symbol doesn't change anything since the module cannot
> be loaded by the time we need the symbol.

I got another failure with my patch applied:

drivers/net/phy/mdio-boardinfo.o: In function
`mdiobus_setup_mdiodev_from_board_info':
mdio-boardinfo.c:(.text.mdiobus_setup_mdiodev_from_board_info+0x48):
undefined reference to `mdio_device_create'
mdio-boardinfo.c:(.text.mdiobus_setup_mdiodev_from_board_info+0x78):
undefined reference to `mdio_device_register'
mdio-boardinfo.c:(.text.mdiobus_setup_mdiodev_from_board_info+0x84):
undefined reference to `mdio_device_free'
mdio-boardinfo.c:(.text.mdiobus_setup_mdiodev_from_board_info+0xa8):
undefined reference to `mdio_device_bus_match'

I hadn't realized earlier that the function has to call back into
the mdio layer. This is theoretically fixable too, but it's probably easier
to make all of the MDIO bus layer builtin whenever there is a user of
mdiobus_register_board_info().

      Arnd

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


Thread

[PATCH] [net-next] ARM: orion: fix PHYLIB dependency Arnd Bergmann <arnd@arndb.de> - 2017-02-09 16:20 +0100
  Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Andrew Lunn <andrew@lunn.ch> - 2017-02-09 17:50 +0100
    Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Arnd Bergmann <arnd@arndb.de> - 2017-02-09 18:20 +0100
      Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Andrew Lunn <andrew@lunn.ch> - 2017-02-09 18:30 +0100
        Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Florian Fainelli <f.fainelli@gmail.com> - 2017-02-09 19:20 +0100
  Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Andrew Lunn <andrew@lunn.ch> - 2017-02-09 19:20 +0100
  Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Florian Fainelli <f.fainelli@gmail.com> - 2017-02-09 19:40 +0100
    Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Arnd Bergmann <arnd@arndb.de> - 2017-02-10 13:40 +0100
      Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Florian Fainelli <f.fainelli@gmail.com> - 2017-02-10 19:00 +0100
        Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Arnd Bergmann <arnd@arndb.de> - 2017-02-10 21:10 +0100
          Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Florian Fainelli <f.fainelli@gmail.com> - 2017-02-10 22:00 +0100
            Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Arnd Bergmann <arnd@arndb.de> - 2017-02-10 22:40 +0100
              Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency Arnd Bergmann <arnd@arndb.de> - 2017-02-13 15:40 +0100

csiph-web