[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c03dff4-5185-dbd2-eeb4-867972512f2b@synopsys.com>
Date: Thu, 14 Feb 2019 14:18:02 +0000
From: Jose Abreu <jose.abreu@...opsys.com>
To: Alexandre Torgue <alexandre.torgue@...com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Jose Abreu <jose.abreu@...opsys.com>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [net-next, PATCH] net: stmmac: use correct define to get rx
timestamp on GMAC4
Hi Alexandre,
On 2/14/2019 2:12 PM, Alexandre Torgue wrote:
> In dwmac4_wrback_get_rx_timestamp_status we looking for a RX timestamp.
> For that receive descriptors are handled and so we should use defines
> related to receive descriptors. It'll no change the functional behavior
> as RDES3_RDES1_VALID=TDES3_RS1V=BIT(26) but it makes code easier to read.
>
> Signed-off-by: Alexandre Torgue <alexandre.torgue@...com>
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
> index 20299f6..9f062b3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
> @@ -268,7 +268,7 @@ static int dwmac4_wrback_get_rx_timestamp_status(void *desc, void *next_desc,
> int ret = -EINVAL;
>
> /* Get the status from normal w/b descriptor */
> - if (likely(p->des3 & TDES3_RS1V)) {
> + if (likely(p->des3 & RDES3_RDES1_VALID)) {
Shouldn't this also use le32_to_cpu() like bellow ?
Thanks,
Jose Miguel Abreu
> if (likely(le32_to_cpu(p->des1) & RDES1_TIMESTAMP_AVAILABLE)) {
> int i = 0;
>
>
Powered by blists - more mailing lists