Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3103136ybn; Fri, 27 Sep 2019 00:50:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqycKGBcquoMpYmae2OVwjw9Wm5hQS5P1zbKvE25+7ykV4y8/OzOculx333yjOPdseIhmch+ X-Received: by 2002:a17:906:c7d4:: with SMTP id dc20mr6625155ejb.235.1569570600315; Fri, 27 Sep 2019 00:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569570600; cv=none; d=google.com; s=arc-20160816; b=YDlSi/S/6vq+oxShwjSEFbnUh+HWXA/LbH93Exi4GXIWdZlkopURk+H50hHDVE4KW9 5DhEwgwaZGCHycx10eBARGFSBFHYDGFTp/WgiJ8nrzUwr8CGWuBCp+qHPgAyfLrzN55P 014ExqZVGqETmYvYGBzaNM7zXRikVC3OOgAd9FhErTsTzFdxqbq8MPYah2xv5++Z4KwH O2h2aPPumH2Nepg94D424fVZSntiuaL6HFJFaXWk0Ipao3LpQ/C1lqczQy1rVRm4UfEO hQQdPAVeFcYICDrnusj656/p7XjDbQZOzA/D/fSCGR8ajirFkoCITK1L76Jq7mPlpNIU IhuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=lq76Q2DqkLnHfnHiBDv8tefXN0eiPLPvHsQNqb4Q7RI=; b=xIFFlBM2HrvRopiX3sJ2Gi6ZFDxxhHzttHLg69SG7whbdDfMTsHUE0BnH98HeSZ+c3 mCbRrHqt9Pr/kNwCEu/y+P5Ny7mPJ1f5vmJ3t40IZhY7UHgZrMdlupHApe9pzhkUrX6M 24Tm4KOPPkxgOzWPlqXjvgy1Iui18N20r4yeD32RN0UEo0QYibxyD8tOOOjZJPtxTbhe yOLEYh0uBEAgUGCWPx1BgPC5m8qwIctzE4JiIFaO8y+xhn1ommC9WrxCN8Oq+uWlroef vK1JI4JvB3nnuXBkM4UEOITKEIbv8zstLq1yTGRc+rqRgS9rZONz1X3Cw5lAOsyaPvoh Ie3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=DZdO6Dl2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u17si974858edy.145.2019.09.27.00.49.35; Fri, 27 Sep 2019 00:50:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=DZdO6Dl2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726902AbfI0HtP (ORCPT + 99 others); Fri, 27 Sep 2019 03:49:15 -0400 Received: from dc2-smtprelay2.synopsys.com ([198.182.61.142]:34666 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726394AbfI0HtM (ORCPT ); Fri, 27 Sep 2019 03:49:12 -0400 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id D728AC0DC4; Fri, 27 Sep 2019 07:49:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1569570551; bh=DrIxAcUMdhwcfqhJRFHtOh2PccbH2YMx64iLgCedU0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=DZdO6Dl2CHYoN0aDORDwMnQHxYdBDO0VFMkYAQOJPq8sJXlHDdt1CJwD5iUf44n5p nQS7FQOV4fIQat6l+2EJsqkykWKil8f3/BqQjJHTm4TtjMThrrIxTTKaXxtObsQQ+U d/pbdPdo9BM+XQq+6BK9YL1Xdcg8ijtfNLjFs3SPZec6oPkeRo7ok1D3XVzSIFjLEE lPoGGUIV7CZwWrGfqWnFYDdetdfSxoSU9LI2KdHZmpxAMOTDsg31yGBsiDF7S9Kqz1 8+f77GGu0QdlMw/t1fFq5N+SMS3JEZreJFHyx9YcMMPWdx3Zgj38cUENG029hW3+pT rpUSqi9q3XmIg== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id 6522DA0080; Fri, 27 Sep 2019 07:49:09 +0000 (UTC) From: Jose Abreu To: netdev@vger.kernel.org Cc: Joao Pinto , Jose Abreu , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net 5/8] net: stmmac: Correctly take timestamp for PTPv2 Date: Fri, 27 Sep 2019 09:48:53 +0200 Message-Id: <649168117d7fcf63704f92cfb687e3493ad46045.1569569778.git.Jose.Abreu@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The case for PTPV2_EVENT requires event packets to be captured so add this setting to the list of enabled captures. Fixes: 891434b18ec0 ("stmmac: add IEEE PTPv1 and PTPv2 support.") Signed-off-by: Jose Abreu --- Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Maxime Coquelin Cc: netdev@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index d3232738fb25..31a237ec73bc 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -629,6 +629,7 @@ static int stmmac_hwtstamp_set(struct net_device *dev, struct ifreq *ifr) config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT; ptp_v2 = PTP_TCR_TSVER2ENA; snap_type_sel = PTP_TCR_SNAPTYPSEL_1; + ts_event_en = PTP_TCR_TSEVNTENA; ptp_over_ipv4_udp = PTP_TCR_TSIPV4ENA; ptp_over_ipv6_udp = PTP_TCR_TSIPV6ENA; ptp_over_ethernet = PTP_TCR_TSIPENA; -- 2.7.4