diff options
| author | John Moser <jmoser@nvidia.com> | 2017-06-05 17:10:28 -0400 |
|---|---|---|
| committer | Enrico Cadorin <ecadorin@nvidia.com> | 2018-08-27 19:55:04 -0400 |
| commit | 9f8d12e246c78c87c8a00be5004fbc27690779a5 (patch) | |
| tree | aee835838d36847ad8657b59b3537fcc37db6d46 /drivers/virt | |
| parent | 842c0a98e2d80b833f9ea0677fb0719c0958a144 (diff) | |
tegra: ivc cdev: Fix incorrect irq registration
The ivc cdev driver incorrectly uses the hypervisor ivc queue
hwirq number when registering its interrupt handler (vs.
the associated hv device logical irq line number). Due to this
incorrect registration the device does not receive any interrupts
resulting in it not being able to establish the ivc channel.
This change modifies the code to use the hv device logical
irq number associated with the ivc channel during irq handler
registration.
Bug 200308411
JIRA VFND-4214
Change-Id: I400863eb285046cae3c068c58d8fbf1aedb0bac9
Signed-off-by: John Moser <jmoser@nvidia.com>
Reviewed-on: http://git-master/r/1496247
Reviewed-on: http://git-master/r/1498656
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dennis Kou <dkou@nvidia.com>
Reviewed-by: Vladislav Buzov <vbuzov@nvidia.com>
Diffstat (limited to 'drivers/virt')
| -rw-r--r-- | drivers/virt/tegra/ivc-cdev.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/virt/tegra/ivc-cdev.c b/drivers/virt/tegra/ivc-cdev.c index a4dab9b3f..b448075c5 100644 --- a/drivers/virt/tegra/ivc-cdev.c +++ b/drivers/virt/tegra/ivc-cdev.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * IVC character device driver | 2 | * IVC character device driver |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2014-2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (C) 2014-2017, 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 |
| @@ -98,12 +98,12 @@ static int ivc_dev_open(struct inode *inode, struct file *filp) | |||
| 98 | mutex_unlock(&ivc->file_lock); | 98 | mutex_unlock(&ivc->file_lock); |
| 99 | 99 | ||
| 100 | /* request our irq */ | 100 | /* request our irq */ |
| 101 | ret = devm_request_threaded_irq(ivc->device, ivc->qd->irq, | 101 | ret = devm_request_threaded_irq(ivc->device, ivck->irq, |
| 102 | ivc_threaded_irq_handler, ivc_dev_handler, 0, | 102 | ivc_threaded_irq_handler, ivc_dev_handler, 0, |
| 103 | dev_name(ivc->device), ivc); | 103 | dev_name(ivc->device), ivc); |
| 104 | if (ret < 0) { | 104 | if (ret < 0) { |
| 105 | dev_err(ivc->device, "Failed to request irq %d\n", | 105 | dev_err(ivc->device, "Failed to request irq %d\n", |
| 106 | ivc->qd->irq); | 106 | ivck->irq); |
| 107 | ivc->ivck = NULL; | 107 | ivc->ivck = NULL; |
| 108 | tegra_hv_ivc_unreserve(ivck); | 108 | tegra_hv_ivc_unreserve(ivck); |
| 109 | return ret; | 109 | return ret; |
| @@ -124,10 +124,11 @@ static int ivc_dev_release(struct inode *inode, struct file *filp) | |||
| 124 | 124 | ||
| 125 | BUG_ON(!ivc); | 125 | BUG_ON(!ivc); |
| 126 | 126 | ||
| 127 | free_irq(ivc->qd->irq, ivc); | ||
| 128 | |||
| 129 | ivck = ivc->ivck; | 127 | ivck = ivc->ivck; |
| 130 | ivc->ivck = NULL; | 128 | ivc->ivck = NULL; |
| 129 | |||
| 130 | free_irq(ivck->irq, ivc); | ||
| 131 | |||
| 131 | /* | 132 | /* |
| 132 | * Unreserve after clearing ivck; we no longer have exclusive | 133 | * Unreserve after clearing ivck; we no longer have exclusive |
| 133 | * access at this point. | 134 | * access at this point. |
