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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CF51C761AF for ; Fri, 31 Mar 2023 14:49:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232879AbjCaOtV (ORCPT ); Fri, 31 Mar 2023 10:49:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231878AbjCaOtT (ORCPT ); Fri, 31 Mar 2023 10:49:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0D901C1C4; Fri, 31 Mar 2023 07:49:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4F660622E4; Fri, 31 Mar 2023 14:49:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D39ACC433EF; Fri, 31 Mar 2023 14:49:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680274157; bh=nwc5YPzwUATML1zglVwWiNR73nsURuoCmDlBMPRIh8Y=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=i5BirXI10C+WP67AGxYbXoGuzImzyfv7lkGdaXASDjYmzlIqR7xZkKK9cmBYuL62l xV5KplyHb8fc45zfaP22QaeDtzV2J+yUX36hoJqF/LzJ70zTuse+0F3s5Dg6gyCazE ZhcfO24xV9BdOQIg2mSqF/ZnfWKeqELg9eCG1cOl+r8nFsBpovy3qBQ17R0DQlTc53 i0euRVEG6uKQAPPFRk3PNoFnS0y3+TKW5yJKqCTHkreKaTe8TT2WEu4ktJgN6vZ0dg WwFMrOkXvatdH99kpswLnY3JO687UJSBz1yBZe9KQWKebWpFztIf3F4EO3LH4s11m7 tH5idFt/LBDpw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 4/5] wifi: rtw88: Remove redundant pci_clear_master From: Kalle Valo In-Reply-To: <20230323112613.7550-4-cai.huoqing@linux.dev> References: <20230323112613.7550-4-cai.huoqing@linux.dev> To: Cai Huoqing Cc: cai.huoqing@linux.dev, "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 User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <168027415284.32751.5288169344605905589.kvalo@kernel.org> Date: Fri, 31 Mar 2023 14:49:14 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cai Huoqing 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; > > 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: Simon Horman > Reviewed-by: Ping-Ke Shih Patch applied to wireless-next.git, thanks. e665c6d67e54 wifi: rtw88: Remove redundant pci_clear_master -- https://patchwork.kernel.org/project/linux-wireless/patch/20230323112613.7550-4-cai.huoqing@linux.dev/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches