From patchwork Thu Apr 19 19:49:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 10351483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B4BE760231 for ; Thu, 19 Apr 2018 19:49:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6299284F9 for ; Thu, 19 Apr 2018 19:49:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9953C28500; Thu, 19 Apr 2018 19:49:34 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 1D387284F9 for ; Thu, 19 Apr 2018 19:49:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753419AbeDSTtQ (ORCPT ); Thu, 19 Apr 2018 15:49:16 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:44726 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753280AbeDSTtP (ORCPT ); Thu, 19 Apr 2018 15:49:15 -0400 Received: by mail-lf0-f65.google.com with SMTP id g203-v6so1858216lfg.11 for ; Thu, 19 Apr 2018 12:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=yafnJLwXiOKsDs8etNEyDnnnH1si18z0Tw2rPy6kxjU=; b=S9EZYSjjplKgGtKFpRcsp77LbfCsX7qHZCrTXkKdnGM01QPfXfV7ifAtlDwG1MNhHa ehJcMRwS3PRYDgD5aFKgdVemQxCWQYbdoUiOaUUf3HVh2YDhEZqqHOsBFPHaEB3G+ZXU 5NbEHOuzjFi+VdINyatEwzXaPcyfyzCQQkUp0= 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; bh=yafnJLwXiOKsDs8etNEyDnnnH1si18z0Tw2rPy6kxjU=; b=KYUCc0iA746GYwJlNDQ1P1Kuqw90cQDWc6krDaBT7AdkugiG2ZKer1C/FSPMNJDP6k 9GrfyQSw/MqP0ZXwqWCYwRvlgbHKyA8p8dphnBucPVQ5WPksHShx5y5Pq7KGHlBhpEXb FOlOcXA3N8PrgL5EVXomoxZ6UqEkkPMNIAarqHMeqTLcMr2Ds9I/vfRMyf0DHAm3Ycz5 btkUfqe+4V65gwJaBtUbjDY+ZGmbeZotY6yFV8CMoYgMDAehfyxeyyuwt7tS6nizejXM BjfgsPkH0UIq2/Zom1GSZneCDvW162fCwGGDh1Fk0K3MoS5Qw0PW/RKonq7oAUU4pywq pvIQ== X-Gm-Message-State: ALQs6tAX8QdiIhYYNW6rndHUyrQgGqCIsqHVpr2swRjeZRlQ+y/w7dRT JO4EaqZ8jGKkRNK0w7pCyiJYtw== X-Google-Smtp-Source: AIpwx4/yXZjZkKW5LTUPkF8Lxr4oht6WQjNJs8U7R9EdrS+J/Otty1yGeJdsyi59vlT9p14jYgQzgw== X-Received: by 10.46.64.130 with SMTP id r2mr5317139lje.48.1524167353767; Thu, 19 Apr 2018 12:49:13 -0700 (PDT) Received: from khorivan.synapse.com (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id j87-v6sm913411lfk.53.2018.04.19.12.49.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Apr 2018 12:49:12 -0700 (PDT) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com Cc: davem@davemloft.net, linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH v2] net: ethernet: ti: cpsw: fix tx vlan priority mapping Date: Thu, 19 Apr 2018 22:49:09 +0300 Message-Id: <1524167349-11004-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.7.4 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 The CPDMA_TX_PRIORITY_MAP in real is vlan pcp field priority mapping register and basically replaces vlan pcp field for tagged packets. So, set it to be 1:1 mapping. Otherwise, it will cause unexpected change of egress vlan tagged packets, like prio 2 -> prio 5. Fixes: e05107e6b747 ("net: ethernet: ti: cpsw: add multi queue support") Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk --- Based on net/master drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 3037127..74f8284 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -129,7 +129,7 @@ do { \ #define RX_PRIORITY_MAPPING 0x76543210 #define TX_PRIORITY_MAPPING 0x33221100 -#define CPDMA_TX_PRIORITY_MAP 0x01234567 +#define CPDMA_TX_PRIORITY_MAP 0x76543210 #define CPSW_VLAN_AWARE BIT(1) #define CPSW_RX_VLAN_ENCAP BIT(2)