From 8ba41706ccb86f8f2a0a0cee8d86cf0957c58733 Mon Sep 17 00:00:00 2001 From: Achal Verma Date: Mon, 19 Apr 2021 11:36:23 +0530 Subject: hv-net: add more debug prints Bug 3283221 Change-Id: I038834db630c6751f03f8c1114ba9b9181fa2201 Signed-off-by: Achal Verma Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2516881 Reviewed-by: Dmitry Pervushin Reviewed-by: Rahul Jain (SW-TEGRA) GVS: Gerrit_Virtual_Submit Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2575307 Tested-by: mobile promotions Reviewed-by: svc-mobile-coverity Reviewed-by: Phoenix Jung Reviewed-by: mobile promotions --- drivers/net/tegra_hv_net.c | 12 ++++++++---- drivers/platform/tegra/tegra-ivc.c | 12 +++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/net/tegra_hv_net.c b/drivers/net/tegra_hv_net.c index 1accd6bb6..f17370c38 100644 --- a/drivers/net/tegra_hv_net.c +++ b/drivers/net/tegra_hv_net.c @@ -3,7 +3,7 @@ * * Very loosely based on virtio_net.c * - * Copyright (C) 2014-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (C) 2014-2021, NVIDIA CORPORATION. All rights reserved. * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any @@ -191,9 +191,10 @@ static void *tegra_hv_net_xmit_get_buffer(struct tegra_hv_net *hvn) msecs_to_jiffies(hvn->max_tx_delay)); if (ret <= 0) { net_warn_ratelimited( - "%s: timed out after %u ms\n", + "%s: Error getting IVC buffer, timed out after" \ + " %u ms ERROR %ld \n", hvn->ndev->name, - hvn->max_tx_delay); + hvn->max_tx_delay, PTR_ERR(p)); } } @@ -224,7 +225,7 @@ static void tegra_hv_net_xmit_work(struct kthread_work *work) ret = skb_linearize(skb); if (ret != 0) { netdev_err(hvn->ndev, - "%s: skb_linearize error=%d\n", + "%s: skb_linearize failed error=%d\n", __func__, ret); dk = dk_linearize; @@ -246,6 +247,9 @@ static void tegra_hv_net_xmit_work(struct kthread_work *work) p = tegra_hv_net_xmit_get_buffer(hvn); if (IS_ERR(p)) { dk = dk_wq; + netdev_err(hvn->ndev, + "tegra_hv_net_xmit_get_buffer failed" \ + " error=%ld\n", PTR_ERR(p)); goto drop; } diff --git a/drivers/platform/tegra/tegra-ivc.c b/drivers/platform/tegra/tegra-ivc.c index 13c9e0358..1b1bc605e 100644 --- a/drivers/platform/tegra/tegra-ivc.c +++ b/drivers/platform/tegra/tegra-ivc.c @@ -1,7 +1,7 @@ /* * Inter-VM Communication * - * Copyright (C) 2014-2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (C) 2014-2021, NVIDIA CORPORATION. All rights reserved. * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any @@ -563,8 +563,11 @@ EXPORT_SYMBOL(tegra_ivc_write_poke); void *tegra_ivc_write_get_next_frame(struct ivc *ivc) { int result = ivc_check_write(ivc); - if (result) + if (result) { + printk_ratelimited("%s :ivc_check_write failed, error %d\n", + __func__, result); return ERR_PTR(result); + } return ivc_frame_pointer(ivc, ivc->tx_channel, ivc->w_pos); } @@ -574,8 +577,11 @@ EXPORT_SYMBOL(tegra_ivc_write_get_next_frame); int tegra_ivc_write_advance(struct ivc *ivc) { int result = ivc_check_write(ivc); - if (result) + if (result) { + printk_ratelimited("%s: ivc_check_write failed , error %d\n", + __func__, result); return result; + } ivc_flush_frame(ivc, ivc->tx_handle, ivc->w_pos, 0, ivc->frame_size); -- cgit v1.2.2