From: Joe Perches <joe@perches.com>
To: Byungho An <bh74.an@samsung.com>
Cc: netdev@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
davem@davemloft.net, ilho215.lee@samsung.com,
siva.kallam@samsung.com, vipul.pandya@samsung.com,
ks.giri@samsung.com
Subject: Re: [PATCH V2 RE-SEND 1/7] net: sxgbe: add basic framework for Samsung 10Gb ethernet driver
Date: Thu, 13 Mar 2014 05:53:09 -0700 [thread overview]
Message-ID: <1394715189.3915.76.camel@joe-AO722> (raw)
In-Reply-To: <007a01cf3e89$3bbdf460$b339dd20$%an@samsung.com>
On Thu, 2014-03-13 at 15:55 +0900, Byungho An wrote:
> This patch adds support for Samsung 10Gb ethernet driver(sxgbe).
> - sxgbe core initialization
> - Tx and Rx support
> - MDIO support
> - ISRs for Tx and Rx
> - ifconfig support to driver
[]
> diff --git a/drivers/net/ethernet/samsung/sxgbe_desc.c b/drivers/net/ethernet/samsung/sxgbe_desc.c
[]
> +/* Set Time stamp */
> +static void sxgbe_tx_ctxt_desc_set_tstamp(struct sxgbe_tx_ctxt_desc *p,
> + u8 ostc_enable, u64 tstamp)
> +{
> + if (ostc_enable) {
> + p->ostc = ostc_enable;
> + p->tstamp_lo = (u32) tstamp;
> + p->tstamp_hi = (u32) (tstamp>>32);
> + }
> +}
[]
> +static u64 sxgbe_get_rx_timestamp(struct sxgbe_rx_ctxt_desc *p)
> +{
> + u64 ns;
> + ns = p->tstamp_lo;
> + ns += p->tstamp_hi * 1000000000ULL;
> +
> + return ns;
> +}
This looks odd.
rx and tx timestamps are different clocks?
rx tstamp_lo resets every second but tx_stamp
is free-running?
Maybe this was supposed to be something like
ns = p->tstamp_lo
ns |= ((u64)tstamp_hi) << 32;
If not, maybe it warrants a comment around
here or on the descriptor definition
> diff --git a/drivers/net/ethernet/samsung/sxgbe_desc.h b/drivers/net/ethernet/samsung/sxgbe_desc.h
[]
> +/* Context descriptor structure */
> +struct sxgbe_tx_ctxt_desc {
> + u32 tstamp_lo:32;
> + u32 tstamp_hi:32;
[]
> +struct sxgbe_rx_ctxt_desc {
> + u32 tstamp_lo:32;
> + u32 tstamp_hi:32;
next prev parent reply other threads:[~2014-03-13 12:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 6:55 [PATCH V2 RE-SEND 1/7] net: sxgbe: add basic framework for Samsung 10Gb ethernet driver Byungho An
2014-03-13 12:53 ` Joe Perches [this message]
2014-03-13 13:02 ` Joe Perches
2014-03-14 0:44 ` Francois Romieu
2014-03-16 0:09 ` Andrew.an
2014-03-16 23:11 ` Francois Romieu
2014-03-17 3:53 ` Byungho An
2014-03-17 16:58 ` Stephen Hemminger
2014-03-17 17:38 ` Byungho An
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=1394715189.3915.76.camel@joe-AO722 \
--to=joe@perches.com \
--cc=bh74.an@samsung.com \
--cc=davem@davemloft.net \
--cc=ilho215.lee@samsung.com \
--cc=ks.giri@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=siva.kallam@samsung.com \
--cc=vipul.pandya@samsung.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