diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-08-18 03:18:01 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:38:08 -0400 |
commit | 618952a7b19b796fce98364fb26551cbe3e16a75 (patch) | |
tree | ea1abbe59b699e423e13c50e970a7195a1ebd304 /drivers/watchdog/sch311x_wdt.c | |
parent | 950d5b0191dc3e71017f336017f75f6189f39f08 (diff) | |
download | linux-stable-618952a7b19b796fce98364fb26551cbe3e16a75.tar.gz linux-stable-618952a7b19b796fce98364fb26551cbe3e16a75.tar.bz2 linux-stable-618952a7b19b796fce98364fb26551cbe3e16a75.zip |
mwl8k: fix firmware command serialisation
The current mwl8k_priv->fw_lock spinlock doesn't actually protect
against multiple commands being submitted at once, as it is not kept
held over the entire firmware command submission. And since waiting
for command completion sleeps, we can't use a spinlock anyway.
To fix mwl8k firmware command serialisation properly, we have the
following requirements:
- Some commands require that the packet transmit path is idle when
the command is issued. (For simplicity, we'll just quiesce the
transmit path for every command.)
- There are certain sequences of commands that need to be issued to
the hardware sequentially, with no other intervening commands.
This leads to an implementation of a "firmware lock" as a mutex that
can be taken recursively, and which is taken by both the low-level
command submission function (mwl8k_post_cmd) as well as any users of
that function that require issuing of an atomic sequence of commands,
and quiesces the transmit path whenever it's taken.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/watchdog/sch311x_wdt.c')
0 files changed, 0 insertions, 0 deletions