Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4204007ybl; Tue, 20 Aug 2019 08:25:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFyJLIXOQher1qv/ZD/d+P19Iv7cKvD1Tu5clT2hJVo84XnfH5ngyC3ZIHWTUwCDVCHJb1 X-Received: by 2002:a17:90a:9905:: with SMTP id b5mr606383pjp.70.1566314746198; Tue, 20 Aug 2019 08:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566314746; cv=none; d=google.com; s=arc-20160816; b=KUKlL+1/PHgKrPFvz2UQTLPPeZblLnLRFHTKsWDfDI0qMXPY2v7J0zSew+IBkUuOXD UupCtJaf6OfZcirnTd1NF9GgrpB84hCRxgHO6C6hsaw4m2CHb1e6KtnrCP17RLIbQQNZ bk9DQ8jIeljUR3XbKL665M5MXWZ1fH/OjalH9mkXXdvW3bMXShX1ADK3rekZrF6Bre3C xhttVL4XAMFGwp8S+4BAytIg+dE8ovYusgq/FFwmV8bLueCYONU3WN/2bb3AA74xrMFo EBVizF5K37m13lX9AWP7ASFLMiUdgqwBfSfW2wb259L+zwSSbHR0K1+ySLO+q35xWp5D YyDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9u3D2OwuAYkomknxfe7nI/uhFErIGYgeOUnr7FlThfo=; b=YqdQk22KcRUoipS/JvmtScu8L7sTdpthCwLvkiFQbyRWI5JP0pg1WXvY/0s0hLGS9V JVR1Jzjrv10RNbPgf8S4RrIGA7YdfvBzwqOFhzA177TOLU0ABh90y48aq5lBTdyb3NZj qkj6Mp7QkLbEj2/XZMRkJGgs0ANOTsN7ofa2nz12dTNg1xZQSBLp6D5Tb4KSWLBG66xs WXndJT0R4w5K1mnF2EKXItWbBpzEW14UbWxXsIdjzGafCHEuk0PPJSdDmyMkLfrmbH/V 3tqEGg99oPiZM6pqWm7bRr4Le8/xxkJw9SryMNqAYVreJ8etN49Q8EGA5+euPAKacPLj vu9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=m+ndBfXq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9si12555238pgc.305.2019.08.20.08.25.30; Tue, 20 Aug 2019 08:25:46 -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=fail header.i=@lunn.ch header.s=20171124 header.b=m+ndBfXq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730397AbfHTPXK (ORCPT + 99 others); Tue, 20 Aug 2019 11:23:10 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:45328 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730116AbfHTPXK (ORCPT ); Tue, 20 Aug 2019 11:23:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9u3D2OwuAYkomknxfe7nI/uhFErIGYgeOUnr7FlThfo=; b=m+ndBfXqTovUnl033Fp+MDqeeN Mv/HnN0m3aWleaTRaHzZul7L8Er7+l7d/NR7kGEqIcomDNa9WAwfJ5oxQdC8r1lFkm65PTL0Dq5bj /LvOajNBLmUOR9UgA1af7HDshm1/WnFVz7UOqvrxUYOt2GSRsnA5BLiiC3w49eKMH8Js=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1i05yU-0006Ah-GW; Tue, 20 Aug 2019 17:23:06 +0200 Date: Tue, 20 Aug 2019 17:23:06 +0200 From: Andrew Lunn To: Miroslav Lichvar Cc: Hubert Feurstein , netdev , lkml , Richard Cochran , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , "David S. Miller" Subject: Re: [PATCH net-next v3 2/4] net: mdio: add PTP offset compensation to mdiobus_write_sts Message-ID: <20190820152306.GJ29991@lunn.ch> References: <20190820084833.6019-1-hubert.feurstein@vahle.at> <20190820084833.6019-3-hubert.feurstein@vahle.at> <20190820094903.GI891@localhost> <20190820142537.GL891@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190820142537.GL891@localhost> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > - take a second "post" system timestamp after the completion For this hardware, completion is an interrupt, which has a lot of jitter on it. But this hardware is odd, in that it uses an interrupt. Every other MDIO bus controller uses polled IO, with an mdelay(10) or similar between each poll. So the jitter is going to be much larger. Even though the FEC is special with its interrupt completion, i would like to see the solution being reasonably generic so that others can copy it into other MDIO bus drivers. That is what is nice about taking the time stamp around the write which triggers the bus transaction. It is independent of interrupt or polled, and should mean about the same thing for different vendors hardware. Andrew