ath10k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Kalle Valo <kvalo@kernel.org>, <linux-wireless@vger.kernel.org>,
	<lvc-project@linuxtesting.org>, <ath10k@lists.infradead.org>
Subject: Re: [PATCH 4/6] [v3] wifi: ath10k: do not ignore possible dma_alloc_coherent() error
Date: Thu, 24 Aug 2023 08:27:29 -0700	[thread overview]
Message-ID: <0e901fad-97ae-46ea-bebb-d1d5a557e8ae@quicinc.com> (raw)
In-Reply-To: <20230824055117.42309-4-dmantipov@yandex.ru>

On 8/23/2023 10:51 PM, Dmitry Antipov wrote:
> Change 'ath10k_ce_alloc_rri()' to return -ENOMEM in case
> of 'dma_alloc_coherent()' failure and fix error handling in
> 'ath10k_snoc_hif_power_up()'.
> 
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>

> ---
> v3: split from the larger v2 patch
> ---
>   drivers/net/wireless/ath/ath10k/ce.c   | 6 ++++--
>   drivers/net/wireless/ath/ath10k/ce.h   | 2 +-
>   drivers/net/wireless/ath/ath10k/snoc.c | 9 ++++++++-
>   3 files changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
> index 73aa3632b23c..d7275dcc1f99 100644
> --- a/drivers/net/wireless/ath/ath10k/ce.c
> +++ b/drivers/net/wireless/ath/ath10k/ce.c
> @@ -1906,7 +1906,7 @@ int ath10k_ce_alloc_pipe(struct ath10k *ar, int ce_id,
>   }
>   EXPORT_SYMBOL(ath10k_ce_alloc_pipe);
>   
> -void ath10k_ce_alloc_rri(struct ath10k *ar)
> +int ath10k_ce_alloc_rri(struct ath10k *ar)
>   {
>   	int i;
>   	u32 value;
> @@ -1919,7 +1919,7 @@ void ath10k_ce_alloc_rri(struct ath10k *ar)
>   					   &ce->paddr_rri, GFP_KERNEL);
>   
>   	if (!ce->vaddr_rri)
> -		return;
> +		return -ENOMEM;
>   
>   	ath10k_ce_write32(ar, ar->hw_ce_regs->ce_rri_low,
>   			  lower_32_bits(ce->paddr_rri));
> @@ -1934,6 +1934,8 @@ void ath10k_ce_alloc_rri(struct ath10k *ar)
>   		value |= ar->hw_ce_regs->upd->mask;
>   		ath10k_ce_write32(ar, ce_base_addr + ctrl1_regs, value);
>   	}
> +
> +	return 0;
>   }
>   EXPORT_SYMBOL(ath10k_ce_alloc_rri);
>   
> diff --git a/drivers/net/wireless/ath/ath10k/ce.h b/drivers/net/wireless/ath/ath10k/ce.h
> index a0b408176f7f..c90c00316356 100644
> --- a/drivers/net/wireless/ath/ath10k/ce.h
> +++ b/drivers/net/wireless/ath/ath10k/ce.h
> @@ -262,7 +262,7 @@ void ath10k_ce_enable_interrupts(struct ath10k *ar);
>   void ath10k_ce_dump_registers(struct ath10k *ar,
>   			      struct ath10k_fw_crash_data *crash_data);
>   
> -void ath10k_ce_alloc_rri(struct ath10k *ar);
> +int ath10k_ce_alloc_rri(struct ath10k *ar);
>   void ath10k_ce_free_rri(struct ath10k *ar);
>   
>   /* ce_attr.flags values */
> diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
> index 815df15f58fb..b3acb6ad6f45 100644
> --- a/drivers/net/wireless/ath/ath10k/snoc.c
> +++ b/drivers/net/wireless/ath/ath10k/snoc.c
> @@ -1074,10 +1074,17 @@ static int ath10k_snoc_hif_power_up(struct ath10k *ar,
>   		goto err_hw_power_off;
>   	}
>   
> -	ath10k_ce_alloc_rri(ar);
> +	ret = ath10k_ce_alloc_rri(ar);
> +	if (ret)
> +		goto err_snoc_wlan_disable;
>   
>   	ath10k_snoc_init_pipes(ar);
>   
> +	return 0;
> +
> +err_snoc_wlan_disable:
> +	ath10k_snoc_wlan_disable(ar);
> +
>   err_hw_power_off:
>   	ath10k_hw_power_off(ar);
>   


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2023-08-24 15:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23  9:50 [PATCH] [v2] wifi: ath10k: cleanup CE initialization Dmitry Antipov
2023-08-23  9:50 ` [PATCH 2/3] [v2] wifi: ath10k: simplify ath10k_peer_assoc_h_vht() Dmitry Antipov
2023-08-23 14:55   ` Jeff Johnson
2023-08-23  9:50 ` [PATCH 3/3] [v2] wifi: ath10k: simplify ath10k_pci_pm_suspend() Dmitry Antipov
2023-08-23 14:57   ` Jeff Johnson
2023-08-23 10:03 ` [lvc-project] [PATCH] [v2] wifi: ath10k: cleanup CE initialization Alexey Khoroshilov
2023-08-23 10:13   ` Antipov, Dmitriy
2023-08-25  7:47     ` Kalle Valo
2023-08-23 14:53 ` Jeff Johnson
2023-08-24  5:51   ` [PATCH 1/6] [v3] wifi: ath10k: cleanup CE ring initialization Dmitry Antipov
2023-08-24  5:51     ` [PATCH 2/6] [v3] wifi: ath10k: simplify ath10k_ce_init_pipe() Dmitry Antipov
2023-08-24 15:26       ` Jeff Johnson
2023-08-24  5:51     ` [PATCH 3/6] [v3] wifi: ath10k: cleanup CE pipes initialization Dmitry Antipov
2023-08-24 15:27       ` Jeff Johnson
2023-08-24  5:51     ` [PATCH 4/6] [v3] wifi: ath10k: do not ignore possible dma_alloc_coherent() error Dmitry Antipov
2023-08-24 15:27       ` Jeff Johnson [this message]
2023-08-24  5:51     ` [PATCH 5/6] [v3] wifi: ath10k: simplify ath10k_peer_assoc_h_vht() Dmitry Antipov
2023-08-24  5:51     ` [PATCH 6/6] [v3] wifi: ath10k: simplify ath10k_pci_pm_suspend() Dmitry Antipov
2023-08-24 15:26     ` [PATCH 1/6] [v3] wifi: ath10k: cleanup CE ring initialization Jeff Johnson
2023-09-20 13:23     ` Kalle Valo
2023-09-21  8:58       ` Dmitry Antipov
2023-09-21  9:33         ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e901fad-97ae-46ea-bebb-d1d5a557e8ae@quicinc.com \
    --to=quic_jjohnson@quicinc.com \
    --cc=ath10k@lists.infradead.org \
    --cc=dmantipov@yandex.ru \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).