Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp331119lqp; Tue, 11 Jun 2024 06:07:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW9tEHAt1U1xb6lUPV6ib/LL37Q94N38cut/V6Yk+6sDaFLcDWqlIBQanv9SFMejYsQFTwiYrEUJpcfQGQdNKjD3F2hK8zTkqCS6gYBrg== X-Google-Smtp-Source: AGHT+IEL/0iDOdqhUrklMSWzzWjg2TXKcRrM2rcCbTEIaS6t96ObBYNstZ7W0zmmFWr+D5d9JeTB X-Received: by 2002:a0d:c2c1:0:b0:627:dfbd:89e with SMTP id 00721157ae682-62cd558b5f4mr110089827b3.11.1718111226507; Tue, 11 Jun 2024 06:07:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718111226; cv=pass; d=google.com; s=arc-20160816; b=ToiDddFPoE2mk6+c90C/+np6qrdZbninMCsnp+7UyS8YsOCHod2PImc9FPLy9T6mtg 9ZkENHrDqcRJjfdgSKvAYGSUVn9jKXd25bCIh4Y3IQ4NCTClZ/ZrPiu7hlT7Q5CThDDG euiZEjVK4y2/B4dyYIJfogAUDPUAi6T4woQfADTdK/z7UAGIkkxawk5VChbpKn8siSP2 JHxsu4pXZOXojoDAlBuSZIZ1dBHRcXGUNK5F6EL0puWfqhj3BIecxIFNdJjpJwdBDy1x OUwM3U76J9XeoopR/EspQun7UksXgxdD+sKW4Un/bEi5qlZxhLHNktd3iDVw634xSWRx 4LBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4RzQfhz9JM3uFuWXMZQu3myfhwQMauJsDyAR+I1tfCg=; fh=yRQOJq+EUgXR9aU6hsOgMTe4JMV3uEYWGssJSMP8ok4=; b=SWJOG1E4DV13VZJRCkQ09RBbDfCwvbj/RcrzKbJ3/Lf/DBBJkZSlemrceBpPyWDFPf 1LFs1xSBchP1PD9c0O9jl0xywmVDj54CU88JfopgYWoQhQz2mYCwOd/cpCjJ268pUAoq SHygzaePE3EbNB8r6ktOKKalZ3f9jh3eNNJmST0nTClKVLHfVaxWW0k7VxkMTTtpVqxY nKN9T/U5Z727a7xE/3md+CV2LbDKv000tuDN36OnxcUYiR82+/5B0ukvU15B+ue+t8a1 /ImpJtjG9t8hRoX52Jtc/UcveY+TvGuQhd1HWYoEDMoq/KZkbnI56dfmZfeB1y1nisNK U6IQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=oMU7D+Px; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-209903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 00721157ae682-62cffe4cc05si20705087b3.345.2024.06.11.06.07.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 06:07:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=oMU7D+Px; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-209903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 17CE31C23633 for ; Tue, 11 Jun 2024 13:07:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A018717C7CE; Tue, 11 Jun 2024 13:06:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="oMU7D+Px" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD99A17B406; Tue, 11 Jun 2024 13:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718111216; cv=none; b=r88X3xsjGn+DG7oSCD8qweKyjTirSdOqD1cvU5s2e6VTGwFGKMxO8YK95j95vYzCPsUifyMaRDaeRU0AIX4VHCyTvr3jLF9frgQ5Qa3dvSXslYIss745zKvbMUhT0LIrzOxofoQjRKs918Kd9/YBwTulMza27kB5E6Iw2sId56E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718111216; c=relaxed/simple; bh=qeFyIhjyRVr3qLO9JcdFGRIv32av/Bt1hR6Zi26OP68=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OWvMvoP1RP4gK6sbgdpIyzqW51D+Rj378YnSdzTqOvx5uMySGPL5Q0wjcRWC2oooVEyNVa0DKBnlmM5RcGo3/cN2ePtrnn2bPXoPcrKR9hNp/qfWYy2skfcV9Bca9qnP/jv1+z/3b801RK6e49I60hEzxplwoHfb8IH4n7T6BKU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=oMU7D+Px; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=4RzQfhz9JM3uFuWXMZQu3myfhwQMauJsDyAR+I1tfCg=; b=oM U7D+PxxIgKdbxS9Lf6Rj5kMt/vXWOCXaEvkwqxopuk2siBu53kzjYuhgw6ImVNHLHJqKkydW2z96s CLFnQ19UPSdxPgwJ6v15/zcHHDTrQd/wbqAHFII7CgCHJIq+IeaVLGUhCUDDsFkzqdaw0Xs+WCcNS af2/Zg2U+ZGmwQ4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sH1D9-00HO90-LP; Tue, 11 Jun 2024 15:06:51 +0200 Date: Tue, 11 Jun 2024 15:06:51 +0200 From: Andrew Lunn To: =?iso-8859-1?B?Q3Pza+Fz?= Bence Cc: imx@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Subject: Re: [PATCH v2] net: fec: Add ECR bit macros, fix FEC_ECR_EN1588 being cleared on link-down Message-ID: References: <20240607081855.132741-1-csokas.bence@prolan.hu> <46892275-619c-4dfb-9214-3bbb14b78093@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Jun 11, 2024 at 10:04:39AM +0200, Cs?k?s Bence wrote: > Hi! > > On 6/10/24 21:13, Andrew Lunn wrote: > > On Fri, Jun 07, 2024 at 10:18:55AM +0200, Cs?k?s, Bence wrote: > > > FEC_ECR_EN1588 bit gets cleared after MAC reset in `fec_stop()`, which > > > makes all 1588 functionality shut down on link-down. However, some > > > functionality needs to be retained (e.g. PPS) even without link. > > > > I don't know much about PPS. Could you point to some documentation, > > list email etc, which indicated PPS without link is expected to work. > > > > Please also Cc: Richard Cochran for changes like this. > > > > Thanks > > Andrew > > This is what Richard said two years ago on the now-reverted patch: > > Link: https://lore.kernel.org/netdev/YvRdTwRM4JBc5RuV@hoboy.vegasvil.org Thanks. So when you have sync, you have a 1Hz clock, synchronised to the grand master. When the link is down, or communication with the grand master is lost, you get a free running clock of around 1Hz. I presume that if the link does up again and communication to the grand master is restored, there is a phase shift in the 1Hz clock, and a frequency correction? The hardware has to cope with this. > Plus, this patch doesn't even re-enable PPS or any other 1588 functions, it > just prevents the adapter from forgetting it is even 1588-capable. I'll > resubmit with more clear wording and appropriate "Fixes:" and "Cc:" tags. Thanks Andrew