[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230816063820.GV22185@unreal>
Date: Wed, 16 Aug 2023 09:38:20 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Yu Liao <liaoyu15@...wei.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, liwei391@...wei.com
Subject: Re: [PATCH net-next] pds_core: remove redundant pci_clear_master()
On Wed, Aug 16, 2023 at 09:38:02AM +0800, Yu Liao wrote:
> pci_disable_device() involves disabling PCI bus-mastering. So remove
> redundant pci_clear_master().
I would say that this commit message needs to be more descriptive and
explain why pci_disable_device() will actually disable PCI in these
flows.
According to the doc and code:
2263 * Note we don't actually disable the device until all callers of
2264 * pci_enable_device() have called pci_disable_device().
Thanks
>
> Signed-off-by: Yu Liao <liaoyu15@...wei.com>
> ---
> drivers/net/ethernet/amd/pds_core/main.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/amd/pds_core/main.c b/drivers/net/ethernet/amd/pds_core/main.c
> index 672757932246..ffe619cff413 100644
> --- a/drivers/net/ethernet/amd/pds_core/main.c
> +++ b/drivers/net/ethernet/amd/pds_core/main.c
> @@ -374,7 +374,6 @@ static int pdsc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> return 0;
>
> err_out_clear_master:
> - pci_clear_master(pdev);
> pci_disable_device(pdev);
> err_out_free_ida:
> ida_free(&pdsc_ida, pdsc->uid);
> @@ -439,7 +438,6 @@ static void pdsc_remove(struct pci_dev *pdev)
> pci_release_regions(pdev);
> }
>
> - pci_clear_master(pdev);
> pci_disable_device(pdev);
>
> ida_free(&pdsc_ida, pdsc->uid);
> --
> 2.25.1
>
>
Powered by blists - more mailing lists