Message ID | 20230323090314.22431-3-cai.huoqing@linux.dev |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2806179wrt; Thu, 23 Mar 2023 02:26:01 -0700 (PDT) X-Google-Smtp-Source: AK7set8Foe7DnuIPPf4a3MfLV7PAlzTcYiB0+h8+jvwJDfs0ZHCN4mx1ILfPIcZxoIY7BDsx3Iai X-Received: by 2002:a17:903:2285:b0:1a1:d5fd:1e9a with SMTP id b5-20020a170903228500b001a1d5fd1e9amr6755719plh.40.1679563561639; Thu, 23 Mar 2023 02:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679563561; cv=none; d=google.com; s=arc-20160816; b=EQWfa+Sj+WANJqGcty1rZXQ9V9mS60Vqdt7ADFKFrzxerxQLZnjgKCVznyfR/qzNUF pOGTyNZlDfF0iRGK725KIOW966fupNv8eiwtMCehlO91JtHtq10YoNAonv+WDmg3V9oA Io6S4KGYcOp7GwMFZatAeGCaFYcqAIaxJVfivo+Db0pHGvNdzs9Zxlu89r/vOlzl+CdX oIG+XT00kUPAtknuHlwn8VAuHZFSvQj3pn0Iq70o3Dk0BGkMTF8GhXzOw1YSiuVM4sok wwM3DCfB7wK0BJQNisPJMtgNnw/fPCqYU1kj4nxm4I1n9+9egRGK+fmVJWU1m9w+UoZP VouA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E9VZuBBTp04BDbs+ncOrUcdGIr1MtZeBvyGlNQPB6Mg=; b=aBjlZLFQSv7LDGGokfWj+vhM5ZE54rjpUU53qht8RKj2DzrS3vhGBn+C9MildgaNEl O+zTjhZBZoZa2/DiTm2gUIeX1e3NJ00e4+/asRsHraeArTBsFDZyD/ivyx51AC4p+KQ2 /dGIUfOFBe7YWfhe/0HdO+9SARQcXBstg809Idg6mCrO0rB48fHaqMnnh37KfyB6jZMU wUM0NP67hSKyhR3uQ3cYnbsNtbo7rFgaZT6iQTMQXcsTzgs0o4ASj0+HkZnbHWDoUiKE Lg6hM/mOuw7aLTxQhdiNgCrDpvmq8IFxg8C7FP4wvsbHkKE0/h20UGkeRdWHMQ44Ob4p Y/zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tOF2mLSO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a170902f68600b001a1c005bd52si13355802plg.34.2023.03.23.02.25.48; Thu, 23 Mar 2023 02:26:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tOF2mLSO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231537AbjCWJED (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Thu, 23 Mar 2023 05:04:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231503AbjCWJD4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Mar 2023 05:03:56 -0400 Received: from out-20.mta0.migadu.com (out-20.mta0.migadu.com [91.218.175.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32ABD1B565 for <linux-kernel@vger.kernel.org>; Thu, 23 Mar 2023 02:03:55 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1679562233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E9VZuBBTp04BDbs+ncOrUcdGIr1MtZeBvyGlNQPB6Mg=; b=tOF2mLSO0gVV24esZPsvixYPG2lfpE5Hm5zHYAZRFK2gto6p6aSp+hW5wQljUvze36l6bP 8LdDEhzDomKyHbkjwkzxc7WR2PW9y+SMqiHHA84djwZzJx9VFMvsOUFNfH/Jerlg296PEW 5oBHFfiGkj39SEXCIR/boRnxE77C0Yg= 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, Jesse Brandeburg <jesse.brandeburg@intel.com>, Bjorn Helgaas <bhelgaas@google.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 3/8] net: cxgb4vf: Remove redundant pci_clear_master Date: Thu, 23 Mar 2023 17:03:02 +0800 Message-Id: <20230323090314.22431-3-cai.huoqing@linux.dev> In-Reply-To: <20230323090314.22431-1-cai.huoqing@linux.dev> References: <20230323090314.22431-1-cai.huoqing@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TO_EQ_FM_DIRECT_MX autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761150041529290651?= X-GMAIL-MSGID: =?utf-8?q?1761150041529290651?= |
Series |
[1/8] net: liquidio: Remove redundant pci_clear_master
|
|
Commit Message
Cai Huoqing
March 23, 2023, 9:03 a.m. UTC
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/chelsio/cxgb4vf/cxgb4vf_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index 63b2bd084130..9ba0864592e8 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c @@ -3258,7 +3258,6 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev, err_release_regions: pci_release_regions(pdev); - pci_clear_master(pdev); err_disable_device: pci_disable_device(pdev); @@ -3338,7 +3337,6 @@ static void cxgb4vf_pci_remove(struct pci_dev *pdev) * Disable the device and release its PCI resources. */ pci_disable_device(pdev); - pci_clear_master(pdev); pci_release_regions(pdev); }