public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] net: liquidio: Remove redundant pci_clear_master
@ 2023-03-23  9:03 Cai Huoqing
  2023-03-23  9:03 ` [PATCH 2/8] net: hisilicon: " Cai Huoqing
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Cai Huoqing @ 2023-03-23  9:03 UTC (permalink / raw)
  To: cai.huoqing
  Cc: Derek Chickles, Satanand Burla, Felix Manlunas, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Raju Rangoju,
	Dariusz Marcinkiewicz, Dimitris Michailidis, Yisen Zhuang,
	Salil Mehta, Saeed Mahameed, Leon Romanovsky, K. Y. Srinivasan,
	Haiyang Zhang, Wei Liu, Dexuan Cui, Shannon Nelson, Brett Creeley,
	drivers, Bjorn Helgaas, Jesse Brandeburg, Guangbin Huang,
	Jian Shen, Hao Lan, Jie Wang, Long Li, Jiri Pirko, netdev,
	linux-kernel, linux-rdma, linux-hyperv

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>
---
 drivers/net/ethernet/cavium/liquidio/lio_main.c    | 1 -
 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index fd7c80edb6e8..9bd1d2d7027d 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -1129,7 +1129,6 @@ static void octeon_destroy_resources(struct octeon_device *oct)
 
 		fallthrough;
 	case OCT_DEV_PCI_ENABLE_DONE:
-		pci_clear_master(oct->pci_dev);
 		/* Disable the device, releasing the PCI INT */
 		pci_disable_device(oct->pci_dev);
 
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
index ac196883f07e..e2921aec3da0 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
@@ -577,7 +577,6 @@ static void octeon_destroy_resources(struct octeon_device *oct)
 
 		fallthrough;
 	case OCT_DEV_PCI_ENABLE_DONE:
-		pci_clear_master(oct->pci_dev);
 		/* Disable the device, releasing the PCI INT */
 		pci_disable_device(oct->pci_dev);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-03-24  9:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23  9:03 [PATCH 1/8] net: liquidio: Remove redundant pci_clear_master Cai Huoqing
2023-03-23  9:03 ` [PATCH 2/8] net: hisilicon: " Cai Huoqing
2023-03-23  9:03 ` [PATCH 3/8] net: cxgb4vf: " Cai Huoqing
2023-03-23  9:03 ` [PATCH 4/8] net/fungible: " Cai Huoqing
2023-03-23 17:24   ` Dimitris Michailidis
2023-03-23  9:03 ` [PATCH 5/8] net/mlx5: " Cai Huoqing
2023-03-23  9:03 ` [PATCH 6/8] net: mana: " Cai Huoqing
2023-03-23  9:03 ` [PATCH 7/8] ionic: " Cai Huoqing
2023-03-23 16:32   ` Shannon Nelson
2023-03-23  9:03 ` [PATCH 8/8] ethernet: ec_bhf: " Cai Huoqing
2023-03-24  9:20 ` [PATCH 1/8] net: liquidio: " patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox