public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 8/8] ath10k: allow explicit MSI/MSI-X disabling
Date: Mon, 25 Nov 2013 14:01:53 +0200	[thread overview]
Message-ID: <871u24ofke.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1385125518-13461-9-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Fri, 22 Nov 2013 14:05:18 +0100")

Michal Kazior <michal.kazior@tieto.com> writes:

> This can be useful for testing and debugging.
>
> Two new ath10k_pci module options are now available:
>
>  disable_msix - disable just MSI-X
>  disable_msi - disable MSI (along with MSI-X)
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

This is useful but I think it's a bit too much to have two more options,
it would be simpler to have just one. Few quick ideas how to do this a
bit differently:

irq_mode: 0 = automatic, 2 = MSI, 1 = legacy

Here the problem is of course that we can't force use of MSI if the host
only supports legacy interrupts, but IMHO that's a minor nuisance and in
that case we should just enable legacy interrupts.

disable_msi: 0x1 = disable MSI-X, 0x2 = disable MSI

Basically this is just your booleans converted to a bitfield.

I vote for irq_mode because I think that's easier for the user to
understand. But I'm sure there is a better way to do this.

> +	if (msix_supported && !ath10k_disable_msix && !ath10k_disable_msi) {
> +		ar_pci->num_msi_intrs = MSI_NUM_REQUEST;
> +		ret = pci_enable_msi_block(ar_pci->pdev, ar_pci->num_msi_intrs);
> +		if (ret == 0)
> +			return 0;
> +		if (ret > 0)
> +			pci_disable_msi(ar_pci->pdev);
> +
> +		/* fall-through */
> +	}

If we force some other irq mode than the default it would be good to
have an info print for that.

-- 
Kalle Valo

  reply	other threads:[~2013-11-25 12:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 13:05 [PATCH 0/8] ath10k: pci fixes 2013-11-22 Michal Kazior
2013-11-22 13:05 ` [PATCH 1/8] ath10k: don't consume other's shared interrupts Michal Kazior
2013-11-24 13:59   ` Kalle Valo
2013-11-22 13:05 ` [PATCH 2/8] ath10k: split up pci irq code Michal Kazior
2013-11-22 13:05 ` [PATCH 3/8] ath10k: fix memory leak on hif_start failpath Michal Kazior
2013-11-22 13:05 ` [PATCH 4/8] ath10k: don't use interrupts for BMI Michal Kazior
2013-11-22 13:05 ` [PATCH 5/8] ath10k: defer irq registration until hif start() Michal Kazior
2013-11-22 13:05 ` [PATCH 6/8] ath10k: extract functions for legacy irq handling Michal Kazior
2013-11-22 13:05 ` [PATCH 7/8] ath10k: re-add support for early fw indication Michal Kazior
2013-11-25 12:20   ` Kalle Valo
2013-11-25 12:46     ` Michal Kazior
2013-11-22 13:05 ` [PATCH 8/8] ath10k: allow explicit MSI/MSI-X disabling Michal Kazior
2013-11-25 12:01   ` Kalle Valo [this message]
2013-11-25 13:06 ` [PATCH v2 0/8] ath10k: pci fixes 2013-11-22 Michal Kazior
2013-11-25 13:06   ` [PATCH v2 1/8] ath10k: don't consume other's shared interrupts Michal Kazior
2013-11-25 13:06   ` [PATCH v2 2/8] ath10k: split up pci irq code Michal Kazior
2013-11-25 13:06   ` [PATCH v2 3/8] ath10k: don't use interrupts for BMI Michal Kazior
2013-11-25 13:06   ` [PATCH v2 4/8] ath10k: decouple ath10k_pci_start_ce() Michal Kazior
2013-11-25 13:06   ` [PATCH v2 5/8] ath10k: defer irq registration until hif start() Michal Kazior
2013-11-25 13:06   ` [PATCH v2 6/8] ath10k: extract functions for legacy irq handling Michal Kazior
2013-11-25 13:06   ` [PATCH v2 7/8] ath10k: re-add support for early fw indication Michal Kazior
2013-11-25 13:06   ` [PATCH v2 8/8] ath10k: allow explicit MSI/MSI-X disabling Michal Kazior
2013-11-27 14:47     ` Kalle Valo
2013-11-27 14:48   ` [PATCH v2 0/8] ath10k: pci fixes 2013-11-22 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=871u24ofke.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.com \
    /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