Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

um: virt-pci: set device ready in probe()

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.)

Fixes: 8b4ec69d7e09 ("virtio: harden vring IRQ")
Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Message-Id: <20220610151203.3492541-1-vincent.whitchurch@axis.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Johannes Berg <johannes@sipsolutions.net>

authored by

Vincent Whitchurch and committed by
Michael S. Tsirkin
eacea844 00d1f546

+6 -1
+6 -1
arch/um/drivers/virt-pci.c
··· 544 544 dev->cmd_vq = vqs[0]; 545 545 dev->irq_vq = vqs[1]; 546 546 547 + virtio_device_ready(dev->vdev); 548 + 547 549 for (i = 0; i < NUM_IRQ_MSGS; i++) { 548 550 void *msg = kzalloc(MAX_IRQ_MSG_SIZE, GFP_KERNEL); 549 551 ··· 589 587 dev->irq = irq_alloc_desc(numa_node_id()); 590 588 if (dev->irq < 0) { 591 589 err = dev->irq; 592 - goto error; 590 + goto err_reset; 593 591 } 594 592 um_pci_devices[free].dev = dev; 595 593 vdev->priv = dev; ··· 606 604 607 605 um_pci_rescan(); 608 606 return 0; 607 + err_reset: 608 + virtio_reset_device(vdev); 609 + vdev->config->del_vqs(vdev); 609 610 error: 610 611 mutex_unlock(&um_pci_mtx); 611 612 kfree(dev);