From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0D934C77B61 for ; Thu, 23 Mar 2023 11:32:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KInyMHVdNgovay1FL3TKB0QIVlzk8+/0IoxFVI5XXCw=; b=dZkgQ7gyemutsi ux+NN1OwgHHeL2n3Ad1fbOBVT7NgS8fJ4CLl/uH3HzNALzZJlNawNDSE6dAuDHLBIjfTmQa+nWcuj eebwD9WfyKHvhrwItAvyQWcVKWclqtyG+TUJVgmkQ/Obb6WKX0fPskbWEVvzRKr9L2V7ZjDCSxt3t QDx9ljAbeoTJg4Bw+Q8rkK1W82HPkZnkzAYBUn04y/aXkZP7j1WfsbHcGJQjKqC/l61Ej18kutxNs FVpf2WHzoTnfbxQdV7WeWZopulElUq4G7Egh2XjsZnp6piZxtr9MwhDGE4HjPVhP1+RCC9F4oLIRo ETEpaYtP68xIqBNAIHmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pfJBG-001jrQ-2K for ath12k@archiver.kernel.org; Thu, 23 Mar 2023 11:32:30 +0000 Received: from out-30.mta0.migadu.com ([91.218.175.30]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pfJB6-001jkd-06 for ath12k@lists.infradead.org; Thu, 23 Mar 2023 11:32:26 +0000 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=1679570808; 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=rGX1VskIO2esd5iCrlayQqCszF4VgpeWWivrdPxtbg4=; b=DEC0eNYJuul660lvjxaoeqUvLhH6GgzbdTk1AxcCx2Kj5x96BZHZ6aIIUJVK+sncVZDQbr L9l0JBXZZCm4W/vQB+sibYpvqmQhuHR7E+rRTEisdt4Tig3SaANUsw7ODwTgZtri/miSV/ x9vbQkNC/yn23vno5LmkGylhSwUG/RI= 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 5/5] wifi: rtw89: Remove redundant pci_clear_master Date: Thu, 23 Mar 2023 19:26:13 +0800 Message-Id: <20230323112613.7550-5-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 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230323_043220_307167_E8BA934B X-CRM114-Status: UNSURE ( 7.78 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath12k@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath12k" Errors-To: ath12k-bounces+ath12k=archiver.kernel.org@lists.infradead.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/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 -- ath12k mailing list ath12k@lists.infradead.org https://lists.infradead.org/mailman/listinfo/ath12k