From: Larry Finger <larry.finger@lwfinger.net>
To: Michael Buesch <mb@bu3sch.de>
Cc: bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org
Subject: Re: [RFC/T] b43: Fix Radio On/Off LED action
Date: Tue, 27 Nov 2007 10:28:33 -0600 [thread overview]
Message-ID: <474C45B1.3050909@lwfinger.net> (raw)
In-Reply-To: <200711271713.02698.mb@bu3sch.de>
Michael Buesch wrote:
> On Tuesday 27 November 2007 17:03:57 Larry Finger wrote:
> This is not how led triggers work.
> You are shortcutting the whole thing here. So you could as well
> remove the whole rfkill and LEDs code.
It just plain doesn't work now. What I'm trying to do is get something to the users that will
restore the behavior they want while we work out the details of the rfkill and LEDs code.
> Please properly register the LED in the leds code and
> add a default LED trigger for the rfkill trigger.
> This has several advantages to the user, among the possiblility to
> reassign a LED to a different trigger.
How do I do that?
>> @@ -70,11 +75,13 @@ static int b43_rfkill_soft_toggle(void *
>> struct b43_wldev *dev = data;
>> struct b43_wl *wl = dev->wl;
>> int err = 0;
>> + int lock = mutex_is_locked(&wl->mutex);
>>
>> if (!wl->rfkill.registered)
>> return 0;
>>
>> - mutex_lock(&wl->mutex);
>> + if (!lock)
>> + mutex_lock(&wl->mutex);
>
> Nah, it shouldn't be locked by "current" in the first place, here.
> (I guess that's what you are trying to check here).
> That's what the !registered check above is for.
> This !lock check is racy.
If you recall my message from yesterday, I got a locking error. That is what I'm trying to prevent.
I know it is racy, but I don't know the correct way to do it.
Larry
next prev parent reply other threads:[~2007-11-27 16:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 16:03 [RFC/T] b43: Fix Radio On/Off LED action Larry Finger
2007-11-27 16:13 ` Michael Buesch
2007-11-27 16:28 ` Larry Finger [this message]
2007-11-27 17:05 ` Michael Buesch
2007-11-27 18:29 ` Ehud Gavron
2007-11-27 20:02 ` [RFC/T V2] " Larry Finger
2007-11-27 20:20 ` Michael Buesch
2007-11-27 21:22 ` Larry Finger
2007-11-28 14:11 ` Michael Buesch
2007-11-28 15:05 ` Larry Finger
2007-11-28 16:13 ` Michael Buesch
2007-11-28 16:41 ` Larry Finger
2007-11-28 16:46 ` Michael Buesch
2007-11-28 17:08 ` Larry Finger
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=474C45B1.3050909@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
/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).