summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhu Lingshan <lingshan.zhu@intel.com>2022-11-25 22:57:20 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-11 13:50:48 +0100
commit25e6cbbe25b231d019940888c1d6ac1a6fe5eae6 (patch)
tree2ff7b92be189b119f1fa1e6275387da8c5c87f8c
parentvDPA/ifcvf: decouple config/dev IRQ requester and vectors allocator from the adapter (diff)
downloadlinux-stable-25e6cbbe25b231d019940888c1d6ac1a6fe5eae6.tar.xz
linux-stable-25e6cbbe25b231d019940888c1d6ac1a6fe5eae6.zip
vDPA/ifcvf: ifcvf_request_irq works on ifcvf_hw
commit 7cfd36b7e8be6bdaeb5af0f9729871b732a7a3c8 upstream. All ifcvf_request_irq's callees are refactored to work on ifcvf_hw, so it should be decoupled from the adapter as well Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-9-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/vdpa/ifcvf/ifcvf_main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
index 6fcc412b46de..a09a1c26b714 100644
--- a/drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers/vdpa/ifcvf/ifcvf_main.c
@@ -314,9 +314,8 @@ err:
return -EFAULT;
}
-static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
+static int ifcvf_request_irq(struct ifcvf_hw *vf)
{
- struct ifcvf_hw *vf = &adapter->vf;
int nvectors, ret, max_intr;
nvectors = ifcvf_alloc_vectors(vf);
@@ -468,7 +467,7 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status)
if ((status & VIRTIO_CONFIG_S_DRIVER_OK) &&
!(status_old & VIRTIO_CONFIG_S_DRIVER_OK)) {
- ret = ifcvf_request_irq(adapter);
+ ret = ifcvf_request_irq(vf);
if (ret) {
status = ifcvf_get_status(vf);
status |= VIRTIO_CONFIG_S_FAILED;