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.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_NEOMUTT autolearn=unavailable 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 51E74C04AB6 for ; Fri, 31 May 2019 16:09:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 269FB26B9A for ; Fri, 31 May 2019 16:09:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AgBCH0mF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726843AbfEaQJO (ORCPT ); Fri, 31 May 2019 12:09:14 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:37791 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726774AbfEaQJN (ORCPT ); Fri, 31 May 2019 12:09:13 -0400 Received: by mail-pf1-f193.google.com with SMTP id a23so6492629pff.4; Fri, 31 May 2019 09:09:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=z/RgCzJSEHMAir5ujFpg5rPcb9HWXDTiA2qf/D1dWKs=; b=AgBCH0mF8vGGY3a4ElXuzBF5oJFQxIVCYpQKgewAzxF/VKnOJd4nHqAD6+WhZLHuUP zFdIcjKkMai+c34XKv3eceJcR2fYf0m4wzLJTibA8LWyRkuXuovkSQYMHOB/Pot5HRKk SPF+wqNgs+NyQsBon2j+Kw3/4WRp+NYQo3SEdoKanzQiUN0PiTQN2teFD0muUiZZQHPw 24pTEkxYBRgGZMxgzYCJA7/qmLtADPGQXcD2jSGhp/YA5NPULXWzh12t8yDd1a/PY92A XmhluJYx6Wkt66KwzIAfph7d6p5AC2iU0gWtu3F50V+L30AAOyv6arEhaMam2e2BT5tM IU0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=z/RgCzJSEHMAir5ujFpg5rPcb9HWXDTiA2qf/D1dWKs=; b=V702skxRVusinHZN+L2Dz2NmJCNmYG/sycc6kS8oo0l9qUF1rdQMo0HMyjcOaKcYjB CmbC0PeI6J0+L6lQl9kurGBPFvr61k3Xbc4e9QPQTXXUl4qtX93yXMCJ5F4+NJ9JMRSO M701HAHfpOzrU2fH4DjkqY+8YFRraE3zV23FvNcHFwCtv12d59EdT+uWm8qzar469U34 3ZXJgriwvueevCeVSx9WBjJD52/WG76wzSIDwriiORi079cHnosOn6HOOKBmi9cRJN36 DxVqRKiZmKedOeqKKgzT0Jce1QCV726VmfPC9MrQNjVue9gVaFqXD0aSX0h887KBOeHm VGtA== X-Gm-Message-State: APjAAAXmtcw3K6n8iVsL9STzdlyM2Ht88r2BZyjmAPUfAApGuOchtt/Y ptNPepK8I3RYzemAHSBPg7g= X-Google-Smtp-Source: APXvYqw7B8ATADxnQAQTD6Z6CyqYTv+plBt1DoWcOXcq8ws+P7duyIFver5dQNrUF8Y9qFK5nymAlg== X-Received: by 2002:a63:205b:: with SMTP id r27mr10323216pgm.330.1559318953074; Fri, 31 May 2019 09:09:13 -0700 (PDT) Received: from localhost (c-73-222-71-142.hsd1.ca.comcast.net. [73.222.71.142]) by smtp.gmail.com with ESMTPSA id x18sm7423076pfo.8.2019.05.31.09.09.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 May 2019 09:09:12 -0700 (PDT) Date: Fri, 31 May 2019 09:09:09 -0700 From: Richard Cochran To: Vladimir Oltean Cc: Florian Fainelli , Vivien Didelot , Andrew Lunn , "David S. Miller" , John Stultz , Thomas Gleixner , Stephen Boyd , lkml , netdev Subject: Re: [PATCH net-next 0/5] PTP support for the SJA1105 DSA driver Message-ID: <20190531160909.jh43saqvichukv7p@localhost> References: <20190530143037.iky5kk3h4ssmec3f@localhost> <20190530150557.iur7fruhyf5bs3qw@localhost> <20190531043417.6phscbpmo6krvxam@localhost> <20190531140841.j4f72rlojmaayqr5@localhost> <20190531151151.k3a2wdf5f334qmqh@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, May 31, 2019 at 06:23:34PM +0300, Vladimir Oltean wrote: > You mean to queue it and subvert DSA's own RX timestamping callback? No, use the callback. > Why would I do that? Just so as not to introduce my .can_timestamp > callback? Right, the .can_timestamp is unneeded, AFAICT. > > Now I'm starting to understand your series. I think it can be done in > > simpler way... > > > > sja1105_rcv_meta_state_machine - can and should be at the driver level > > and not at the port level. > > > > Can: yes. Should: why? To keep it simple and robust. > One important aspect makes this need be a little bit more complicated: > reconstructing these RX timestamps. > You see, there is a mutex on the SPI bus, so in practice I do need the > sja1105_port_rxtstamp_work for exactly this purpose - to read the > timestamping clock over SPI. Sure. But you schedule the work after a META frame. And no busy waiting is needed. Thanks, Richard