projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fce8afd
)
ifcvf: ignore continuous setting same status value
author
Zhu Lingshan
<lingshan.zhu@intel.com>
Fri, 5 Jun 2020 10:27:12 +0000
(18:27 +0800)
committer
Michael S. Tsirkin
<mst@redhat.com>
Sat, 6 Jun 2020 20:25:22 +0000
(16:25 -0400)
User space may try to set status of same value multiple times,
this patch handles this case more efficiently by ignoring the
setting of the same status value.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Link:
https://lore.kernel.org/r/1591352835-22441-3-git-send-email-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/ifcvf/ifcvf_main.c
patch
|
blob
|
history
diff --git
a/drivers/vdpa/ifcvf/ifcvf_main.c
b/drivers/vdpa/ifcvf/ifcvf_main.c
index d529ed681fe646e9f6e9984b9c33bde28000e4bf..63a6366b43554b64fa5538b04afc59a6a1090ba0 100644
(file)
--- a/
drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/
drivers/vdpa/ifcvf/ifcvf_main.c
@@
-179,6
+179,9
@@
static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status)
adapter = dev_get_drvdata(vdpa_dev->dev.parent);
status_old = ifcvf_get_status(vf);
+ if (status_old == status)
+ return;
+
if ((status_old & VIRTIO_CONFIG_S_DRIVER_OK) &&
!(status & VIRTIO_CONFIG_S_DRIVER_OK)) {
ifcvf_stop_datapath(adapter);