summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@amd.com>2023-11-10 14:18:02 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-20 11:51:41 +0100
commit06cb2064b0bf2ec5214124e3832636d2a2ad8d00 (patch)
treea118cdc83b1080472429908ddd753ca154791398
parentd3bb92beda4af03bb0779f89d2efdadf6ca74b10 (diff)
downloadlinux-stable-06cb2064b0bf2ec5214124e3832636d2a2ad8d00.tar.gz
linux-stable-06cb2064b0bf2ec5214124e3832636d2a2ad8d00.tar.bz2
linux-stable-06cb2064b0bf2ec5214124e3832636d2a2ad8d00.zip
pds_vdpa: set features order
[ Upstream commit cefc9ba6aed48a3aa085888e3262ac2aa975714b ] Fix up the order that the device and negotiated features are checked to get a more reliable difference when things get changed. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Message-Id: <20231110221802.46841-4-shannon.nelson@amd.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/vdpa/pds/vdpa_dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/vdpa/pds/vdpa_dev.c b/drivers/vdpa/pds/vdpa_dev.c
index 9fc89c82d1f0..25c0fe5ec3d5 100644
--- a/drivers/vdpa/pds/vdpa_dev.c
+++ b/drivers/vdpa/pds/vdpa_dev.c
@@ -318,9 +318,8 @@ static int pds_vdpa_set_driver_features(struct vdpa_device *vdpa_dev, u64 featur
return -EOPNOTSUPP;
}
- pdsv->negotiated_features = nego_features;
-
driver_features = pds_vdpa_get_driver_features(vdpa_dev);
+ pdsv->negotiated_features = nego_features;
dev_dbg(dev, "%s: %#llx => %#llx\n",
__func__, driver_features, nego_features);