2023-09-21 03:01:42

by Brian Norris

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: mwifiex: followup PCIE and related cleanups

On Tue, Sep 19, 2023 at 04:28:00PM +0300, Dmitry Antipov wrote:
> Introduce a few more (PCIE and generic interface related)
> cleanups which becomes reasonable after the previous patch.
>
> Signed-off-by: Dmitry Antipov <[email protected]>
> ---
> drivers/net/wireless/marvell/mwifiex/main.h | 4 +--
> drivers/net/wireless/marvell/mwifiex/pcie.c | 28 +++++----------------
> 2 files changed, 8 insertions(+), 24 deletions(-)

...

> --- a/drivers/net/wireless/marvell/mwifiex/pcie.c
> +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
> @@ -710,18 +710,12 @@ static int mwifiex_pm_wakeup_card_complete(struct mwifiex_adapter *adapter)
> * The host interrupt mask is read, the disable bit is reset and
> * written back to the card host interrupt mask register.
> */
> -static int mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter)
> +static void mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter)
> {
> if (mwifiex_pcie_ok_to_access_hw(adapter))
> mwifiex_write_reg(adapter, PCIE_HOST_INT_MASK, 0x00000000);
>
> atomic_set(&adapter->tx_hw_pending, 0);
> - return 0;
> }

I have a nagging feeling that some of this is hitting
partially-implemented features (esp. around error handling for the sleep
cookie / mwifiex_pcie_ok_to_access_hw() stuff), but I also bet that the
only chip using that feature (8766) is in bad enough shape that no one
is getting reliable usage out of it anyway. (I know I'm not; ChromeOS
never picked up PCIe support until 8997, where we worked out most of the
driver/firmware bugs.)

So maybe no one cares, and simplifying the dead logic is a net win.

Acked-by: Brian Norris <[email protected]>