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=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no 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 996A8C00A89 for ; Mon, 2 Nov 2020 22:20:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E5452084C for ; Mon, 2 Nov 2020 22:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604355643; bh=RPnrsyxMAkztMhvusutWD4TqjQCquKiSwYb/vlIe3Gg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=mhHcqunrLrIBf9wIVpQQn696QM5a0ds5I6tLiYhegS0p0e1usIt1eLtIvoHBF7sTx eRgmvwC5YPjsnVjBspLc8TqzLTpTIz/06+QUCMoUV6O8tCzJ64Cs6b8uNgaY7VRt1f SwqboB5pptbe6Ghtb3k27tOjWAGD6WQ9mTslg5ak= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726494AbgKBWUm (ORCPT ); Mon, 2 Nov 2020 17:20:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:52564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbgKBWUm (ORCPT ); Mon, 2 Nov 2020 17:20:42 -0500 Received: from kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net (unknown [163.114.132.1]) (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 2100120786; Mon, 2 Nov 2020 22:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604355641; bh=RPnrsyxMAkztMhvusutWD4TqjQCquKiSwYb/vlIe3Gg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=peaRwy53vhIUeGizgjAikIlKSTfvxLSDemKEiiaCBJ8WYSP/eBkAKd8aYXFus2msc eLMVwTfEdhalqAt1tT6fINLZMD/foRO88k2iv+GDmIqvalVm8vkNX9h/pOyjR4nYdz AorXyOZH6SmpJD5ZDVWGEglJJLaEDCmjrOOq8W98= Date: Mon, 2 Nov 2020 14:20:40 -0800 From: Jakub Kicinski To: Richard Cochran Cc: Grygorii Strashko , "David S. Miller" , netdev@vger.kernel.org, Vignesh Raghavendra , Sekhar Nori , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [PATCH] net: ethernet: ti: cpsw: disable PTPv1 hw timestamping advertisement Message-ID: <20201102142040.4c9decbe@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <20201101020227.GB2683@hoboy.vegasvil.org> References: <20201029190910.30789-1-grygorii.strashko@ti.com> <20201031114042.7ccdf507@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> <20201101020227.GB2683@hoboy.vegasvil.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 31 Oct 2020 19:02:27 -0700 Richard Cochran wrote: > On Sat, Oct 31, 2020 at 11:40:42AM -0700, Jakub Kicinski wrote: > > On Thu, 29 Oct 2020 21:09:10 +0200 Grygorii Strashko wrote: > > > The TI CPTS does not natively support PTPv1, only PTPv2. But, as it > > > happens, the CPTS can provide HW timestamp for PTPv1 Sync messages, because > > > CPTS HW parser looks for PTP messageType id in PTP message octet 0 which > > > value is 0 for PTPv1. As result, CPTS HW can detect Sync messages for PTPv1 > > > and PTPv2 (Sync messageType = 0 for both), but it fails for any other PTPv1 > > > messages (Delay_req/resp) and will return PTP messageType id 0 for them. > > > > > > The commit e9523a5a32a1 ("net: ethernet: ti: cpsw: enable > > > HWTSTAMP_FILTER_PTP_V1_L4_EVENT filter") added PTPv1 hw timestamping > > > advertisement by mistake, only to make Linux Kernel "timestamping" utility > > > work, and this causes issues with only PTPv1 compatible HW/SW - Sync HW > > > timestamped, but Delay_req/resp are not. > > > > > > Hence, fix it disabling PTPv1 hw timestamping advertisement, so only PTPv1 > > > compatible HW/SW can properly roll back to SW timestamping. > > > > > > Fixes: e9523a5a32a1 ("net: ethernet: ti: cpsw: enable HWTSTAMP_FILTER_PTP_V1_L4_EVENT filter") > > > Signed-off-by: Grygorii Strashko > > > > CC: Richard > > Acked-by: Richard Cochran Applied, thanks!