From patchwork Mon Nov 12 14:00:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 10678673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D53D14BA for ; Mon, 12 Nov 2018 14:00:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DF4E29C3D for ; Mon, 12 Nov 2018 14:00:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 126A829C47; Mon, 12 Nov 2018 14:00:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B43B129C08 for ; Mon, 12 Nov 2018 14:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729973AbeKLXyI (ORCPT ); Mon, 12 Nov 2018 18:54:08 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:44915 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729869AbeKLXyC (ORCPT ); Mon, 12 Nov 2018 18:54:02 -0500 Received: by mail-lj1-f196.google.com with SMTP id k19-v6so7676666lji.11 for ; Mon, 12 Nov 2018 06:00:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rZTyv24PfvDa0ThzLaZLU5MGIq0YKhyiUqNpDEImNKg=; b=h0W2187IgJZ40vpMO7oE1l5ITxBgj/yfZJLiei2mWlUjb6ZzaPrG6wOekEtoXnZCWN 8NFByo8sRuLIQDH82chbq6DpvaSK7tJEX84Ms9P4JAFBRDViSx4t3KfGyNbGB6koP+XB xa7skDRzZT2J+a/Tzl9HyYJk31rJQ6HEL5n7s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rZTyv24PfvDa0ThzLaZLU5MGIq0YKhyiUqNpDEImNKg=; b=XrJCmrHm4qvlGT0mT0AAP6+avENlqRnhhqU40qGBwVy1fQ7JWOXz2M5pnq2lN6gZMM VkC//q451iNHKV6PMsItQ/fXXlJssR9gmFx/I+wmMZOvY6AFbXXgzPvJwM9MKvH0JNLY Uxk5PL+TgG6b43cOAQ8X5vEWTYnUjj7QxeNuPmjabiqvUSfg2wmlgCwp5EOvJI4Jt3XG m02mIpsI/wouLqx56LHZ8CMfyMdiiZkDkOVQBSsVGY8DGjugc2O4X/SKK/AAsoavqnly 03zB+4arWX3Qp3PQo6/QKpH6migdICg8znD9AraT5UZco2WFeiEB6+1x/6Ks3ZnlXP+O Ze1w== X-Gm-Message-State: AGRZ1gLfbMEhqdMf8Ab14kKjgNhyFa9k8Xd5+D7Hsy0VRzAuXSjAHekI uhB42vjuExy6ImZffiRPFyYQOg== X-Google-Smtp-Source: AJdET5f/lMTsJdkr1BoGqkBwdMn4Vn7SHr8wH4trZRksJt6P+22uTeKRCwQkP3ItOg8kX7auDkuWHg== X-Received: by 2002:a2e:6a13:: with SMTP id f19-v6mr820394ljc.41.1542031236526; Mon, 12 Nov 2018 06:00:36 -0800 (PST) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id 26-v6sm3546387lje.18.2018.11.12.06.00.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 06:00:36 -0800 (PST) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com, davem@davemloft.net Cc: linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH net-next 4/4] net: ethernet: ti: cpsw: allow vlan tagged packets to be timestamped Date: Mon, 12 Nov 2018 16:00:23 +0200 Message-Id: <20181112140023.12407-5-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181112140023.12407-1-ivan.khoronzhuk@linaro.org> References: <20181112140023.12407-1-ivan.khoronzhuk@linaro.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow vlan tagged packets to be timestamped, as no any restrictions for this. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 48ea21e7e0cb..e4aa030f1726 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -283,7 +283,7 @@ struct cpsw_ss_regs { #define CTRL_V2_TS_BITS \ (TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\ - TS_TTL_NONZERO | TS_ANNEX_D_EN | TS_LTYPE1_EN) + TS_TTL_NONZERO | TS_ANNEX_D_EN | TS_LTYPE1_EN | VLAN_LTYPE1_EN) #define CTRL_V2_ALL_TS_MASK (CTRL_V2_TS_BITS | TS_TX_EN | TS_RX_EN) #define CTRL_V2_TX_TS_BITS (CTRL_V2_TS_BITS | TS_TX_EN) @@ -293,7 +293,7 @@ struct cpsw_ss_regs { #define CTRL_V3_TS_BITS \ (TS_107 | TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\ TS_TTL_NONZERO | TS_ANNEX_F_EN | TS_ANNEX_D_EN |\ - TS_LTYPE1_EN) + TS_LTYPE1_EN | VLAN_LTYPE1_EN) #define CTRL_V3_ALL_TS_MASK (CTRL_V3_TS_BITS | TS_TX_EN | TS_RX_EN) #define CTRL_V3_TX_TS_BITS (CTRL_V3_TS_BITS | TS_TX_EN) @@ -2235,6 +2235,7 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv) slave_write(slave, mtype, CPSW2_TS_SEQ_MTYPE); slave_write(slave, ctrl, CPSW2_CONTROL); writel_relaxed(ETH_P_1588, &cpsw->regs->ts_ltype); + writel_relaxed(ETH_P_8021Q, &cpsw->regs->vlan_ltype); } static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)