public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Joshua Daley <jdaley@linux.ibm.com>
To: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux.dev,
	jdaley@linux.ibm.com, mst@redhat.com, jasowang@redhat.com,
	pbonzini@redhat.com, stefanha@redhat.com, eperezma@redhat.com,
	James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com, mjrosato@linux.ibm.com,
	farman@linux.ibm.com, frankja@linux.ibm.com
Subject: [PATCH v3 1/3] scsi: virtio_scsi: kick event_list unconditionally
Date: Mon, 16 Mar 2026 16:33:39 +0100	[thread overview]
Message-ID: <20260316153341.2062278-2-jdaley@linux.ibm.com> (raw)
In-Reply-To: <20260316153341.2062278-1-jdaley@linux.ibm.com>

The event_list processes non-hotplug events (such as LUN capacity
changes), so remove the conditions that guard the initial kicks in
_probe() and _restore(), as well as the work cancellation in _remove().

Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Joshua Daley <jdaley@linux.ibm.com>
---
 drivers/scsi/virtio_scsi.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 0ed8558dad72..982f49bc6c69 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -983,9 +983,7 @@ static int virtscsi_probe(struct virtio_device *vdev)
 		goto scsi_add_host_failed;
 
 	virtio_device_ready(vdev);
-
-	if (virtio_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG))
-		virtscsi_kick_event_all(vscsi);
+	virtscsi_kick_event_all(vscsi);
 
 	scsi_scan_host(shost);
 	return 0;
@@ -1002,8 +1000,7 @@ static void virtscsi_remove(struct virtio_device *vdev)
 	struct Scsi_Host *shost = virtio_scsi_host(vdev);
 	struct virtio_scsi *vscsi = shost_priv(shost);
 
-	if (virtio_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG))
-		virtscsi_cancel_event_work(vscsi);
+	virtscsi_cancel_event_work(vscsi);
 
 	scsi_remove_host(shost);
 	virtscsi_remove_vqs(vdev);
@@ -1028,9 +1025,7 @@ static int virtscsi_restore(struct virtio_device *vdev)
 		return err;
 
 	virtio_device_ready(vdev);
-
-	if (virtio_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG))
-		virtscsi_kick_event_all(vscsi);
+	virtscsi_kick_event_all(vscsi);
 
 	return err;
 }
-- 
2.34.1


  reply	other threads:[~2026-03-16 15:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 15:33 [PATCH v3 0/3] scsi: virtio_scsi: move INIT_WORK calls to virtscsi_init Joshua Daley
2026-03-16 15:33 ` Joshua Daley [this message]
2026-03-16 15:33 ` [PATCH v3 2/3] " Joshua Daley
2026-03-16 15:33 ` [PATCH v3 3/3] scsi: virtio_scsi: remove unnecessary fn declaration Joshua Daley
2026-03-20  2:19 ` [PATCH v3 0/3] scsi: virtio_scsi: move INIT_WORK calls to virtscsi_init Martin K. Petersen
2026-03-20 11:13   ` Stefan Hajnoczi
2026-03-23 16:16   ` Joshua Daley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260316153341.2062278-2-jdaley@linux.ibm.com \
    --to=jdaley@linux.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=eperezma@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox