From patchwork Mon Jun 13 21:04:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 581944 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F338C433EF for ; Mon, 13 Jun 2022 21:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243819AbiFMVV1 (ORCPT ); Mon, 13 Jun 2022 17:21:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243093AbiFMVVN (ORCPT ); Mon, 13 Jun 2022 17:21:13 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A23AD1D306 for ; Mon, 13 Jun 2022 14:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=o/zK7HihkjohxLKzRQiJNxVvrBgHHxOI1eWND5theSI=; t=1655154249; x=1656363849; b=gyh6KO7nQaQAz51OFSzA334wpd8TtoqnQiaCoP2j8dEsyTuNqw7oyCtuo6vbeY9mMX3K3wyWQ9j U6FvfBcX/jL/X6B452kHqYhNnx9bFh9GEkyFEDeaFuSlHX2jKcTjWOWHlblo+ArftgdYjzEKPC0RT 2RfsSYgxOBxqxnbmX30tfMRtYSZiv3bRuxTrdfgNG1R7RgAaCv7PZhFLu3gqEJPmV5TR/30VJ1ufR 98x6le4IrUNBj+NYiIbpLWYS1I2KNl4yTiAenA25uBjmfh3D5mrbdrCm2nViOYhapxNJpg9vH04nX eQuLGN1svbDAF7aV0sPPNu3f9hxSwF+GNeDQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1o0rEB-004hJK-Ta; Mon, 13 Jun 2022 23:04:04 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Jason Wang , Vincent Whitchurch , Johannes Berg Subject: [PATCH] mac80211_hwsim: set virtio device ready in probe() Date: Mon, 13 Jun 2022 23:04:01 +0200 Message-Id: <20220613210401.327958-1-johannes@sipsolutions.net> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg 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 --- 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;