[PATCH 16/34] 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>
Fri, 7 Feb 2025 09:43:47 +0000 (10:43 +0100)
commit171f03209e7f80d546901d1e6f6df54da30a828e
tree8606c00af32fb69a4a4cc7ff98b1b3fcce9209ef
parent12e1666b0b884c4ec8c12d8c5157011ac9f9bf3f
[PATCH 16/34] 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