[PATCH 16/44] net: mana: Remove redundant pci_clear_master
authorCai Huoqing <cai.huoqing@linux.dev>
Thu, 23 Mar 2023 09:03:05 +0000 (17:03 +0800)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 22 May 2025 18:32:07 +0000 (20:32 +0200)
commitc6aa53a78377adcce1b1095897589087735a4b9c
treea3b6d53dbad2f533ad36ae33ae6505d13890bdad
parentbfb8966fa41761919f27ac912f7b6af0405f69ee
[PATCH 16/44] net: mana: Remove redundant pci_clear_master

Remove pci_clear_master to simplify the code,
the bus-mastering is also cleared in do_pci_disable_device,
like this:
./drivers/pci/pci.c:2197
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 dev->is_busmaster is set to 0 in pci_disable_device.

Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2d59af8307526f2829fdec9c5c5898a857d55180)
Signed-off-by: Bastian Blank <waldi@debian.org>
Gbp-Pq: Topic features/all/ethernet-microsoft
Gbp-Pq: Name 0016-net-mana-Remove-redundant-pci_clear_master.patch
drivers/net/ethernet/microsoft/mana/gdma_main.c