Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2180127rwl; Sun, 26 Mar 2023 17:47:07 -0700 (PDT) X-Google-Smtp-Source: AKy350bGLb2erhEBHDYi+b6sLzbN/q0FI/2PqCsuMI03AZsjzonIsoCkpcBCEo6Puy/1ZEECrCKd X-Received: by 2002:a05:6402:4c:b0:4c0:1120:a15d with SMTP id f12-20020a056402004c00b004c01120a15dmr9735078edu.5.1679878027541; Sun, 26 Mar 2023 17:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679878027; cv=none; d=google.com; s=arc-20160816; b=sEEfiLDPomtdX+Me9XalqCtIcwodbeKgfVFkIcItTnx1sKv5S6QsUEepxbPPAb6LE1 cJ95bqZHVitB4dW7LjDSSTPMubJymNnoX2TJS+z+MSFX7VV446ISgZFHcr2FoEsTrd5y MSiFNPfgIX6ICh9+MhY3PoZW5csr0KKpi9qmjjgQXpf/RG7Papt5KfTAi6cIO6hxZPCv 1irTusFhD3E85ItmByYWjIvzM8ygowmua4Qo8ifb2kz12RksY0ESzBKBd5lvCfGUehZh 9G5BcWUSEQnGBhxtBuv6RjmwzxhTAvJQwOpN7YcNF+las2ghdhnqfczAriTmqF1rkcEx PEkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=Z9UOhu1oPVHuUMFiSoTQmnPqxKc1zJbL68zWmBIwwLw=; b=Uhn3D82lJ8RcS9t/CUvW5bv96US2Z7TLu5tTQBwpjViFgXpdbToqJaR+uUl27wOMUK fGPoRlbYpC0QJ7ma/hgDKVflUD5JPeIIUHeK29c4Nv0QfWWqMfxtbJDydNWDT0HM3XkG XCD2smi1mLYgTogLiERWfI7L5OYuuCsEgTqTyGNV36Wm5t1eYga/KQXBvXrHxiwEmRQD FAa4KjSY8Nqlu4o9jSGR4BqX0644K5a74y6+CPHHvmN7LbXtHgh7UWXXIwl6MAaCNyyC bzpTsP7j2XRfqu6pqYsPw6OLQYNkZeunby6jCqGG+oABM8swXZgQFnWDzS/A4Sp/IaL/ QA4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020aa7cd06000000b00501ea9917c5si11934839edw.74.2023.03.26.17.46.52; Sun, 26 Mar 2023 17:47:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231287AbjC0AiH convert rfc822-to-8bit (ORCPT + 59 others); Sun, 26 Mar 2023 20:38:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230468AbjC0AiG (ORCPT ); Sun, 26 Mar 2023 20:38:06 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8A3912E; Sun, 26 Mar 2023 17:38:05 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 32R0bIhoD005218, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 32R0bIhoD005218 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Mon, 27 Mar 2023 08:37:18 +0800 Received: from RTEXMBS02.realtek.com.tw (172.21.6.95) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Mon, 27 Mar 2023 08:37:34 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS02.realtek.com.tw (172.21.6.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Mon, 27 Mar 2023 08:37:34 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::b4a2:2bcc:48d1:8b02]) by RTEXMBS04.realtek.com.tw ([fe80::b4a2:2bcc:48d1:8b02%5]) with mapi id 15.01.2375.007; Mon, 27 Mar 2023 08:37:34 +0800 From: Ping-Ke Shih To: Cai Huoqing CC: Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , "Paolo Abeni" , Yan-Hsuan Chuang , "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: RE: [PATCH 5/5] wifi: rtw89: Remove redundant pci_clear_master Thread-Topic: [PATCH 5/5] wifi: rtw89: Remove redundant pci_clear_master Thread-Index: AQHZXXpgQZeubkOvMUyQJYDWG6thja8NzZ5A Date: Mon, 27 Mar 2023 00:37:33 +0000 Message-ID: <90e016cbdf5846b6989af90c1f57d532@realtek.com> References: <20230323112613.7550-1-cai.huoqing@linux.dev> <20230323112613.7550-5-cai.huoqing@linux.dev> In-Reply-To: <20230323112613.7550-5-cai.huoqing@linux.dev> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXMBS02.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-wireless@vger.kernel.org > -----Original Message----- > From: Cai Huoqing > Sent: Thursday, March 23, 2023 7:26 PM > 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 5/5] wifi: rtw89: Remove redundant pci_clear_master > > 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 Acked-by: Ping-Ke Shih > --- > drivers/net/wireless/realtek/rtw89/pci.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c > index ec8bb5f10482..75bd3ac4dd71 100644 > --- a/drivers/net/wireless/realtek/rtw89/pci.c > +++ b/drivers/net/wireless/realtek/rtw89/pci.c > @@ -2694,7 +2694,6 @@ static int rtw89_pci_claim_device(struct rtw89_dev *rtwdev, > static void rtw89_pci_declaim_device(struct rtw89_dev *rtwdev, > struct pci_dev *pdev) > { > - pci_clear_master(pdev); > pci_disable_device(pdev); > } > > -- > 2.34.1