[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230201124742.08f15a1a.alex.williamson@redhat.com>
Date: Wed, 1 Feb 2023 12:47:42 -0700
From: Alex Williamson <alex.williamson@...hat.com>
To: Tomasz Duszynski <tduszynski@...vell.com>
Cc: Eric Auger <eric.auger@...hat.com>,
Cornelia Huck <cohuck@...hat.com>,
Kevin Tian <kevin.tian@...el.com>,
Jason Gunthorpe <jgg@...pe.ca>,
"open list:VFIO PLATFORM DRIVER" <kvm@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>, <jerinj@...vell.com>
Subject: Re: [PATCH v2] vfio: platform: ignore missing reset if disabled at
module init
On Tue, 31 Jan 2023 09:33:49 +0100
Tomasz Duszynski <tduszynski@...vell.com> 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@...vell.com>
> Fixes: 5f6c7e0831a1 ("vfio/platform: Use the new device life cycle helpers")
> ---
> 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);
Applied to vfio next branch for v6.3. Thanks,
Alex
Powered by blists - more mailing lists