From patchwork Mon Apr 2 14:37:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 10319925 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 D71B760467 for ; Mon, 2 Apr 2018 14:53:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C46C128AA7 for ; Mon, 2 Apr 2018 14:53:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B774228ADE; Mon, 2 Apr 2018 14:53:33 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1BFD128AA7 for ; Mon, 2 Apr 2018 14:53:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eH6W0q85e4UGTJSbqPyte4XOJBW9E/pxCd+Ks8kF11E=; b=hRJAvaXXCToezN LMbFsmpLe0Sjjt7x93ox044BOBZRdkeR15aWy+JWAVf+0shvC8IEIeyQ03FsfLeVNKESoPVYyZjzt m+xvLkE+cl2mlMLsQ4zCjovKmlC6K3wugeuIuaCHCY7IOJYeH0pqw6BfvmennClfXfJefu+4kl0Z1 qJXY+IF2FVS/CJ4y093s4uFtxHx9ToRyg7X7Nzgec5xFiJHbjWEzz+06W4kJnjw73JjFpHi8ZiWzL TJc3tsQzrfHWxy25+iJFRIW8ck8pEyIPbaE7hlvoBod31iQQfRRrnVbDMOPPgrEtDjGYEaAv4cfer Rmi6uGCvZDs+czJl5wYA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f30pp-0000gu-FP; Mon, 02 Apr 2018 14:53:25 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f30Ym-0004Dd-Am for linux-arm-kernel@bombadil.infradead.org; Mon, 02 Apr 2018 14:35:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mQodZeA1pRoKzHU6FA3W8JstikSps7qW+ba3IOptUas=; b=uOT408L61v+E9VOgKixiuTH1g Y/R36WMdOpNwoOr/IGforwnuh+ArgBCIP2svahE0F7HQ6MJUlpAyLx0pFdgF4K/THdH+7hoGPcWZN QNLGLBp7HzPiVMudCW/GIhvLHf7uFJjw7dgEOcJ+PL8+WYgT+tWfc+gqhO9otYiJ+x04AreHmZKwL lVL9SBUsUqCiuD5OEE29l3M9Hw2MDpoE0zob3/1N4UGfVsjDVoBNb9FUjRKWaYDVGXN5tRqDae+Qu KsnZMUBqPRmIEThyf+LTQuiBgMsT/PF/ybY2U1jsnR/FYXZHQMZihFd3uOL1ussSDsImBp3oooIum XGg5Ty7RA==; Received: from fllnx209.ext.ti.com ([198.47.19.16]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f30Yi-0007sK-Fg for linux-arm-kernel@lists.infradead.org; Mon, 02 Apr 2018 14:35:45 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w32EZPkf017923; Mon, 2 Apr 2018 09:35:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1522679725; bh=Xn6BCMEi6cQ74wOBFCfU1Qf4yxYlQlPzG5KRWtMz1Ig=; h=From:To:Subject:Date:In-Reply-To:References; b=qSpIkr9dDZtO6na2539RxUfgy+9c4d7xSd/LTL/c4IuzBp5eQQTKIYP7FuAI471tR 0AxPQNvIN6FxfYN5acQK9KCmeNCub+UbZ/UNeZkHKUJYGS4LS+GRx4Tps84VjkF/+8 Sc3W7jiLOZtWENXetngzXeY9AQSXXw2X0G3JSqj4= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w32EZPKt016325; Mon, 2 Apr 2018 09:35:25 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 2 Apr 2018 09:35:24 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 2 Apr 2018 09:35:24 -0500 Received: from ula0868495.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w32EZKc4025486; Mon, 2 Apr 2018 09:35:24 -0500 From: Murali Karicheri To: , , , , , , , , , Subject: [net-next PATCH v3 07/11] net: netcp: ethss: map vlan priorities to zero flow Date: Mon, 2 Apr 2018 10:37:57 -0400 Message-ID: <1522679881-25643-8-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1522679881-25643-1-git-send-email-m-karicheri2@ti.com> References: <1522679881-25643-1-git-send-email-m-karicheri2@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180402_103544_741868_BC9A17E3 X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The driver currently support only vlan priority zero. So map the vlan priorities to zero flow in hardware. Signed-off-by: Murali Karicheri --- drivers/net/ethernet/ti/netcp_ethss.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c index ab6c918..33d70d4 100644 --- a/drivers/net/ethernet/ti/netcp_ethss.c +++ b/drivers/net/ethernet/ti/netcp_ethss.c @@ -600,6 +600,7 @@ struct gbe_port_regs { struct gbe_port_regs_ofs { u16 port_vlan; u16 tx_pri_map; + u16 rx_pri_map; u16 sa_lo; u16 sa_hi; u16 ts_ctl; @@ -2300,6 +2301,13 @@ static int gbe_slave_open(struct gbe_intf *gbe_intf) gbe_sgmii_rtreset(priv, slave, false); gbe_port_config(priv, slave, priv->rx_packet_max); gbe_set_slave_mac(slave, gbe_intf); + /* For NU & 2U switch, map the vlan priorities to zero + * as we only configure to use priority 0 + */ + if (IS_SS_ID_MU(priv)) + writel(HOST_TX_PRI_MAP_DEFAULT, + GBE_REG_ADDR(slave, port_regs, rx_pri_map)); + /* enable forwarding */ cpsw_ale_control_set(priv->ale, slave->port_num, ALE_PORT_STATE, ALE_PORT_STATE_FORWARD); @@ -3001,6 +3009,7 @@ static int init_slave(struct gbe_priv *gbe_dev, struct gbe_slave *slave, /* Initialize slave port register offsets */ GBENU_SET_REG_OFS(slave, port_regs, port_vlan); GBENU_SET_REG_OFS(slave, port_regs, tx_pri_map); + GBENU_SET_REG_OFS(slave, port_regs, rx_pri_map); GBENU_SET_REG_OFS(slave, port_regs, sa_lo); GBENU_SET_REG_OFS(slave, port_regs, sa_hi); GBENU_SET_REG_OFS(slave, port_regs, ts_ctl);