Commit 7cfd36b7 authored by Zhu Lingshan's avatar Zhu Lingshan Committed by Michael S. Tsirkin

vDPA/ifcvf: ifcvf_request_irq works on ifcvf_hw

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: default avatarZhu Lingshan <lingshan.zhu@intel.com>
Cc: stable@vger.kernel.org
Message-Id: <20221125145724.1129962-9-lingshan.zhu@intel.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent a70d833e
...@@ -314,9 +314,8 @@ static int ifcvf_request_config_irq(struct ifcvf_hw *vf) ...@@ -314,9 +314,8 @@ static int ifcvf_request_config_irq(struct ifcvf_hw *vf)
return -EFAULT; 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; int nvectors, ret, max_intr;
nvectors = ifcvf_alloc_vectors(vf); nvectors = ifcvf_alloc_vectors(vf);
...@@ -468,7 +467,7 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) ...@@ -468,7 +467,7 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status)
if ((status & VIRTIO_CONFIG_S_DRIVER_OK) && if ((status & VIRTIO_CONFIG_S_DRIVER_OK) &&
!(status_old & VIRTIO_CONFIG_S_DRIVER_OK)) { !(status_old & VIRTIO_CONFIG_S_DRIVER_OK)) {
ret = ifcvf_request_irq(adapter); ret = ifcvf_request_irq(vf);
if (ret) { if (ret) {
status = ifcvf_get_status(vf); status = ifcvf_get_status(vf);
status |= VIRTIO_CONFIG_S_FAILED; status |= VIRTIO_CONFIG_S_FAILED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment