From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942281AbcJ0OAX (ORCPT ); Thu, 27 Oct 2016 10:00:23 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:36474 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935657AbcJ0OAT (ORCPT ); Thu, 27 Oct 2016 10:00:19 -0400 MIME-Version: 1.0 In-Reply-To: <743ffe4a-2c8f-e5f7-f93c-6be16a8a0350@st.com> References: <1477464964-5960-1-git-send-email-peppe.cavallaro@st.com> <1477464964-5960-3-git-send-email-peppe.cavallaro@st.com> <743ffe4a-2c8f-e5f7-f93c-6be16a8a0350@st.com> From: Rayagond Kokatanur Date: Thu, 27 Oct 2016 16:21:23 +0530 Message-ID: Subject: Re: [PATCH (net.git) 2/3] stmmac: fix PTP support for GMAC4 To: Giuseppe CAVALLARO Cc: netdev , alexandre.torgue@st.com, Richard Cochran , linux-kernel@vger.kernel.org, seraphin.bonnaffe@st.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 27, 2016 at 4:02 PM, Giuseppe CAVALLARO wrote: > Hello Rayagond ! > > On 10/27/2016 12:25 PM, Rayagond Kokatanur wrote: >>> >>> +static int dwmac4_wrback_get_rx_timestamp_status(void *desc, u32 ats) >>> > { >>> > struct dma_desc *p = (struct dma_desc *)desc; >>> > + int ret = -EINVAL; >>> > + >>> > + /* Get the status from normal w/b descriptor */ >>> > + if (likely(p->des3 & TDES3_RS1V)) { >>> > + if (likely(p->des1 & RDES1_TIMESTAMP_AVAILABLE)) { >>> > + int i = 0; >>> > + >>> > + /* Check if timestamp is OK from context >>> > descriptor */ >>> > + do { >>> > + ret = dwmac4_rx_check_timestamp(desc); >> >> Here, "desc" is not pointing to next descriptor (ie context >> descriptor). Driver should check the context descriptor. > > > you are right and this is done by the caller: stmmac_get_rx_hwtstamp Yes. > > Cheers > peppe > -- wwr Rayagond