From patchwork Tue Aug 28 11:09:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gounaris X-Patchwork-Id: 962886 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4206Mt5zGrz9ryt for ; Tue, 28 Aug 2018 21:43:38 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4206Mt4Lm8zF0BT for ; Tue, 28 Aug 2018 21:43:38 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=infinera.com (client-ip=31.15.61.139; helo=smtp.transmode.se; envelope-from=david.gounaris@infinera.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from smtp.transmode.se (smtp.transmode.se [31.15.61.139]) by lists.ozlabs.org (Postfix) with ESMTP id 4205ld3gSnzDrM8 for ; Tue, 28 Aug 2018 21:15:41 +1000 (AEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [10.210.73.23]) by smtp.transmode.se (Postfix) with ESMTP id B59DC1189B1C; Tue, 28 Aug 2018 13:09:37 +0200 (CEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [127.0.0.1]) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9) with ESMTP id w7SB9b1Z002600; Tue, 28 Aug 2018 13:09:37 +0200 Received: (from dago@localhost) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9/Submit) id w7SB9bwO002599; Tue, 28 Aug 2018 13:09:37 +0200 From: David Gounaris To: qiang.zhao@nxp.com, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 1/6] net/wan/fsl_ucc_hdlc: allow ucc index up to 4 Date: Tue, 28 Aug 2018 13:09:16 +0200 Message-Id: <20180828110921.2542-2-david.gounaris@infinera.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180828110921.2542-1-david.gounaris@infinera.com> References: <20180828110921.2542-1-david.gounaris@infinera.com> X-Mailman-Approved-At: Tue, 28 Aug 2018 21:34:24 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Gounaris Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" There is a need to allow higher indexes to be able to support MPC83xx platforms. (UCC1-UCC5) Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 5f0366a125e2..3c0e0a1d19ba 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.c +++ b/drivers/net/wan/fsl_ucc_hdlc.c @@ -1015,7 +1015,7 @@ static int ucc_hdlc_probe(struct platform_device *pdev) } ucc_num = val - 1; - if ((ucc_num > 3) || (ucc_num < 0)) { + if ((ucc_num > 4) || (ucc_num < 0)) { dev_err(&pdev->dev, ": Invalid UCC num\n"); return -EINVAL; } From patchwork Tue Aug 28 11:09:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gounaris X-Patchwork-Id: 962887 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4206Q41PBGz9ryt for ; Tue, 28 Aug 2018 21:45:32 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4206Q3724MzDrq6 for ; Tue, 28 Aug 2018 21:45:31 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=infinera.com (client-ip=31.15.61.139; helo=smtp.transmode.se; envelope-from=david.gounaris@infinera.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from smtp.transmode.se (smtp.transmode.se [31.15.61.139]) by lists.ozlabs.org (Postfix) with ESMTP id 4205lh09z6zDqC3 for ; Tue, 28 Aug 2018 21:15:43 +1000 (AEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [10.210.73.23]) by smtp.transmode.se (Postfix) with ESMTP id 9C45C118ACD2; Tue, 28 Aug 2018 13:09:38 +0200 (CEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [127.0.0.1]) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9) with ESMTP id w7SB9cAY002604; Tue, 28 Aug 2018 13:09:38 +0200 Received: (from dago@localhost) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9/Submit) id w7SB9cMA002603; Tue, 28 Aug 2018 13:09:38 +0200 From: David Gounaris To: qiang.zhao@nxp.com, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/6] net/wan/fsl_ucc_hdlc: allow PARITY_CRC16_PR0_CCITT parity Date: Tue, 28 Aug 2018 13:09:17 +0200 Message-Id: <20180828110921.2542-3-david.gounaris@infinera.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180828110921.2542-1-david.gounaris@infinera.com> References: <20180828110921.2542-1-david.gounaris@infinera.com> X-Mailman-Approved-At: Tue, 28 Aug 2018 21:34:24 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Gounaris Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 3c0e0a1d19ba..963b3b5ae15e 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.c +++ b/drivers/net/wan/fsl_ucc_hdlc.c @@ -780,7 +780,8 @@ static int ucc_hdlc_attach(struct net_device *dev, unsigned short encoding, if (parity != PARITY_NONE && parity != PARITY_CRC32_PR1_CCITT && - parity != PARITY_CRC16_PR1_CCITT) + parity != PARITY_CRC16_PR1_CCITT && + parity != PARITY_CRC16_PR0_CCITT) return -EINVAL; priv->encoding = encoding; From patchwork Tue Aug 28 11:09:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gounaris X-Patchwork-Id: 962885 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4206Kk48KZz9ryt for ; Tue, 28 Aug 2018 21:41:46 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4206Kk2SR6zDrq6 for ; Tue, 28 Aug 2018 21:41:46 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=infinera.com (client-ip=31.15.61.139; helo=smtp.transmode.se; envelope-from=david.gounaris@infinera.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com X-Greylist: delayed 355 seconds by postgrey-1.36 at bilbo; Tue, 28 Aug 2018 21:15:41 AEST Received: from smtp.transmode.se (smtp.transmode.se [31.15.61.139]) by lists.ozlabs.org (Postfix) with ESMTP id 4205ld3Sw6zDqC3 for ; Tue, 28 Aug 2018 21:15:41 +1000 (AEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [10.210.73.23]) by smtp.transmode.se (Postfix) with ESMTP id 57124118ACD3; Tue, 28 Aug 2018 13:09:39 +0200 (CEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [127.0.0.1]) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9) with ESMTP id w7SB9dku002608; Tue, 28 Aug 2018 13:09:39 +0200 Received: (from dago@localhost) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9/Submit) id w7SB9d9k002607; Tue, 28 Aug 2018 13:09:39 +0200 From: David Gounaris To: qiang.zhao@nxp.com, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 3/6] net/wan/fsl_ucc_hdlc: Adding ARPHRD_ETHER Date: Tue, 28 Aug 2018 13:09:18 +0200 Message-Id: <20180828110921.2542-4-david.gounaris@infinera.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180828110921.2542-1-david.gounaris@infinera.com> References: <20180828110921.2542-1-david.gounaris@infinera.com> X-Mailman-Approved-At: Tue, 28 Aug 2018 21:34:24 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Gounaris Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This was done to avoid discarding ethernet packets when using HDLC_ETH protocol. Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 963b3b5ae15e..54e2b2143e36 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.c +++ b/drivers/net/wan/fsl_ucc_hdlc.c @@ -375,6 +375,10 @@ static netdev_tx_t ucc_hdlc_tx(struct sk_buff *skb, struct net_device *dev) dev->stats.tx_bytes += skb->len; break; + case ARPHRD_ETHER: + dev->stats.tx_bytes += skb->len; + break; + default: dev->stats.tx_dropped++; dev_kfree_skb(skb); @@ -512,6 +516,8 @@ static int hdlc_rx_done(struct ucc_hdlc_private *priv, int rx_work_limit) break; case ARPHRD_PPP: + case ARPHRD_ETHER: + length -= HDLC_CRC_SIZE; skb = dev_alloc_skb(length); From patchwork Tue Aug 28 11:09:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gounaris X-Patchwork-Id: 962880 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4206HS1S1rz9ryn for ; Tue, 28 Aug 2018 21:39:48 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4206HS06cxzF0BT for ; Tue, 28 Aug 2018 21:39:48 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=infinera.com (client-ip=31.15.61.139; helo=smtp.transmode.se; envelope-from=david.gounaris@infinera.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from smtp.transmode.se (smtp.transmode.se [31.15.61.139]) by lists.ozlabs.org (Postfix) with ESMTP id 4205ld3dgwzDrJ5 for ; Tue, 28 Aug 2018 21:15:41 +1000 (AEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [10.210.73.23]) by smtp.transmode.se (Postfix) with ESMTP id 1DADF118AD0A; Tue, 28 Aug 2018 13:09:40 +0200 (CEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [127.0.0.1]) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9) with ESMTP id w7SB9eu0002613; Tue, 28 Aug 2018 13:09:40 +0200 Received: (from dago@localhost) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9/Submit) id w7SB9e5s002612; Tue, 28 Aug 2018 13:09:40 +0200 From: David Gounaris To: qiang.zhao@nxp.com, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 4/6] net/wan/fsl_ucc_hdlc: default hmask value Date: Tue, 28 Aug 2018 13:09:19 +0200 Message-Id: <20180828110921.2542-5-david.gounaris@infinera.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180828110921.2542-1-david.gounaris@infinera.com> References: <20180828110921.2542-1-david.gounaris@infinera.com> X-Mailman-Approved-At: Tue, 28 Aug 2018 21:34:24 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Gounaris Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Set default HMASK to 0x0000 to use promiscuous mode in the hdlc controller. Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.h b/drivers/net/wan/fsl_ucc_hdlc.h index c21134c1f180..5bc3d1a6ca6e 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.h +++ b/drivers/net/wan/fsl_ucc_hdlc.h @@ -134,7 +134,7 @@ struct ucc_hdlc_private { #define HDLC_HEAD_MASK 0x0000 #define DEFAULT_HDLC_HEAD 0xff44 -#define DEFAULT_ADDR_MASK 0x00ff +#define DEFAULT_ADDR_MASK 0x0000 #define DEFAULT_HDLC_ADDR 0x00ff #define BMR_GBL 0x20000000 From patchwork Tue Aug 28 11:09:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gounaris X-Patchwork-Id: 962879 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4206FD6s5Rz9ryn for ; Tue, 28 Aug 2018 21:37:52 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4206FD5dGCzDrYf for ; Tue, 28 Aug 2018 21:37:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=infinera.com (client-ip=31.15.61.139; helo=smtp.transmode.se; envelope-from=david.gounaris@infinera.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from smtp.transmode.se (smtp.transmode.se [31.15.61.139]) by lists.ozlabs.org (Postfix) with ESMTP id 4205ld3bvVzDr5Y for ; Tue, 28 Aug 2018 21:15:41 +1000 (AEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [10.210.73.23]) by smtp.transmode.se (Postfix) with ESMTP id D817F118ADC5; Tue, 28 Aug 2018 13:09:40 +0200 (CEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [127.0.0.1]) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9) with ESMTP id w7SB9egu002618; Tue, 28 Aug 2018 13:09:40 +0200 Received: (from dago@localhost) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9/Submit) id w7SB9ePd002617; Tue, 28 Aug 2018 13:09:40 +0200 From: David Gounaris To: qiang.zhao@nxp.com, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 5/6] net/wan/fsl_ucc_hdlc: GUMR for non tsa mode Date: Tue, 28 Aug 2018 13:09:20 +0200 Message-Id: <20180828110921.2542-6-david.gounaris@infinera.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180828110921.2542-1-david.gounaris@infinera.com> References: <20180828110921.2542-1-david.gounaris@infinera.com> X-Mailman-Approved-At: Tue, 28 Aug 2018 21:34:24 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Gounaris Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The following bits in the GUMR is changed for non tsa mode: CDS, CTSP and CTSS are set to zero. When set, there is no tx interrupts from the controller. Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 54e2b2143e36..e6154a6547e6 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.c +++ b/drivers/net/wan/fsl_ucc_hdlc.c @@ -97,6 +97,13 @@ static int uhdlc_init(struct ucc_hdlc_private *priv) if (priv->tsa) { uf_info->tsa = 1; uf_info->ctsp = 1; + uf_info->cds = 1; + uf_info->ctss = 1; + } + else { + uf_info->cds = 0; + uf_info->ctsp = 0; + uf_info->ctss = 0; } /* This sets HPM register in CMXUCR register which configures a From patchwork Tue Aug 28 11:09:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gounaris X-Patchwork-Id: 962888 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4206SW1P6yz9ryt for ; Tue, 28 Aug 2018 21:47:39 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4206SW047hzDr5Y for ; Tue, 28 Aug 2018 21:47:39 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=infinera.com (client-ip=31.15.61.139; helo=smtp.transmode.se; envelope-from=david.gounaris@infinera.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=infinera.com Received: from smtp.transmode.se (smtp.transmode.se [31.15.61.139]) by lists.ozlabs.org (Postfix) with ESMTP id 4205lh0HMpzDr5Y for ; Tue, 28 Aug 2018 21:15:44 +1000 (AEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [10.210.73.23]) by smtp.transmode.se (Postfix) with ESMTP id 9F834118ADCB; Tue, 28 Aug 2018 13:09:41 +0200 (CEST) Received: from se-eswlab1-lx.infinera.com (se-eswlab1-lx.infinera.com [127.0.0.1]) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9) with ESMTP id w7SB9ft0002622; Tue, 28 Aug 2018 13:09:41 +0200 Received: (from dago@localhost) by se-eswlab1-lx.infinera.com (8.14.9/8.14.9/Submit) id w7SB9fiX002621; Tue, 28 Aug 2018 13:09:41 +0200 From: David Gounaris To: qiang.zhao@nxp.com, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 6/6] net/wan/fsl_ucc_hdlc: tx timeout handler Date: Tue, 28 Aug 2018 13:09:21 +0200 Message-Id: <20180828110921.2542-7-david.gounaris@infinera.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180828110921.2542-1-david.gounaris@infinera.com> References: <20180828110921.2542-1-david.gounaris@infinera.com> X-Mailman-Approved-At: Tue, 28 Aug 2018 21:34:24 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Gounaris Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Added tx timerout handler. This helps when troubleshooting. Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index e6154a6547e6..30f416bace2c 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.c +++ b/drivers/net/wan/fsl_ucc_hdlc.c @@ -1001,11 +1001,15 @@ static const struct dev_pm_ops uhdlc_pm_ops = { #define HDLC_PM_OPS NULL #endif +static void uhdlc_tx_timeout(struct net_device *ndev) { + netdev_err(ndev, "%s\n", __FUNCTION__); +} static const struct net_device_ops uhdlc_ops = { .ndo_open = uhdlc_open, .ndo_stop = uhdlc_close, .ndo_start_xmit = hdlc_start_xmit, .ndo_do_ioctl = uhdlc_ioctl, + .ndo_tx_timeout = uhdlc_tx_timeout, }; static int ucc_hdlc_probe(struct platform_device *pdev) @@ -1121,6 +1125,7 @@ static int ucc_hdlc_probe(struct platform_device *pdev) hdlc = dev_to_hdlc(dev); dev->tx_queue_len = 16; dev->netdev_ops = &uhdlc_ops; + dev->watchdog_timeo = 2*HZ; hdlc->attach = ucc_hdlc_attach; hdlc->xmit = ucc_hdlc_tx; netif_napi_add(dev, &uhdlc_priv->napi, ucc_hdlc_poll, 32);