All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Baochen Qiang <bqiang@codeaurora.org>
Cc: ath11k@lists.infradead.org,  linux-wireless@vger.kernel.org
Subject: Re: [PATCH 4/7] ath11k: refactor multiple MSI vector implementation
Date: Fri, 19 Nov 2021 14:43:25 +0200	[thread overview]
Message-ID: <87lf1kco42.fsf@codeaurora.org> (raw)
In-Reply-To: <20211026041705.5167-1-bqiang@codeaurora.org> (Baochen Qiang's message of "Tue, 26 Oct 2021 12:17:05 +0800")

Baochen Qiang <bqiang@codeaurora.org> writes:

> From: Carl Huang <cjhuang@codeaurora.org>
>
> This is to prepare for one MSI vector support. IRQ enable and disable
> of CE and DP are done only in case of multiple MSI vectors.
>
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>
> Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>

[...]

> @@ -558,6 +558,13 @@ static void ath11k_pci_free_irq(struct ath11k_base *ab)
>  static void ath11k_pci_ce_irq_enable(struct ath11k_base *ab, u16 ce_id)
>  {
>  	u32 irq_idx;
> +	struct ath11k_pci *ab_pci = ath11k_pci_priv(ab);

ab_pci should be before irq_idx to follow the reverse xmas tree style, I
fixed it in the pending branch.

> +
> +	/*In case of one MSI vector, we handle irq enable/disable
> +	 *in a uniform way since we only have one irq
> +	 */

There should be a space after '*', fixed now.

> +	if (!test_bit(ATH11K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags))
> +		return;
>  
>  	irq_idx = ATH11K_PCI_IRQ_CE0_OFFSET + ce_id;
>  	enable_irq(ab->irq_num[irq_idx]);
> @@ -566,6 +573,13 @@ static void ath11k_pci_ce_irq_enable(struct ath11k_base *ab, u16 ce_id)
>  static void ath11k_pci_ce_irq_disable(struct ath11k_base *ab, u16 ce_id)
>  {
>  	u32 irq_idx;
> +	struct ath11k_pci *ab_pci = ath11k_pci_priv(ab);
> +
> +	/*In case of one MSI vector, we handle irq enable/disable
> +	 *in a uniform way since we only have one irq
> +	 */
> +	if (!test_bit(ATH11K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags))
> +		return;

Both style issues fixed here as well.

>  static void ath11k_pci_ext_grp_disable(struct ath11k_ext_irq_grp *irq_grp)
>  {
>  	int i;
> +	struct ath11k_pci *ab_pci = ath11k_pci_priv(irq_grp->ab);
> +
> +	/*In case of one MSI vector, we handle irq enable/disable
> +	 *in a uniform way since we only have one irq
> +	 */
> +	if (!test_bit(ATH11K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags))
> +		return;

And here.

>  
>  	for (i = 0; i < irq_grp->num_irq; i++)
>  		disable_irq_nosync(irq_grp->ab->irq_num[irq_grp->irqs[i]]);
> @@ -651,6 +672,13 @@ static void __ath11k_pci_ext_irq_disable(struct ath11k_base *sc)
>  static void ath11k_pci_ext_grp_enable(struct ath11k_ext_irq_grp *irq_grp)
>  {
>  	int i;
> +	struct ath11k_pci *ab_pci = ath11k_pci_priv(irq_grp->ab);
> +
> +	/*In case of one MSI vector, we handle irq enable/disable
> +	 *in a uniform way since we only have one irq
> +	 */
> +	if (!test_bit(ATH11K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags))
> +		return;

And here.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: Baochen Qiang <bqiang@codeaurora.org>
Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 4/7] ath11k: refactor multiple MSI vector implementation
Date: Fri, 19 Nov 2021 14:43:25 +0200	[thread overview]
Message-ID: <87lf1kco42.fsf@codeaurora.org> (raw)
In-Reply-To: <20211026041705.5167-1-bqiang@codeaurora.org> (Baochen Qiang's message of "Tue, 26 Oct 2021 12:17:05 +0800")

Baochen Qiang <bqiang@codeaurora.org> writes:

> From: Carl Huang <cjhuang@codeaurora.org>
>
> This is to prepare for one MSI vector support. IRQ enable and disable
> of CE and DP are done only in case of multiple MSI vectors.
>
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>
> Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>

[...]

> @@ -558,6 +558,13 @@ static void ath11k_pci_free_irq(struct ath11k_base *ab)
>  static void ath11k_pci_ce_irq_enable(struct ath11k_base *ab, u16 ce_id)
>  {
>  	u32 irq_idx;
> +	struct ath11k_pci *ab_pci = ath11k_pci_priv(ab);

ab_pci should be before irq_idx to follow the reverse xmas tree style, I
fixed it in the pending branch.

> +
> +	/*In case of one MSI vector, we handle irq enable/disable
> +	 *in a uniform way since we only have one irq
> +	 */

There should be a space after '*', fixed now.

> +	if (!test_bit(ATH11K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags))
> +		return;
>  
>  	irq_idx = ATH11K_PCI_IRQ_CE0_OFFSET + ce_id;
>  	enable_irq(ab->irq_num[irq_idx]);
> @@ -566,6 +573,13 @@ static void ath11k_pci_ce_irq_enable(struct ath11k_base *ab, u16 ce_id)
>  static void ath11k_pci_ce_irq_disable(struct ath11k_base *ab, u16 ce_id)
>  {
>  	u32 irq_idx;
> +	struct ath11k_pci *ab_pci = ath11k_pci_priv(ab);
> +
> +	/*In case of one MSI vector, we handle irq enable/disable
> +	 *in a uniform way since we only have one irq
> +	 */
> +	if (!test_bit(ATH11K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags))
> +		return;

Both style issues fixed here as well.

>  static void ath11k_pci_ext_grp_disable(struct ath11k_ext_irq_grp *irq_grp)
>  {
>  	int i;
> +	struct ath11k_pci *ab_pci = ath11k_pci_priv(irq_grp->ab);
> +
> +	/*In case of one MSI vector, we handle irq enable/disable
> +	 *in a uniform way since we only have one irq
> +	 */
> +	if (!test_bit(ATH11K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags))
> +		return;

And here.

>  
>  	for (i = 0; i < irq_grp->num_irq; i++)
>  		disable_irq_nosync(irq_grp->ab->irq_num[irq_grp->irqs[i]]);
> @@ -651,6 +672,13 @@ static void __ath11k_pci_ext_irq_disable(struct ath11k_base *sc)
>  static void ath11k_pci_ext_grp_enable(struct ath11k_ext_irq_grp *irq_grp)
>  {
>  	int i;
> +	struct ath11k_pci *ab_pci = ath11k_pci_priv(irq_grp->ab);
> +
> +	/*In case of one MSI vector, we handle irq enable/disable
> +	 *in a uniform way since we only have one irq
> +	 */
> +	if (!test_bit(ATH11K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags))
> +		return;

And here.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2021-11-19 12:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  4:17 [PATCH 4/7] ath11k: refactor multiple MSI vector implementation Baochen Qiang
2021-10-26  4:17 ` Baochen Qiang
2021-11-19 12:43 ` Kalle Valo [this message]
2021-11-19 12:43   ` 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=87lf1kco42.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=bqiang@codeaurora.org \
    --cc=linux-wireless@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.