Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5051392imu; Sun, 25 Nov 2018 15:47:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/WFoQwJJ25N0rEic0oWhUC8bgwE6j/t+qninC1GZ8TLXDIfgvLXPQFbY1WzZ44S0v0VRFIC X-Received: by 2002:a63:9809:: with SMTP id q9mr22525853pgd.109.1543189641906; Sun, 25 Nov 2018 15:47:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543189641; cv=none; d=google.com; s=arc-20160816; b=OsolDeu2djCZp40Ob6Xk9MWSAdoAuk47dZlNcXUXAWsCVt9aMatd+Hhxqc16Gc+LeN MmHNRgEJXRDRkOQ1Ox+DnuuARL+sKyfl4Fk1EvvpZ89Vu57Ob0WxAIh40Px2olSgs2nX ekvVI9GDiJyYCHwLu569w5cfDRu4as/dv4AyLtaHfH1GCq8YsH2V6W04fnXTlvBTacAR LOc4jFLgHJ6D/7qaEG5UbOiEbgHtSevg5QS7OA4pb4WAl7XPvM+9qJ40ajxur+SV8e0t f6oIC43J+LW6DBuB7650NnsesnmPygKEcvCK7e8rgcizx9To38A2g1Q7Qx+wlR3mFJy8 R42w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=lf8LtwdUZED+A+ylnyyjZqjtl4ylg+CfCwWhN2BcRJg=; b=qCvqaedlHSuGEGbI9xuj1qfeLUXC5F9oP+xIHMzcgyu3QX7ysuMQQXuz6HbR8XcZOC pjFzfqI98at1jxMpG3pSIfncK4zPLrdlUht8ij9xMGrHKoZzu83Hrb8qboqh7HbCJ7Cx r1XXhpCdan3xu/U0nraLMRjcsFoD7/AiwJ8IU77BDtecbrZvuMi0fFuc09A+JIJbxwiI 4oJ00xmLFIPgitUP2AJloABfaX/eiCikxEcLVpuMwp0urQcuOIeDnOBtLLrWKp4yAQWl SfQAoLHCvGSWG6KSInNBQhHytS+SQljxK+F6XnZjv2IGuotjhThBXoXncecb0C2MATYe 6T3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JQWzSE4+; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k72si56891501pge.310.2018.11.25.15.47.06; Sun, 25 Nov 2018 15:47: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=@ti.com header.s=ti-com-17Q1 header.b=JQWzSE4+; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726143AbeKZKit (ORCPT + 99 others); Mon, 26 Nov 2018 05:38:49 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:48770 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbeKZKit (ORCPT ); Mon, 26 Nov 2018 05:38:49 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id wAPNkRfo091030; Sun, 25 Nov 2018 17:46:27 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1543189587; bh=lf8LtwdUZED+A+ylnyyjZqjtl4ylg+CfCwWhN2BcRJg=; h=From:To:CC:Subject:Date; b=JQWzSE4+6TC5xJcikUjvWKs1oSkm2Cft2JTR08nSgriYOyagYK/hslNFE2jgdk+R8 agWc9LWA41TuHQozVOOyINva/to7rDllmC5dUQzOsGF1HmRnkx1l2Ho/QPizfJqhBS la93ZcWq9UpU+8uonhIQw0qlYITrklXTB0EIYdZc= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wAPNkRbB126123 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 25 Nov 2018 17:46:27 -0600 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Sun, 25 Nov 2018 17:46:27 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Sun, 25 Nov 2018 17:46:27 -0600 Received: from legion.dal.desgin.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wAPNkRJT017822; Sun, 25 Nov 2018 17:46:27 -0600 Received: from localhost (uda0226610.dhcp.ti.com [128.247.59.147]) by legion.dal.desgin.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id wAPNkRU03338; Sun, 25 Nov 2018 17:46:27 -0600 (CST) From: Grygorii Strashko To: "David S. Miller" , CC: Sekhar Nori , , , Ivan Khoronzhuk , Grygorii Strashko Subject: [PATCH net-next] net: ethernet: ti: cpsw: drop vid0 configuration in dual_mac mode Date: Sun, 25 Nov 2018 17:46:26 -0600 Message-ID: <20181125234626.28474-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.10.5 MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In dual_mac mode CPSW driver uses vid1 and vid2 by default to implement dual mac mode wich are used to configure pvids for each external ports. But, historicaly, it also adds vid0 to ALE table and sets "untag" bits for both ext. ports. As result, it's imposible to use priority tagged packets in dual mac mode. Hence, drop vid0 configuration in dual mac mode as it's not required for dual mac mode functionality and, this way, make it possible to use priority tagged packet in dual mac mode. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 15d563c..4f3a159 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2036,9 +2036,6 @@ static int cpsw_ndo_open(struct net_device *ndev) /* Add default VLAN */ if (!cpsw->data.dual_emac) cpsw_add_default_vlan(priv); - else - cpsw_ale_add_vlan(cpsw->ale, cpsw->data.default_vlan, - ALE_ALL_PORTS, ALE_ALL_PORTS, 0, 0); /* initialize shared resources for every ndev */ if (!cpsw->usage_count) { @@ -2490,7 +2487,7 @@ static int cpsw_ndo_vlan_rx_add_vid(struct net_device *ndev, struct cpsw_common *cpsw = priv->cpsw; int ret; - if (vid == cpsw->data.default_vlan) + if (!cpsw->data.dual_emac && vid == cpsw->data.default_vlan) return 0; ret = pm_runtime_get_sync(cpsw->dev); @@ -2528,7 +2525,7 @@ static int cpsw_ndo_vlan_rx_kill_vid(struct net_device *ndev, struct cpsw_common *cpsw = priv->cpsw; int ret; - if (vid == cpsw->data.default_vlan) + if (!cpsw->data.dual_emac && vid == cpsw->data.default_vlan) return 0; ret = pm_runtime_get_sync(cpsw->dev); -- 2.10.5