From: "Jérôme Pouiller" <jerome.pouiller@silabs.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Mohamed Dawod <mhm.dawod@gmail.com>,
kernelnewbies@kernelnewbies.org
Subject: Re: [staging-testing] drivers/staging/wfx/hif_tx.c
Date: Wed, 10 Jun 2020 10:10:56 +0200 [thread overview]
Message-ID: <1949452.ECF46Ag4iX@pc-42> (raw)
In-Reply-To: <CAGCTLNSwM+5kzSABDN7DGFKz4FcCN-DwUmhU8dzhtyW0=kh3gg@mail.gmail.com>
On Wednesday 10 June 2020 08:53:13 CEST Mohamed Dawod wrote:
> Hello,
>
> I read this point in staging/wfx/TODO file
>
> - In wfx_cmd_send(), "async" allow to send command without waiting the reply.
> It may help in some situation, but it is not yet used. In add, it may cause
> some trouble:
> https://lore.kernel.org/driverdev-devel/alpine.DEB.2.21.1910041317381.2992@hadrien/
> So, fix it (by replacing the mutex with a semaphore) or drop it.
>
> I think that this issue has already been fixed in hif_shutdown() function, hasn't it ?
Indeed, when I wrote the TODO file, the function hif_shutdown() didn't
exist yet.
> I have another question. How can (replacing the mutex with a semaphore) solve the problem?
My understanding is that a mutex aims to be acquired and released from the
same context. In some specific usages (RT-mutex? lock proving?), acquire
mutex from a context and release it from another can produce some errors.
In contrary a boolean semaphore does not have this restriction.
(can anyone confirm that?)
--
Jérôme Pouiller
parent reply other threads:[~2020-06-10 8:11 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CAGCTLNSwM+5kzSABDN7DGFKz4FcCN-DwUmhU8dzhtyW0=kh3gg@mail.gmail.com>]
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=1949452.ECF46Ag4iX@pc-42 \
--to=jerome.pouiller@silabs.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernelnewbies@kernelnewbies.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhm.dawod@gmail.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;
as well as URLs for NNTP newsgroup(s).