Message ID | 20230323090314.22431-1-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 j10csp2805719wrt; Thu, 23 Mar 2023 02:24:39 -0700 (PDT) X-Google-Smtp-Source: AK7set/V+vuB7tXkOVVXzdyC4hDmZsB5rkirVw5qr110s86ux1YzKR85Emq7Bw4GoqzSnlO/ldbP X-Received: by 2002:aa7:991e:0:b0:624:9205:977d with SMTP id z30-20020aa7991e000000b006249205977dmr5681872pff.27.1679563479059; Thu, 23 Mar 2023 02:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679563479; cv=none; d=google.com; s=arc-20160816; b=siXEM+Cg04ChXqtPbO1G+gx/kPsTXtwJbff9ABFduqfGnbsFy/9F2WjcoVFb5ZE2wg Pq+ppn/dd26oNWMRxXKF0Tlouu5kYdI4qK3gbcEghjutERQI0BCx+MdhIbI8ZgLfDxO6 qsKO9yDJogV3UO0ieKCe8ckOMVMkcLnU7dC6tkDNWegp5LoPBHbLUOyXL6S6CJ9mxYnr pLnR47DBoJXMrZLkve5ieLLcxEuLnJx5G58lDi7aGKUVG0MGKfIVlUL5/7F2Lc+dJoXC YoZ0ElZZ6DsV4yZb3k6nH5Kv7t54r9F3yvWkU/e9C6LAyf7yzrAxapOOZ+75WxvlNbk+ e/lw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=lTe9LISs2pflvSiuzz8njOhESiOpw5ulrZFB1bo8ej0=; b=ryddTLdv6UnhSrvzY7A3NcM+hGhNCJUKx2znlUmsudfMwFhp3ypc1GJxXKbCFYUFzt whf2vXdBsM5vHgQhD3WZ7yxKa60U4sDusKMfzQyUm5L9O68kprehQ18a7vtXLtO6N8/p q7zVmbjIqDIWwEGDkj+qIbuX+X+1C6ZzLpxOgWxonAnppoPmlPc4o62O41FC0hW4nSyF In+JRbsTKP6fKdU2bC5hhEvh8ZCbQoQOoBmrt4yauv9g+VZ0sCAtlsdV3O1m1BUweKVQ adTsCzeaopbmSIbLYTkyAEZOgaMi4cs6kGiSmMqhiUYTLR60ig3Uqx0/6WpK3H+JAo66 EFpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=uYcoUfKD; 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 z9-20020a634c09000000b004fbc4585c48si18025445pga.465.2023.03.23.02.24.26; Thu, 23 Mar 2023 02:24:39 -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=uYcoUfKD; 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 S231449AbjCWJDh (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Thu, 23 Mar 2023 05:03:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231272AbjCWJDg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Mar 2023 05:03:36 -0400 Received: from out-16.mta0.migadu.com (out-16.mta0.migadu.com [91.218.175.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCDDD199E4 for <linux-kernel@vger.kernel.org>; Thu, 23 Mar 2023 02:03:28 -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=1679562206; 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; bh=lTe9LISs2pflvSiuzz8njOhESiOpw5ulrZFB1bo8ej0=; b=uYcoUfKDkxNQ6Id+Oa4CLl9EGelbi8sUDea8HTVwAAcsDQDyAVWO1CZOtQpqSBg17uAAXh My6s84gYx4X746OVkTIgmvhoXolDbjHgA9Kkg8EjTb7bRU0la49hQCaCO8BCOTQ//RyOAy KJhdS0oIe2rn0GN5fBK0vtCp5+r/btY= 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 1/8] net: liquidio: Remove redundant pci_clear_master Date: Thu, 23 Mar 2023 17:03:00 +0800 Message-Id: <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?1761149954518749629?= X-GMAIL-MSGID: =?utf-8?q?1761149954518749629?= |
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/cavium/liquidio/lio_main.c | 1 -
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 1 -
2 files changed, 2 deletions(-)
Comments
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Thu, 23 Mar 2023 17:03:00 +0800 you wrote: > 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; > > [...] Here is the summary with links: - [1/8] net: liquidio: Remove redundant pci_clear_master https://git.kernel.org/netdev/net-next/c/fc5aba60c244 - [2/8] net: hisilicon: Remove redundant pci_clear_master https://git.kernel.org/netdev/net-next/c/fc3e07e83e8e - [3/8] net: cxgb4vf: Remove redundant pci_clear_master https://git.kernel.org/netdev/net-next/c/aae964bb7800 - [4/8] net/fungible: Remove redundant pci_clear_master https://git.kernel.org/netdev/net-next/c/8b91d5b62ce8 - [5/8] net/mlx5: Remove redundant pci_clear_master https://git.kernel.org/netdev/net-next/c/5b6f4bd24c8d - [6/8] net: mana: Remove redundant pci_clear_master https://git.kernel.org/netdev/net-next/c/2d59af830752 - [7/8] ionic: Remove redundant pci_clear_master https://git.kernel.org/netdev/net-next/c/f686e9592734 - [8/8] ethernet: ec_bhf: Remove redundant pci_clear_master https://git.kernel.org/netdev/net-next/c/3228150ba688 You are awesome, thank you!
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);