From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 598F8CA9EAF for ; Sun, 27 Oct 2019 21:19:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 275D321D80 for ; Sun, 27 Oct 2019 21:19:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572211178; bh=8cOjqoAtuGZkMYFN0n9rQSvoQnvLaA5rtCuHb8/avY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=NO4EGNWPWbAtaOPkMf3PVYfQCcvqb+3e/H/0WFXDGxxWVr15cZBi58oCZlDneiGMy KSQ91SYva20HnHTpKNcyeVKrk7tSXEWTanaO5gv/9i3qwgTiMA7sinVb2yEObcTHAX rKVgBH3vHaZzsfSg2ZMZNIqxOywq2yfIT+bu7ARA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730892AbfJ0VTh (ORCPT ); Sun, 27 Oct 2019 17:19:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:39908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731495AbfJ0VTd (ORCPT ); Sun, 27 Oct 2019 17:19:33 -0400 Received: from localhost (100.50.158.77.rev.sfr.net [77.158.50.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D867220717; Sun, 27 Oct 2019 21:19:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572211172; bh=8cOjqoAtuGZkMYFN0n9rQSvoQnvLaA5rtCuHb8/avY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BEvg70QNDNLOjUJRMQqS6W2/eBASYd37KV5LsySegdGsJky5j635u5Fpepi28qEK0 LvvNAJugj6Fn5ICeRGgu2HXmV8gBG8VqAliYcgqW/4Xyj7O1Nx+0uQUYpUeNXUV2F6 tNxMjsVeGdpmCVmZsTQ+FYaGcQqZOV2r5uKzXTNo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jose Abreu , "David S. Miller" , Sasha Levin Subject: [PATCH 5.3 040/197] net: stmmac: Correctly take timestamp for PTPv2 Date: Sun, 27 Oct 2019 21:59:18 +0100 Message-Id: <20191027203353.879646671@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203351.684916567@linuxfoundation.org> References: <20191027203351.684916567@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jose Abreu [ Upstream commit 14f347334bf232074616e29e29103dd0c7c54dec ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 5c4408bdc843a..ade85ca9d8c7f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -626,6 +626,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.20.1