lkml.org 
[lkml]   [2019]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 01/12] net: stmmac: Get correct timestamp values from XGMAC
On Mon, 12 Aug 2019 11:44:00 +0200, Jose Abreu wrote:
> TX Timestamp in XGMAC comes from MAC instead of descriptors. Implement
> this in a new callback.
>
> Also, RX Timestamp in XGMAC must be cheked against corruption and we need
> a barrier to make sure that descriptor fields are read correctly.
>
> Changes from v1:
> - Rework the get timestamp function (David)
>
> Signed-off-by: Jose Abreu <joabreu@synopsys.com>

The barrier sounds like it might be a bug fix, does it occur in he wild?

> @@ -113,13 +119,11 @@ static int dwxgmac2_get_rx_timestamp_status(void *desc, void *next_desc,
> unsigned int rdes3 = le32_to_cpu(p->des3);
> int ret = -EBUSY;
>
> - if (likely(rdes3 & XGMAC_RDES3_CDA)) {
> + if (likely(rdes3 & XGMAC_RDES3_CDA))
> ret = dwxgmac2_rx_check_timestamp(next_desc);
> - if (ret)
> - return ret;
> - }
> -
> - return ret;
> + if (!ret)
> + return 1;
> + return 0;

nit:

return !ret;

> }
>
> static void dwxgmac2_init_rx_desc(struct dma_desc *p, int disable_rx_ic,

\
 
 \ /
  Last update: 2019-08-13 22:59    [W:0.082 / U:4.480 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site