linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Arnd Bergmann <arnd@arndb.de>, <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Russell King <linux@armlinux.org.uk>,
	<linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org>,
	Clay McClure <clay@daemons.net>, Dan Murphy <dmurphy@ti.com>
Subject: Re: [PATCH net v4] net: ethernet: ti: Remove TI_CPTS_MOD workaround
Date: Tue, 12 May 2020 17:34:34 +0300	[thread overview]
Message-ID: <9f86a9ef-c069-e69b-540a-2fd2731b8619@ti.com> (raw)
In-Reply-To: <20200512142230.GF37466@atomide.com>



On 12/05/2020 17:22, Tony Lindgren wrote:
> Hi,
> 
> * Grygorii Strashko <grygorii.strashko@ti.com> [200512 10:03]:
>> From: Clay McClure <clay@daemons.net>
>>
>> My recent commit b6d49cab44b5 ("net: Make PTP-specific drivers depend on
>> PTP_1588_CLOCK") exposes a missing dependency in defconfigs that select
>> TI_CPTS without selecting PTP_1588_CLOCK, leading to linker errors of the
>> form:
>>
>> drivers/net/ethernet/ti/cpsw.o: in function `cpsw_ndo_stop':
>> cpsw.c:(.text+0x680): undefined reference to `cpts_unregister'
>>   ...
>>
>> That's because TI_CPTS_MOD (which is the symbol gating the _compilation_ of
>> cpts.c) now depends on PTP_1588_CLOCK, and so is not enabled in these
>> configurations, but TI_CPTS (which is the symbol gating _calls_ to the cpts
>> functions) _is_ enabled. So we end up compiling calls to functions that
>> don't exist, resulting in the linker errors.
>>
>> This patch fixes build errors and restores previous behavior by:
>>   - ensure PTP_1588_CLOCK=y in TI specific configs and CPTS will be built
>>   - remove TI_CPTS_MOD and, instead, add dependencies from CPTS in
>>     TI_CPSW/TI_KEYSTONE_NETCP/TI_CPSW_SWITCHDEV as below:
>>
>>     config TI_CPSW_SWITCHDEV
>>     ...
>>      depends on TI_CPTS || !TI_CPTS
>>
>>     which will ensure proper dependencies PTP_1588_CLOCK -> TI_CPTS ->
>> TI_CPSW/TI_KEYSTONE_NETCP/TI_CPSW_SWITCHDEV and build type selection.
>>
>> Note. For NFS boot + CPTS all of above configs have to be built-in.
> 
> This builds and boots on BBB and beagle x15 with NFSroot so:
> 
> Tested-by: Tony Lindgren <tony@atomide.com>
> 

Thank you for testing.

> However, there's at least one more issue left that shows up at least
> on ti81xx dra62x-j5eco-evm on v5.7-rc5 that has commit b46b2b7ba6e1
> ("ARM: dts: Fix dm814x Ethernet by changing to use rgmii-id mode").
> 
> I think this is a different issue though, any ideas?
> 

This seems like completely different issue.
Could we have separate thread started for this, pls?

-- 
Best regards,
grygorii

  reply	other threads:[~2020-05-12 14:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 10:02 [PATCH net v4] net: ethernet: ti: Remove TI_CPTS_MOD workaround Grygorii Strashko
2020-05-12 10:08 ` Arnd Bergmann
2020-05-12 14:22 ` Tony Lindgren
2020-05-12 14:34   ` Grygorii Strashko [this message]
2020-05-12 14:50     ` Tony Lindgren
2020-05-12 19:35 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f86a9ef-c069-e69b-540a-2fd2731b8619@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=arnd@arndb.de \
    --cc=clay@daemons.net \
    --cc=davem@davemloft.net \
    --cc=dmurphy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).