netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Lingshan <lingshan.zhu@intel.com>
To: jasowang@redhat.com, mst@redhat.com
Cc: virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, kvm@vger.kernel.org,
	Zhu Lingshan <lingshan.zhu@intel.com>
Subject: [PATCH 3/3] vDPA/ifcvf: set_status() should get a adapter from the mgmt dev
Date: Wed, 30 Jun 2021 16:21:45 +0800	[thread overview]
Message-ID: <20210630082145.5729-4-lingshan.zhu@intel.com> (raw)
In-Reply-To: <20210630082145.5729-1-lingshan.zhu@intel.com>

ifcvf_vdpa_set_status() should get a adapter from the
management device

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
---
 drivers/vdpa/ifcvf/ifcvf_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
index 7c2f64ca2163..28c71eef1d2b 100644
--- a/drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers/vdpa/ifcvf/ifcvf_main.c
@@ -212,13 +212,15 @@ static u8 ifcvf_vdpa_get_status(struct vdpa_device *vdpa_dev)
 
 static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status)
 {
+	struct ifcvf_vdpa_mgmt_dev *ifcvf_mgmt_dev;
 	struct ifcvf_adapter *adapter;
 	struct ifcvf_hw *vf;
 	u8 status_old;
 	int ret;
 
 	vf  = vdpa_to_vf(vdpa_dev);
-	adapter = dev_get_drvdata(vdpa_dev->dev.parent);
+	ifcvf_mgmt_dev = dev_get_drvdata(vdpa_dev->dev.parent);
+	adapter = ifcvf_mgmt_dev->adapter;
 	status_old = ifcvf_get_status(vf);
 
 	if (status_old == status)
-- 
2.27.0


  parent reply	other threads:[~2021-06-30  8:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-30  8:21 [PATCH 0/3] vDPA/ifcvf: implement management netlink framework Zhu Lingshan
2021-06-30  8:21 ` [PATCH 1/3] vDPA/ifcvf: introduce get_dev_type() which returns virtio dev id Zhu Lingshan
2021-06-30  8:21 ` [PATCH 2/3] vDPA/ifcvf: implement management netlink framework for ifcvf Zhu Lingshan
2021-06-30 19:04   ` kernel test robot
2021-07-03  9:02     ` Michael S. Tsirkin
2021-07-03  9:04     ` Michael S. Tsirkin
2021-07-05  5:04   ` Jason Wang
2021-07-05  6:34     ` Michael S. Tsirkin
2021-07-05  6:38       ` Zhu, Lingshan
2021-06-30  8:21 ` Zhu Lingshan [this message]
2021-07-05  5:09   ` [PATCH 3/3] vDPA/ifcvf: set_status() should get a adapter from the mgmt dev Jason Wang
2021-07-05  9:46     ` Zhu, Lingshan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210630082145.5729-4-lingshan.zhu@intel.com \
    --to=lingshan.zhu@intel.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).