qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] question on virtio ccw
@ 2017-12-07 17:18 Michael S. Tsirkin
  2017-12-08 10:08 ` Cornelia Huck
  0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2017-12-07 17:18 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: qemu-devel

I see this in ccw in qemu:

            if (virtio_set_status(vdev, status) == 0) {
                if (vdev->status == 0) {
                    virtio_ccw_reset_virtio(dev, vdev);
                }
                if (status & VIRTIO_CONFIG_S_DRIVER_OK) {
                    virtio_ccw_start_ioeventfd(dev);
                }
                sch->curr_status.scsw.count = ccw.count - sizeof(status);
                ret = 0;
            } else {
                /* Trigger a command reject. */
                ret = -ENOSYS;
            }

virtio_set_status on success sets vdev->status to status.
Why check vdev->status in one place and status in another?

-- 
MST

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-08 10:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-07 17:18 [Qemu-devel] question on virtio ccw Michael S. Tsirkin
2017-12-08 10:08 ` Cornelia Huck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).