virtio-net: convert rx mode setting to use workqueue
authorJason Wang <jasowang@redhat.com>
Thu, 20 Jul 2023 08:38:38 +0000 (04:38 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 19 Mar 2024 07:19:22 +0000 (03:19 -0400)
commitb9f7425239a09903629f71f719654983481b00aa
tree387181683222742253ab16824fc96ea4a37aaf00
parentd5c0ed17fea60cca9bc3bf1278b49ba79242bbcd
virtio-net: convert rx mode setting to use workqueue

This patch convert rx mode setting to be done in a workqueue, this is
a must for allow to sleep when waiting for the cvq command to
response since current code is executed under addr spin lock.

Note that we need to disable and flush the workqueue during freeze,
this means the rx mode setting is lost after resuming. This is not the
bug of this patch as we never try to restore rx mode setting during
resume.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20230720083839.481487-2-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
drivers/net/virtio_net.c