[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZN3R7mujAOOEFwbS@vergenet.net>
Date: Thu, 17 Aug 2023 09:53:18 +0200
From: Simon Horman <horms@...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, leon@...nel.org,
shannon.nelson@....com, liwei391@...wei.com
Subject: Re: [PATCH v2 net-next] pds_core: remove redundant pci_clear_master()
On Thu, Aug 17, 2023 at 10:57:09AM +0800, Yu Liao wrote:
> do_pci_disable_device() disable PCI bus-mastering as following:
> static void do_pci_disable_device(struct pci_dev *dev)
> {
> u16 pci_command;
>
> pci_read_config_word(dev, PCI_COMMAND, &pci_command);
> if (pci_command & PCI_COMMAND_MASTER) {
> pci_command &= ~PCI_COMMAND_MASTER;
> pci_write_config_word(dev, PCI_COMMAND, pci_command);
> }
>
> pcibios_disable_device(dev);
> }
> And pci_disable_device() sets dev->is_busmaster to 0.
>
> pci_enable_device() is called only once before calling to
> pci_disable_device() and such pci_clear_master() is not needed. So remove
> redundant pci_clear_master().
>
> Also rename goto label 'err_out_clear_master' to 'err_out_disable_device'.
>
> Signed-off-by: Yu Liao <liaoyu15@...wei.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists