linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [4.11 regression] cpsw/netcp: refine cpts dependency
@ 2017-04-28 15:03 Arnd Bergmann
  2017-04-28 15:15 ` Tony Lindgren
  2017-04-28 19:55 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-04-28 15:03 UTC (permalink / raw)
  To: David S . Miller
  Cc: Arnd Bergmann, Grygorii Strashko, Nicolas Pitre, WingMan Kwok,
	netdev, linux-kernel, Tony Lindgren, linux-omap

Tony Lindgren reports a kernel oops that resulted from my compile-time
fix on the default config. This shows two problems:

a) configurations that did not already enable PTP_1588_CLOCK will
   now miss the cpts driver

b) when cpts support is disabled, the driver crashes. This is a
   preexisting problem that we did not notice before my patch.

While the second problem is still being investigated, this modifies
the dependencies again, getting us back to the original state, with
another 'select NET_PTP_CLASSIFY' added in to avoid the original
link error we got, and the 'depends on POSIX_TIMERS' to hide
the CPTS support when turning it on would be useless.

Cc: stable@vger.kernel.org # 4.11 needs this
Fixes: 07fef3623407 ("cpsw/netcp: cpts depends on posix_timers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Adding the Cc: stable in case this doesn't make it into 4.11
any more.
---
 drivers/net/ethernet/ti/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index 9e631952b86f..48a541eb0af2 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -76,7 +76,7 @@ config TI_CPSW
 config TI_CPTS
 	bool "TI Common Platform Time Sync (CPTS) Support"
 	depends on TI_CPSW || TI_KEYSTONE_NETCP
-	depends on PTP_1588_CLOCK
+	depends on POSIX_TIMERS
 	---help---
 	  This driver supports the Common Platform Time Sync unit of
 	  the CPSW Ethernet Switch and Keystone 2 1g/10g Switch Subsystem.
@@ -87,6 +87,8 @@ config TI_CPTS_MOD
 	tristate
 	depends on TI_CPTS
 	default y if TI_CPSW=y || TI_KEYSTONE_NETCP=y
+	select NET_PTP_CLASSIFY
+	imply PTP_1588_CLOCK
 	default m
 
 config TI_KEYSTONE_NETCP
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [4.11 regression] cpsw/netcp: refine cpts dependency
  2017-04-28 15:03 [PATCH] [4.11 regression] cpsw/netcp: refine cpts dependency Arnd Bergmann
@ 2017-04-28 15:15 ` Tony Lindgren
  2017-04-28 19:55 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2017-04-28 15:15 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David S . Miller, Grygorii Strashko, Nicolas Pitre, WingMan Kwok,
	netdev, linux-kernel, linux-omap

* Arnd Bergmann <arnd@arndb.de> [170428 08:06]:
> Tony Lindgren reports a kernel oops that resulted from my compile-time
> fix on the default config. This shows two problems:
> 
> a) configurations that did not already enable PTP_1588_CLOCK will
>    now miss the cpts driver
> 
> b) when cpts support is disabled, the driver crashes. This is a
>    preexisting problem that we did not notice before my patch.
> 
> While the second problem is still being investigated, this modifies
> the dependencies again, getting us back to the original state, with
> another 'select NET_PTP_CLASSIFY' added in to avoid the original
> link error we got, and the 'depends on POSIX_TIMERS' to hide
> the CPTS support when turning it on would be useless.
> 
> Cc: stable@vger.kernel.org # 4.11 needs this
> Fixes: 07fef3623407 ("cpsw/netcp: cpts depends on posix_timers")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> Adding the Cc: stable in case this doesn't make it into 4.11
> any more.

Thanks this fixes the oops I'm seeing:

Tested-by: Tony Lindgren <tony@atomide.com>

>  drivers/net/ethernet/ti/Kconfig | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
> index 9e631952b86f..48a541eb0af2 100644
> --- a/drivers/net/ethernet/ti/Kconfig
> +++ b/drivers/net/ethernet/ti/Kconfig
> @@ -76,7 +76,7 @@ config TI_CPSW
>  config TI_CPTS
>  	bool "TI Common Platform Time Sync (CPTS) Support"
>  	depends on TI_CPSW || TI_KEYSTONE_NETCP
> -	depends on PTP_1588_CLOCK
> +	depends on POSIX_TIMERS
>  	---help---
>  	  This driver supports the Common Platform Time Sync unit of
>  	  the CPSW Ethernet Switch and Keystone 2 1g/10g Switch Subsystem.
> @@ -87,6 +87,8 @@ config TI_CPTS_MOD
>  	tristate
>  	depends on TI_CPTS
>  	default y if TI_CPSW=y || TI_KEYSTONE_NETCP=y
> +	select NET_PTP_CLASSIFY
> +	imply PTP_1588_CLOCK
>  	default m
>  
>  config TI_KEYSTONE_NETCP
> -- 
> 2.9.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [4.11 regression] cpsw/netcp: refine cpts dependency
  2017-04-28 15:03 [PATCH] [4.11 regression] cpsw/netcp: refine cpts dependency Arnd Bergmann
  2017-04-28 15:15 ` Tony Lindgren
@ 2017-04-28 19:55 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-04-28 19:55 UTC (permalink / raw)
  To: arnd
  Cc: grygorii.strashko, nicolas.pitre, w-kwok2, netdev, linux-kernel,
	tony, linux-omap

From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 28 Apr 2017 17:03:58 +0200

> Tony Lindgren reports a kernel oops that resulted from my compile-time
> fix on the default config. This shows two problems:
> 
> a) configurations that did not already enable PTP_1588_CLOCK will
>    now miss the cpts driver
> 
> b) when cpts support is disabled, the driver crashes. This is a
>    preexisting problem that we did not notice before my patch.
> 
> While the second problem is still being investigated, this modifies
> the dependencies again, getting us back to the original state, with
> another 'select NET_PTP_CLASSIFY' added in to avoid the original
> link error we got, and the 'depends on POSIX_TIMERS' to hide
> the CPTS support when turning it on would be useless.
> 
> Cc: stable@vger.kernel.org # 4.11 needs this
> Fixes: 07fef3623407 ("cpsw/netcp: cpts depends on posix_timers")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks Arnd.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-28 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28 15:03 [PATCH] [4.11 regression] cpsw/netcp: refine cpts dependency Arnd Bergmann
2017-04-28 15:15 ` Tony Lindgren
2017-04-28 19:55 ` David Miller

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).