Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7448936rwl; Thu, 23 Mar 2023 04:38:48 -0700 (PDT) X-Google-Smtp-Source: AK7set8OH7Lf7f4kmDySYKw88HGMrLjZ49gq7+sZsIpqfzrPOw3FQuec8reTIr3fEsIHd3ZKnmyW X-Received: by 2002:a17:906:344d:b0:932:83fa:d2fe with SMTP id d13-20020a170906344d00b0093283fad2femr10261332ejb.12.1679571527982; Thu, 23 Mar 2023 04:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679571527; cv=none; d=google.com; s=arc-20160816; b=jeNErWR53QS3yswsDZN/QumGEKVj89hdliSJfGecY52jCvUmEZ+39OYbMk86tEF68V gzte1pbmCtwsjkjfVnmympfXUH4kCurDMl3XmkRGcvUyAirDFoBj/EZWLSjNu+5JG3I4 1Y9nRc5QmBDan+ywQRZSYoB1qJYQg7yzU2FXl8N9jay1Z8+aUotzq+TPx3QUwTA87xJv N5QaSkpe7ThbIVG+F7TMuDPWWmYeloZuvQHgkZ8UzulTd0Y0gWW0HmsvmIluZjW0jro9 7IeXnevt6Z9l3PK7VhE76D0fYbR16epvmZJES4VQKgGdC6DKsDFP2h3O2xYEWG1ZgmqW A2mQ== 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=ZdgDBuT4R3jYSxR7mPDt2s0ue0mJFKZNVR81FCp1IBk=; b=gAkdpnqZYll8A9keO+EliSJBCUv6++oF91MhpbhZfv6Y5Ze7R+Ix+I9mMby2vBtkBh u5XNDNxAL76NUBln7nAhxPM2+RWQD0EEUu/WXkR/ukmI/4HhkLfqtmiPstMpDUmi1ZZJ CzEPvJckW4sVDxAy0InP6ukS/yHYbm6xTiKREcUnXxQfJIF5312TPKZ3SShH7K6ag8Ai Jn5uIUeBUPny9JlidBMQ6zcGG9t5x39jbCcztq1STqwUist1uThuGk2L9ROlbkOFnPMs tAYad4frLCCLKMsQ45ViexiF2w6dBa2lqji2A+yy03UsOyZeKjyw/420qpwXs4nhty65 xvkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=fqAbpCsa; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020a1709066d0d00b0090648134dc0si18315473ejr.394.2023.03.23.04.38.22; Thu, 23 Mar 2023 04:38:47 -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=fqAbpCsa; 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 S231664AbjCWL1A (ORCPT + 99 others); Thu, 23 Mar 2023 07:27:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231732AbjCWL0y (ORCPT ); Thu, 23 Mar 2023 07:26:54 -0400 Received: from out-46.mta0.migadu.com (out-46.mta0.migadu.com [IPv6:2001:41d0:1004:224b::2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B88E2E0E0 for ; Thu, 23 Mar 2023 04:26:45 -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=1679570800; 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=ZdgDBuT4R3jYSxR7mPDt2s0ue0mJFKZNVR81FCp1IBk=; b=fqAbpCsaP3fQqEmQ3WmwcgxofDhbTR9Foo+kABFooB5SEWA51oOArpWXh3+E22u+OvTuzl 4kB3mh11+EjwMt/cdDd8+Pd067J8e6UHBti+IDAsg28/AE1lDzENAJz/wauJWfkWbMKTQ+ TCjgMya52bHugLpy5CUatBZ8jTkvmz0= From: Cai Huoqing To: cai.huoqing@linux.dev Cc: Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yan-Hsuan Chuang , Ping-Ke Shih , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ath11k@lists.infradead.org, ath12k@lists.infradead.org Subject: [PATCH 4/5] wifi: rtw88: Remove redundant pci_clear_master Date: Thu, 23 Mar 2023 19:26:12 +0800 Message-Id: <20230323112613.7550-4-cai.huoqing@linux.dev> In-Reply-To: <20230323112613.7550-1-cai.huoqing@linux.dev> References: <20230323112613.7550-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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/wireless/realtek/rtw88/pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c index b4bd831c9845..60145d2f3e5a 100644 --- a/drivers/net/wireless/realtek/rtw88/pci.c +++ b/drivers/net/wireless/realtek/rtw88/pci.c @@ -1552,7 +1552,6 @@ static int rtw_pci_claim(struct rtw_dev *rtwdev, struct pci_dev *pdev) static void rtw_pci_declaim(struct rtw_dev *rtwdev, struct pci_dev *pdev) { - pci_clear_master(pdev); pci_disable_device(pdev); } -- 2.34.1