Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4107845imu; Mon, 12 Nov 2018 06:01:22 -0800 (PST) X-Google-Smtp-Source: AJdET5fwzu6CHXmumB0BPqc4olSo9018Ag/4rQPUO4oj2kczJhauN/vbfXMGLEO/JnNDKZWgf6xZ X-Received: by 2002:a17:902:9004:: with SMTP id a4-v6mr1059679plp.334.1542031281971; Mon, 12 Nov 2018 06:01:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542031281; cv=none; d=google.com; s=arc-20160816; b=mdbLLFiE2gDoCbpBLrE9hsqWuWhKjT6eo887wLLeF7ZNykR/SZTAP6ufQans9Kx+Zi R4/nrvoM9KsEwDoWH9A2sD+U4U/SX5/jnxDu5vGnUWwog4I2kZv3RSBw71ZydiE+3eVQ rb1yIEHJezM/4CbOeUBLmw+iAMb/XXpJZh8TJLbthHj6sirmkuMeFxRZ6jUsUpLAP8DJ 5sXSwbabhnWN75CGbqMll5fZ33G/+8DVXk+5QEglijwm/VJTcbNwD9S8JOlLL3Rc82rT S3ecUJFXYYT1m7nzjTgxPr5xbhEjxXA1SJjgivibzqVNDn2wOuaPV1eplx7rKnTBE0JN O+0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=rZTyv24PfvDa0ThzLaZLU5MGIq0YKhyiUqNpDEImNKg=; b=YMsafJ6KsZusXw6L2t3gKyiAGJD4VaruX228bP0gVuqaE2rzRZKyd8I8AjpgPO4epI ssN/MPjRiaYFaCMT1GQ+2f0dEi5x6V/r0b582U78Y1PXqQKKG1KUi0J3mIdLv+r2ig3p YrZUPZ/54N/cqNl6mTHnaPp9CA1GlRlZsVApTxFJ96wKrVT1P1Y0fdoZpN3x3Zaq6VYt S4Z9fmZqvXVOqn+Amr6LYBDkLc6qMMTDSdyTA3u8t73bNwSZIVB+zza+XrRc8uo6HW/Q e2x63FOCQpiMgOkQzvTpNLAtwrugFshXhFeRWHPYMZs5tRoQZJqUqQl6WVXGWKDPJ4bc 86kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h0W2187I; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5-v6si16961700pfe.237.2018.11.12.06.01.06; Mon, 12 Nov 2018 06:01:21 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=h0W2187I; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729956AbeKLXyC (ORCPT + 99 others); Mon, 12 Nov 2018 18:54:02 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:45456 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729865AbeKLXyC (ORCPT ); Mon, 12 Nov 2018 18:54:02 -0500 Received: by mail-lj1-f195.google.com with SMTP id s5-v6so7669297ljd.12 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=HqKVLELiBCT9oQG9C5WjJX2yDOgUpFUHTZ7W326tn9TIrDC6UmeUONPgKel6bEONaM IqUyOHwQH4gJr0cbvi/l/Ghxv8Y4K/ncIAXG1aZSuLXk/RbPE1F58XZcRxUkbMeosc+n t6yoNYzv3f6TVuYO+T7n/ijX5AhXxSGb2cNrhiElMBMxUGtm5AIrnO2XRRPDAm7YXG5Y J/xh4R5puaFKsZ0lhn46ZoNgyml6rH1obB5pgoizLmHyoGtQYA1pIla3Y/BmH6nz+TVR zY6j/9CGwh33EIMwR8VZv8iBlBRb/ot1Zw7aV31KHfTEgIhkyvpOahs9o/DhKHXRqIAL kJkA== X-Gm-Message-State: AGRZ1gKzxUmdqRo2TDgeB2NKbekKjNc2MC5SCB/WnLNPujq7JhWOyTnK /Lx9EnzyT5XlPPaJBoRmf/rHfg== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) -- 2.17.1