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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 CDCD0C3A589 for ; Tue, 20 Aug 2019 15:23:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A3C7122DBF for ; Tue, 20 Aug 2019 15:23:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="m+ndBfXq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730389AbfHTPXK (ORCPT ); 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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