Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Tony Chuang <yhchuang@realtek.com>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Stanislaw Gruszka <sgruszka@redhat.com>
Subject: Re: [PATCH v3 2/3] rtw88: enclose c2h cmd handle with mutex
Date: Thu, 15 Aug 2019 14:11:10 -0700
Message-ID: <CA+ASDXPJiNTXAihzohT06RS57gkJU9Q-u3kpp0piJP-3U1miFw@mail.gmail.com> (raw)
In-Reply-To: <1564575767-27557-3-git-send-email-yhchuang@realtek.com>

I understand this is already queued up, but I still have a question:

On Wed, Jul 31, 2019 at 5:23 AM <yhchuang@realtek.com> wrote:
> C2H commands that cannot be handled in IRQ context should
> be protected by rtwdev->mutex. Because they might have a
> sequece of hardware operations that does not want to be
> interfered.

Can you elaborate on what interference you're looking at, exactly? I'm
not a big fan of defensive addition of global locks, and this
particular mutex isn't very targeted. It claims to be for mac80211
callbacks, but you use it in quite a few places (some of which clearly
don't make sense), and many of them are not related to mac80211
callbacks AFAICT.

To the contrary: this handler is called from the mac80211 work queue,
which is ordered and therefore shouldn't be getting "interrupted"
(e.g., conflicting commands). But then, you added the 'irqsafe'
command, which gets run from the ISR...and doesn't hold this lock,
obviously.

It may well be that you're correct here, but I'd like to see a better
explanation for stuff like this. And maybe an update to the
rtw_dev::mutex comments.

Brian

  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 12:22 [PATCH v3 0/3] rtw88: add support for BT co-existence mechanism yhchuang
2019-07-31 12:22 ` [PATCH v3 1/3] rtw88: allow c2h operation in irq context yhchuang
2019-08-06 12:42   ` Kalle Valo
2019-07-31 12:22 ` [PATCH v3 2/3] rtw88: enclose c2h cmd handle with mutex yhchuang
2019-08-15 21:11   ` Brian Norris [this message]
2019-08-16  2:45     ` Tony Chuang
2019-08-17  1:29       ` Brian Norris
2019-07-31 12:22 ` [PATCH v3 3/3] rtw88: add BT co-existence support yhchuang

Reply instructions:

You may reply publically 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=CA+ASDXPJiNTXAihzohT06RS57gkJU9Q-u3kpp0piJP-3U1miFw@mail.gmail.com \
    --to=briannorris@chromium.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.com \
    --cc=yhchuang@realtek.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

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org linux-wireless@archiver.kernel.org
	public-inbox-index linux-wireless


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/ public-inbox