Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3006633ybl; Mon, 19 Aug 2019 10:37:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgkiyKjEY1q8D/vsorqw+uJD6clNh7Q281GR6LM9YM2eP9GshZemextdV2ucSV3OuAJPZz X-Received: by 2002:a17:902:fe93:: with SMTP id x19mr18203574plm.307.1566236254732; Mon, 19 Aug 2019 10:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566236254; cv=none; d=google.com; s=arc-20160816; b=Ylleu7I4WSGacOTifpczpVvhWjOCZZjH+e++zURD8SwaKZVDPuNCo7Guh8NRmXTuLW Z41TaKjveW3hmwLUreIZ8w2LuXeBPadl56JOSPhAS/lCrMgXaccv9MTqvXe+7kSRxabG cGslzVyvmkttkSIb3yYq9YJCvxucFsHNZzilkpWhzW0+AIGf8f2JJU81QOkzt+QR7ee9 DlGHFClr39fOP7yYQXizh3yaLcImtDNLT3FjeNrLtNXOlamWd8T+wuVjsawKqYJ/X1Xh AhZGUXehdJap4xCYVTp5c/STt8/hBV8lS3JZwo5qIfKgJ0k3o0utmPBIAhYBH91wxK2U PWkg== 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=cEDa1jd0IM5tnPDrGC/SEB2nMeNbumnHk7r8JEYNkc0=; b=u+7/vWW2dTqNyhm+ejg/PYTf7zNrXdkDQt/w30AGGtPvF2vnyrBvuRwBnnsUBnOTC5 qFyfYxK/FRaqHKTSJzVP62HUC++/W+6YhYOU8MM6LkEhkmvjW7kp2hYEfxgCM88QUYWZ kbditx0IbRU+7U9UC+07X96pwfm0+O2O4mMaBHZEPPymi15SS6xnlBUceQ+CI0Y3S7To bYN+EMXLaeSV2hxQVSQhf0/G8S4KbIU2klTniG/CFo9X8u5r2J6e5BMRzQbANXy3A0Ro 6jZexr7EZLv+GyTZmSBbr1Yoe/IZlkCFyDkv2TcoMfcUc34u0Sc1XNwTkmMiWgGSQ1yQ EOzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=xStubRN+; 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 t7si9321539pjf.74.2019.08.19.10.37.19; Mon, 19 Aug 2019 10:37:34 -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=xStubRN+; 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 S1728014AbfHSReo (ORCPT + 99 others); Mon, 19 Aug 2019 13:34:44 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:42394 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726905AbfHSReo (ORCPT ); Mon, 19 Aug 2019 13:34:44 -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=cEDa1jd0IM5tnPDrGC/SEB2nMeNbumnHk7r8JEYNkc0=; b=xStubRN+WGxodKGmzl2+tPIHGy n1dc7ihOw9y7O/sGpHvmsbrrouAa1kpbVZS8qqLOb5vxTkwi1oUg1eIFhQ91KzdgFVyCaI+g5Pf/L PgfrmKT5CQlZMhpBVb+d89HsC9uVnZlBSO0OueriT+N5dyGbL7vyaDcKZHw7zg9Clw6A=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hzlYH-00082s-Gr; Mon, 19 Aug 2019 19:34:41 +0200 Date: Mon, 19 Aug 2019 19:34:41 +0200 From: Andrew Lunn To: Hubert Feurstein Cc: netdev , lkml , Richard Cochran , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" Subject: Re: [PATCH net-next 2/3] net: dsa: mv88e6xxx: extend PTP gettime function to read system clock Message-ID: <20190819173441.GB29991@lunn.ch> References: <20190816163157.25314-1-h.feurstein@gmail.com> <20190816163157.25314-3-h.feurstein@gmail.com> <20190819132733.GE8981@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Mon, Aug 19, 2019 at 07:14:25PM +0200, Hubert Feurstein wrote: > Hi Andrew, > > Am Mo., 19. Aug. 2019 um 15:27 Uhr schrieb Andrew Lunn : > > > > > @@ -45,7 +45,8 @@ static int mv88e6xxx_smi_direct_write(struct mv88e6xxx_chip *chip, > > > { > > > int ret; > > > > > > - ret = mdiobus_write_nested(chip->bus, dev, reg, data); > > > + ret = mdiobus_write_sts_nested(chip->bus, dev, reg, data, > > > + chip->ptp_sts); > > > if (ret < 0) > > > return ret; > > > > > > > Please also make a similar change to mv88e6xxx_smi_indirect_write(). > > The last write in that function should be timestamped. > Since it is already the last write it should be already ok (The > mv88e6xxx_smi_indirect_write > calls the mv88e6xxx_smi_direct_write which initiates the timestamping). Hi Hubert But you are also time stamping the first write as well. And it seems like it is not completely for free. So it would be nice to limit it to the write which actually matters. Andrew