From: Richard Cochran <richardcochran@gmail.com>
To: Andrei Pistirica <andrei.pistirica@microchip.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, davem@davemloft.net,
nicolas.ferre@atmel.com, harinikatakamlinux@gmail.com,
harini.katakam@xilinx.com, punnaia@xilinx.com,
michals@xilinx.com, anirudh@xilinx.com,
boris.brezillon@free-electrons.com,
alexandre.belloni@free-electrons.com, tbultel@pixelsurmer.com
Subject: Re: [RFC PATCH v2 1/2] macb: Add 1588 support in Cadence GEM.
Date: Sun, 20 Nov 2016 20:37:20 +0100 [thread overview]
Message-ID: <20161120193720.GA7874@localhost.localdomain> (raw)
In-Reply-To: <1479478912-14067-1-git-send-email-andrei.pistirica@microchip.com>
On Fri, Nov 18, 2016 at 03:21:51PM +0100, Andrei Pistirica wrote:
> +#ifdef CONFIG_MACB_USE_HWSTAMP
> +void macb_ptp_init(struct net_device *ndev);
> +#else
> +void macb_ptp_init(struct net_device *ndev) { }
static inline ^^^
> +#endif
> +void macb_ptp_init(struct net_device *ndev)
> +{
> + struct macb *bp = netdev_priv(ndev);
> + struct timespec64 now;
> + u32 rem = 0;
> +
> + if (!(bp->caps | MACB_CAPS_GEM_HAS_PTP)){
> + netdev_vdbg(bp->dev, "Platform does not support PTP!\n");
> + return;
> + }
You would have needed '&' and not '|' here.
Also, using a flag limits the code to your platform. This works for
you, but it is short sighted. The other MACB PTP blocks have
different register layouts, and this patch does not lay the ground
work for the others.
The driver needs to be designed to support the other platforms.
Thanks,
Richard
next prev parent reply other threads:[~2016-11-20 19:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 14:21 [RFC PATCH v2 1/2] macb: Add 1588 support in Cadence GEM Andrei Pistirica
2016-11-18 14:21 ` [RFC PATCH v2 2/2] macb: Enable 1588 support in SAMA5D2 platform Andrei Pistirica
2016-11-20 19:54 ` Richard Cochran
2016-11-23 13:35 ` Andrei Pistirica
2016-11-20 19:18 ` [RFC PATCH v2 1/2] macb: Add 1588 support in Cadence GEM Richard Cochran
2016-11-23 13:34 ` Andrei Pistirica
2016-11-23 21:03 ` Richard Cochran
2016-11-24 9:36 ` Andrei.Pistirica
2016-11-20 19:37 ` Richard Cochran [this message]
2016-11-23 13:36 ` Andrei Pistirica
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=20161120193720.GA7874@localhost.localdomain \
--to=richardcochran@gmail.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=andrei.pistirica@microchip.com \
--cc=anirudh@xilinx.com \
--cc=boris.brezillon@free-electrons.com \
--cc=davem@davemloft.net \
--cc=harini.katakam@xilinx.com \
--cc=harinikatakamlinux@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michals@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=punnaia@xilinx.com \
--cc=tbultel@pixelsurmer.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).