diff options
author | Achal Verma <achalv@nvidia.com> | 2021-04-19 02:06:23 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2021-08-13 16:10:40 -0400 |
commit | 8ba41706ccb86f8f2a0a0cee8d86cf0957c58733 (patch) | |
tree | 0788316cebe49d77df9d976541b162ed679dee9e /drivers | |
parent | acf8657b4c03ad6a74c79924baf7247a11aa0a51 (diff) |
hv-net: add more debug prints
Bug 3283221
Change-Id: I038834db630c6751f03f8c1114ba9b9181fa2201
Signed-off-by: Achal Verma <achalv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2516881
Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com>
Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2575307
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Phoenix Jung <pjung@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tegra_hv_net.c | 12 | ||||
-rw-r--r-- | drivers/platform/tegra/tegra-ivc.c | 12 |
2 files changed, 17 insertions, 7 deletions
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 @@ | |||
3 | * | 3 | * |
4 | * Very loosely based on virtio_net.c | 4 | * Very loosely based on virtio_net.c |
5 | * | 5 | * |
6 | * Copyright (C) 2014-2020, NVIDIA CORPORATION. All rights reserved. | 6 | * Copyright (C) 2014-2021, NVIDIA CORPORATION. All rights reserved. |
7 | * | 7 | * |
8 | * This file is licensed under the terms of the GNU General Public License | 8 | * This file is licensed under the terms of the GNU General Public License |
9 | * version 2. This program is licensed "as is" without any warranty of any | 9 | * 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) | |||
191 | msecs_to_jiffies(hvn->max_tx_delay)); | 191 | msecs_to_jiffies(hvn->max_tx_delay)); |
192 | if (ret <= 0) { | 192 | if (ret <= 0) { |
193 | net_warn_ratelimited( | 193 | net_warn_ratelimited( |
194 | "%s: timed out after %u ms\n", | 194 | "%s: Error getting IVC buffer, timed out after" \ |
195 | " %u ms ERROR %ld \n", | ||
195 | hvn->ndev->name, | 196 | hvn->ndev->name, |
196 | hvn->max_tx_delay); | 197 | hvn->max_tx_delay, PTR_ERR(p)); |
197 | } | 198 | } |
198 | } | 199 | } |
199 | 200 | ||
@@ -224,7 +225,7 @@ static void tegra_hv_net_xmit_work(struct kthread_work *work) | |||
224 | ret = skb_linearize(skb); | 225 | ret = skb_linearize(skb); |
225 | if (ret != 0) { | 226 | if (ret != 0) { |
226 | netdev_err(hvn->ndev, | 227 | netdev_err(hvn->ndev, |
227 | "%s: skb_linearize error=%d\n", | 228 | "%s: skb_linearize failed error=%d\n", |
228 | __func__, ret); | 229 | __func__, ret); |
229 | 230 | ||
230 | dk = dk_linearize; | 231 | dk = dk_linearize; |
@@ -246,6 +247,9 @@ static void tegra_hv_net_xmit_work(struct kthread_work *work) | |||
246 | p = tegra_hv_net_xmit_get_buffer(hvn); | 247 | p = tegra_hv_net_xmit_get_buffer(hvn); |
247 | if (IS_ERR(p)) { | 248 | if (IS_ERR(p)) { |
248 | dk = dk_wq; | 249 | dk = dk_wq; |
250 | netdev_err(hvn->ndev, | ||
251 | "tegra_hv_net_xmit_get_buffer failed" \ | ||
252 | " error=%ld\n", PTR_ERR(p)); | ||
249 | goto drop; | 253 | goto drop; |
250 | } | 254 | } |
251 | 255 | ||
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 @@ | |||
1 | /* | 1 | /* |
2 | * Inter-VM Communication | 2 | * Inter-VM Communication |
3 | * | 3 | * |
4 | * Copyright (C) 2014-2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (C) 2014-2021, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This file is licensed under the terms of the GNU General Public License | 6 | * This file is licensed under the terms of the GNU General Public License |
7 | * version 2. This program is licensed "as is" without any warranty of any | 7 | * version 2. This program is licensed "as is" without any warranty of any |
@@ -563,8 +563,11 @@ EXPORT_SYMBOL(tegra_ivc_write_poke); | |||
563 | void *tegra_ivc_write_get_next_frame(struct ivc *ivc) | 563 | void *tegra_ivc_write_get_next_frame(struct ivc *ivc) |
564 | { | 564 | { |
565 | int result = ivc_check_write(ivc); | 565 | int result = ivc_check_write(ivc); |
566 | if (result) | 566 | if (result) { |
567 | printk_ratelimited("%s :ivc_check_write failed, error %d\n", | ||
568 | __func__, result); | ||
567 | return ERR_PTR(result); | 569 | return ERR_PTR(result); |
570 | } | ||
568 | 571 | ||
569 | return ivc_frame_pointer(ivc, ivc->tx_channel, ivc->w_pos); | 572 | return ivc_frame_pointer(ivc, ivc->tx_channel, ivc->w_pos); |
570 | } | 573 | } |
@@ -574,8 +577,11 @@ EXPORT_SYMBOL(tegra_ivc_write_get_next_frame); | |||
574 | int tegra_ivc_write_advance(struct ivc *ivc) | 577 | int tegra_ivc_write_advance(struct ivc *ivc) |
575 | { | 578 | { |
576 | int result = ivc_check_write(ivc); | 579 | int result = ivc_check_write(ivc); |
577 | if (result) | 580 | if (result) { |
581 | printk_ratelimited("%s: ivc_check_write failed , error %d\n", | ||
582 | __func__, result); | ||
578 | return result; | 583 | return result; |
584 | } | ||
579 | 585 | ||
580 | ivc_flush_frame(ivc, ivc->tx_handle, ivc->w_pos, 0, ivc->frame_size); | 586 | ivc_flush_frame(ivc, ivc->tx_handle, ivc->w_pos, 0, ivc->frame_size); |
581 | 587 | ||