All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Clay McClure <clay@daemons.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Richard Cochran <richardcochran@gmail.com>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Vladimir Oltean <olteanv@gmail.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>,
	Mao Wenan <maowenan@huawei.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Edward Cree <ecree@solarflare.com>,
	Nicolas Pitre <nico@fluxnic.net>,
	Josh Triplett <josh@joshtriplett.org>,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: Select PTP_1588_CLOCK in PTP-specific drivers
Date: Tue, 28 Apr 2020 11:21:15 +0200	[thread overview]
Message-ID: <CAMuHMdXhVcp3j4Sq_4fsqavw1eH_DksN-yjajqC_8pRKnjM0zA@mail.gmail.com> (raw)
In-Reply-To: <20200428090749.31983-1-clay@daemons.net>

Hi Clay,

Thanks for your patch!

On Tue, Apr 28, 2020 at 11:14 AM Clay McClure <clay@daemons.net> wrote:
> Commit d1cbfd771ce8 ("ptp_clock: Allow for it to be optional") changed
> all PTP-capable Ethernet drivers from `select PTP_1588_CLOCK` to `imply
> PTP_1588_CLOCK`, "in order to break the hard dependency between the PTP
> clock subsystem and ethernet drivers capable of being clock providers."
> As a result it is possible to build PTP-capable Ethernet drivers without
> the PTP subsystem by deselecting PTP_1588_CLOCK. Drivers are required to
> handle the missing dependency gracefully.
>
> Some PTP-capable Ethernet drivers (e.g., TI_CPSW) factor their PTP code
> out into separate drivers (e.g., TI_CPTS_MOD). The above commit also
> changed these PTP-specific drivers to `imply PTP_1588_CLOCK`, making it
> possible to build them without the PTP subsystem. But as Grygorii
> Strashko noted in [1]:
>
> On Wed, Apr 22, 2020 at 02:16:11PM +0300, Grygorii Strashko wrote:
>
> > Another question is that CPTS completely nonfunctional in this case and
> > it was never expected that somebody will even try to use/run such
> > configuration (except for random build purposes).
>
> In my view, enabling a PTP-specific driver without the PTP subsystem is
> a configuration error made possible by the above commit. Kconfig should
> not allow users to create a configuration with missing dependencies that
> results in "completely nonfunctional" drivers.
>
> I audited all network drivers that call ptp_clock_register() and found
> six that look like PTP-specific drivers that are likely nonfunctional
> without PTP_1588_CLOCK:
>
>     NET_DSA_MV88E6XXX_PTP
>     NET_DSA_SJA1105_PTP
>     MACB_USE_HWSTAMP
>     CAVIUM_PTP
>     TI_CPTS_MOD
>     PTP_1588_CLOCK_IXP46X
>
> Note how they all reference PTP or timestamping in their name; this is a
> clue that they depend on PTP_1588_CLOCK.
>
> Change these drivers back [2] to `select PTP_1588_CLOCK`. Note that this
> requires also selecting POSIX_TIMERS, a transitive dependency of
> PTP_1588_CLOCK.

If these drivers have a hard dependency on PTP_1588_CLOCK, IMHO they
should depend on PTP_1588_CLOCK, not select PTP_1588_CLOCK.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2020-04-28  9:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28  9:07 [PATCH] net: Select PTP_1588_CLOCK in PTP-specific drivers Clay McClure
2020-04-28  9:21 ` Geert Uytterhoeven [this message]
2020-04-28 16:07   ` Arnd Bergmann
2020-04-29  7:29     ` Clay McClure
2020-04-29  7:59       ` [PATCH v2] net: Make PTP-specific drivers depend on PTP_1588_CLOCK Clay McClure
2020-05-01 22:28         ` 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=CAMuHMdXhVcp3j4Sq_4fsqavw1eH_DksN-yjajqC_8pRKnjM0zA@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=brouer@redhat.com \
    --cc=clay@daemons.net \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=f.fainelli@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=grygorii.strashko@ti.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=josh@joshtriplett.org \
    --cc=kuba@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maowenan@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=nicolas.ferre@microchip.com \
    --cc=nicolas.pitre@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=richardcochran@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=vivien.didelot@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.