Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2179794rwl; Sun, 26 Mar 2023 17:46:38 -0700 (PDT) X-Google-Smtp-Source: AKy350awTPpb+KfNTcZvBIPN+UPuasRrwdtjHVaF6hUbHts0AkASlJz61XRwMm6sOhngx0ReoM8Z X-Received: by 2002:a17:906:5010:b0:92a:77dd:f6f with SMTP id s16-20020a170906501000b0092a77dd0f6fmr11208121ejj.73.1679877998268; Sun, 26 Mar 2023 17:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679877998; cv=none; d=google.com; s=arc-20160816; b=tRM3Hgs75q/pcIW3D9116q8T/i4AYjkZRyWmQpoVCTYoydLzr6LBlWmbcnqhMReSKM NHFDDqCwp/6DbT1w9uoS8EGtfrYmezRxKpeY5UYN66JHhZ9GueK5fhUq8IW46Hmaa8r2 XHTCT77vXTwTmmQrMYIeCTIaxeFDNVWMPnrkyY3RoxBJ4lNoKAEO2M7u2wRA8lJwqdYf DDoXpye8uRqkHhzYdoAlQnP5g0QGkwIDkhu66H+kBaDlkhUmvB4KaWDJy+RPHGNNtIXk bCSZSx/IE3PN7OpNP6D0UfCI/8A/ys2PB8IvD2zNP5JRpck7IYK8IKzg4MnetPLZ0125 g1Uw== 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=BGTh+w/JdorTq4HHAUimVCdQROlMpq57++gPy7VGUs4=; b=LCTLZQma9eyA0idnIZMG3UfPtTzhNNxghdrxdwQW4Qx/BC78OxmzmulBJN8SYlOvfh m0v2jvkbOPbqcFZHBDjU+F86sEpSqSJSkSwR8BM6+RVXjTAvUwFS0HpX4dqKK7VsL7nQ GLDRRK6Pztdf27pZeulOWojhUmuQsy+X0K1CuH1naQC7ccN3PjeoEmpChtreBR7EhUwP nNwY3bwlOeEbLMrJ0ADP2KVO6xC1a4+OZVZf27KT9DOhGHygRuQmjJYWFPoHFJbdVq5a yIDneKfhC0lyscL6YOqxr5hHUhHG3UFZqTXl01ThBNbKFHAQqr21boPZMJ5ZVhqV9uqM aN8Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rk3-20020a170907214300b00928ae392711si26162352ejb.606.2023.03.26.17.46.13; Sun, 26 Mar 2023 17:46:38 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbjC0AiF convert rfc822-to-8bit (ORCPT + 99 others); Sun, 26 Mar 2023 20:38:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbjC0AiE (ORCPT ); Sun, 26 Mar 2023 20:38:04 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2089B12E; Sun, 26 Mar 2023 17:38:02 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 32R0ahTxB000447, 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 32R0ahTxB000447 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Mon, 27 Mar 2023 08:36:43 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) 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:36:59 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS04.realtek.com.tw (172.21.6.97) 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:36:59 +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:36:59 +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 4/5] wifi: rtw88: Remove redundant pci_clear_master Thread-Topic: [PATCH 4/5] wifi: rtw88: Remove redundant pci_clear_master Thread-Index: AQHZXXpcd54QcafoaE+PwO7Wb3KM9K8NzW0g Date: Mon, 27 Mar 2023 00:36:59 +0000 Message-ID: <9307e11fafe34de39135fc4ff90a0c0c@realtek.com> References: <20230323112613.7550-1-cai.huoqing@linux.dev> <20230323112613.7550-4-cai.huoqing@linux.dev> In-Reply-To: <20230323112613.7550-4-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: RTEXMBS04.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-kernel@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 4/5] wifi: rtw88: 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 Reviewed-by: Ping-Ke Shih > --- > 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