From: Cai Huoqing <cai.huoqing@linux.dev>
To: cai.huoqing@linux.dev
Cc: Derek Chickles <dchickles@marvell.com>,
Satanand Burla <sburla@marvell.com>,
Felix Manlunas <fmanlunas@marvell.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Raju Rangoju <rajur@chelsio.com>,
Dariusz Marcinkiewicz <reksio@newterm.pl>,
Dimitris Michailidis <dmichail@fungible.com>,
Yisen Zhuang <yisen.zhuang@huawei.com>,
Salil Mehta <salil.mehta@huawei.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
Shannon Nelson <shannon.nelson@amd.com>,
Brett Creeley <brett.creeley@amd.com>,
drivers@pensando.io, Bjorn Helgaas <bhelgaas@google.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Guangbin Huang <huangguangbin2@huawei.com>,
Jian Shen <shenjian15@huawei.com>, Hao Lan <lanhao@huawei.com>,
Jie Wang <wangjie125@huawei.com>, Long Li <longli@microsoft.com>,
Jiri Pirko <jiri@resnulli.us>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rdma@vger.kernel.org, linux-hyperv@vger.kernel.org
Subject: [PATCH 7/8] ionic: Remove redundant pci_clear_master
Date: Thu, 23 Mar 2023 17:03:06 +0800 [thread overview]
Message-ID: <20230323090314.22431-7-cai.huoqing@linux.dev> (raw)
In-Reply-To: <20230323090314.22431-1-cai.huoqing@linux.dev>
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/pensando/ionic/ionic_bus_pci.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index e508f8eb43bf..b8678da1cce5 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -392,7 +392,6 @@ static void ionic_remove(struct pci_dev *pdev)
ionic_port_reset(ionic);
ionic_reset(ionic);
ionic_dev_teardown(ionic);
- pci_clear_master(pdev);
ionic_unmap_bars(ionic);
pci_release_regions(pdev);
pci_disable_device(pdev);
--
2.34.1
next prev parent reply other threads:[~2023-03-23 9:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Cai Huoqing [this message]
2023-03-23 16:32 ` [PATCH 7/8] ionic: " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230323090314.22431-7-cai.huoqing@linux.dev \
--to=cai.huoqing@linux.dev \
--cc=bhelgaas@google.com \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=dchickles@marvell.com \
--cc=decui@microsoft.com \
--cc=dmichail@fungible.com \
--cc=drivers@pensando.io \
--cc=edumazet@google.com \
--cc=fmanlunas@marvell.com \
--cc=haiyangz@microsoft.com \
--cc=huangguangbin2@huawei.com \
--cc=jesse.brandeburg@intel.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=lanhao@huawei.com \
--cc=leon@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rajur@chelsio.com \
--cc=reksio@newterm.pl \
--cc=saeedm@nvidia.com \
--cc=salil.mehta@huawei.com \
--cc=sburla@marvell.com \
--cc=shannon.nelson@amd.com \
--cc=shenjian15@huawei.com \
--cc=wangjie125@huawei.com \
--cc=wei.liu@kernel.org \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox