From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Richard Weinberger <richard@nod.at>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
Johannes Berg <johannes@sipsolutions.net>,
kernel <kernel@axis.com>, Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"linux-um@lists.infradead.org" <linux-um@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] um: virt-pci: set device ready in probe()
Date: Thu, 16 Jun 2022 12:40:52 +0200 [thread overview]
Message-ID: <20220616104052.GA7518@axis.com> (raw)
In-Reply-To: <CACGkMEsf5p=JvHHjd_jtEwtdQijTR7ZAwetEuSG-oprF6RBsVA@mail.gmail.com>
On Mon, Jun 13, 2022 at 08:58:40AM +0200, Jason Wang wrote:
> On Fri, Jun 10, 2022 at 11:12 PM Vincent Whitchurch <vincent.whitchurch@axis.com> wrote:
> > diff --git a/arch/um/drivers/virt-pci.c b/arch/um/drivers/virt-pci.c
> > index 5c092a9153ea..027847023184 100644
> > --- a/arch/um/drivers/virt-pci.c
> > +++ b/arch/um/drivers/virt-pci.c
> > @@ -544,6 +544,8 @@ static int um_pci_init_vqs(struct um_pci_device *dev)
> > dev->cmd_vq = vqs[0];
> > dev->irq_vq = vqs[1];
> >
> > + virtio_device_ready(dev->vdev);
> > +
> > for (i = 0; i < NUM_IRQ_MSGS; i++) {
> > void *msg = kzalloc(MAX_IRQ_MSG_SIZE, GFP_KERNEL);
> >
> > @@ -587,7 +589,7 @@ static int um_pci_virtio_probe(struct virtio_device *vdev)
> > dev->irq = irq_alloc_desc(numa_node_id());
> > if (dev->irq < 0) {
> > err = dev->irq;
> > - goto error;
> > + goto err_reset;
> > }
> > um_pci_devices[free].dev = dev;
> > vdev->priv = dev;
> > @@ -604,6 +606,9 @@ static int um_pci_virtio_probe(struct virtio_device *vdev)
> >
> > um_pci_rescan();
> > return 0;
> > +err_reset:
> > + virtio_reset_device(vdev);
> > + vdev->config->del_vqs(vdev);
>
> This part seems to be an independent fix.
Yes, I guess that last line could have been added in a separate patch.
When adding the cleanup in the error path for the virtio_device_ready()
call added by the patch I noticed that this driver wasn't deleting its
virtqueues in the error path, unlike other virtio drivers I looked at.
prev parent reply other threads:[~2022-06-16 10:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 15:12 [PATCH] um: virt-pci: set device ready in probe() Vincent Whitchurch
2022-06-10 19:36 ` Johannes Berg
2022-06-11 0:34 ` Michael S. Tsirkin
2022-06-12 8:58 ` Johannes Berg
2022-06-12 14:08 ` Michael S. Tsirkin
2022-06-13 6:50 ` Vincent Whitchurch
2022-06-13 6:58 ` Jason Wang
2022-06-13 7:25 ` Michael S. Tsirkin
2022-06-16 10:40 ` Vincent Whitchurch [this message]
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=20220616104052.GA7518@axis.com \
--to=vincent.whitchurch@axis.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=jasowang@redhat.com \
--cc=johannes@sipsolutions.net \
--cc=kernel@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=mst@redhat.com \
--cc=richard@nod.at \
--cc=xuanzhuo@linux.alibaba.com \
/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