From: Eric Auger <eric.auger@redhat.com>
To: Tomasz Duszynski <tduszynski@marvell.com>,
Alex Williamson <alex.williamson@redhat.com>,
Cornelia Huck <cohuck@redhat.com>,
Kevin Tian <kevin.tian@intel.com>, Jason Gunthorpe <jgg@ziepe.ca>,
"open list:VFIO PLATFORM DRIVER" <kvm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Cc: jerinj@marvell.com
Subject: Re: [PATCH v2] vfio: platform: ignore missing reset if disabled at module init
Date: Tue, 31 Jan 2023 10:49:19 +0100 [thread overview]
Message-ID: <c946d31d-3696-510b-17b9-9ac9b361b7bf@redhat.com> (raw)
In-Reply-To: <20230131083349.2027189-1-tduszynski@marvell.com>
Hi Tomasz,
On 1/31/23 09:33, Tomasz Duszynski wrote:
> If reset requirement was relaxed via module parameter errors caused by
> missing reset should not be propagated down to the vfio core.
> Otherwise initialization will fail.
>
> Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
> Fixes: 5f6c7e0831a1 ("vfio/platform: Use the new device life cycle helpers")
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Thanks
Eric
> ---
> v2:
> - return directly instead of using ternary to do that
>
> drivers/vfio/platform/vfio_platform_common.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c
> index 1a0a238ffa35..7325ff463cf0 100644
> --- a/drivers/vfio/platform/vfio_platform_common.c
> +++ b/drivers/vfio/platform/vfio_platform_common.c
> @@ -650,10 +650,13 @@ int vfio_platform_init_common(struct vfio_platform_device *vdev)
> mutex_init(&vdev->igate);
>
> ret = vfio_platform_get_reset(vdev);
> - if (ret && vdev->reset_required)
> + if (ret && vdev->reset_required) {
> dev_err(dev, "No reset function found for device %s\n",
> vdev->name);
> - return ret;
> + return ret;
> + }
> +
> + return 0;
> }
> EXPORT_SYMBOL_GPL(vfio_platform_init_common);
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2023-01-31 9:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 8:33 Tomasz Duszynski
2023-01-31 9:49 ` Eric Auger [this message]
2023-02-01 2:48 ` Tian, Kevin
2023-02-01 19:47 ` Alex Williamson
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=c946d31d-3696-510b-17b9-9ac9b361b7bf@redhat.com \
--to=eric.auger@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=jerinj@marvell.com \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tduszynski@marvell.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
all inboxes | Powered by JetHome®