diff mbox series

mac80211_hwsim: set virtio device ready in probe()

Message ID 20220613210401.327958-1-johannes@sipsolutions.net (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series mac80211_hwsim: set virtio device ready in probe() | expand

Commit Message

Johannes Berg June 13, 2022, 9:04 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

Just like a similar commit to arch/um/drivers/virt-pci.c, call
virtio_device_ready() to make this driver work after commit
b4ec69d7e09 ("virtio: harden vring IRQ"), since the driver uses
the virtqueues in the probe function.  (The virtio core sets
the device ready when probe returns.)

Change-Id: I617d3b819b5e5345471a8e79db25342981a92424
Fixes: 8b4ec69d7e09 ("virtio: harden vring IRQ")
Fixes: 5d44fe7c9808 ("mac80211_hwsim: add frame transmission support over virtio")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/mac80211_hwsim.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jason Wang June 14, 2022, 5:07 a.m. UTC | #1
On Tue, Jun 14, 2022 at 5:04 AM Johannes Berg <johannes@sipsolutions.net> wrote:
>
> From: Johannes Berg <johannes.berg@intel.com>
>
> Just like a similar commit to arch/um/drivers/virt-pci.c, call
> virtio_device_ready() to make this driver work after commit
> b4ec69d7e09 ("virtio: harden vring IRQ"), since the driver uses
> the virtqueues in the probe function.  (The virtio core sets
> the device ready when probe returns.)
>
> Change-Id: I617d3b819b5e5345471a8e79db25342981a92424
> Fixes: 8b4ec69d7e09 ("virtio: harden vring IRQ")
> Fixes: 5d44fe7c9808 ("mac80211_hwsim: add frame transmission support over virtio")
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Acked-by: Jason Wang <jasowang@redhat.com>

> ---
>  drivers/net/wireless/mac80211_hwsim.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
> index 02108b94d6b8..d2b31595856d 100644
> --- a/drivers/net/wireless/mac80211_hwsim.c
> +++ b/drivers/net/wireless/mac80211_hwsim.c
> @@ -4951,6 +4951,8 @@ static int hwsim_virtio_probe(struct virtio_device *vdev)
>         if (err)
>                 return err;
>
> +       virtio_device_ready(vdev);
> +
>         err = fill_vq(hwsim_vqs[HWSIM_VQ_RX]);
>         if (err)
>                 goto out_remove;
> --
> 2.36.1
>
Kalle Valo June 21, 2022, 5:27 a.m. UTC | #2
Johannes Berg <johannes@sipsolutions.net> writes:

> From: Johannes Berg <johannes.berg@intel.com>
>
> Just like a similar commit to arch/um/drivers/virt-pci.c, call
> virtio_device_ready() to make this driver work after commit
> b4ec69d7e09 ("virtio: harden vring IRQ"), since the driver uses
> the virtqueues in the probe function.  (The virtio core sets
> the device ready when probe returns.)
>
> Change-Id: I617d3b819b5e5345471a8e79db25342981a92424

I might be too late, but leftover Change-Id.
diff mbox series

Patch

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 02108b94d6b8..d2b31595856d 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -4951,6 +4951,8 @@  static int hwsim_virtio_probe(struct virtio_device *vdev)
 	if (err)
 		return err;
 
+	virtio_device_ready(vdev);
+
 	err = fill_vq(hwsim_vqs[HWSIM_VQ_RX]);
 	if (err)
 		goto out_remove;