diff options
author | Russ Meyerriecks <rmeyerreicks@digium.com> | 2011-06-28 22:29:00 +0000 |
---|---|---|
committer | Russ Meyerriecks <rmeyerreicks@digium.com> | 2011-06-28 22:29:00 +0000 |
commit | 608d6c66bc79ab57d2acf067ec7ed5d40b7d7749 (patch) | |
tree | 7e436a730202eb527cc319abfa2befecf1df40de /drivers/dahdi/wctdm24xxp/wctdm24xxp.h | |
parent | c7a4ca9241ab1774ef45e027afeb59573ee117c0 (diff) |
wcte12xp, wctdm24xxp: Load VPMOCT032 firmware in background.
The firmware load has been moved into a workqueue to prevent the module load
from blocking for the duration of the firmware upload. This could be up to 40
seconds. Driver prevents configuration until firmware load is finished and
is_initialized() returns true.
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9998 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm24xxp/wctdm24xxp.h')
-rw-r--r-- | drivers/dahdi/wctdm24xxp/wctdm24xxp.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h index 0f497aa..4ab313d 100644 --- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h +++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h @@ -273,11 +273,17 @@ struct wctdm { struct semaphore syncsem; int oldsync; - int initialized; /* 0 when the entire card is ready to go */ + int not_ready; /* 0 when the entire card is ready to go */ unsigned long checkflag; /* Internal state flags and task bits */ int companding; }; +static inline bool is_initialized(struct wctdm *wc) +{ + WARN_ON(wc->not_ready < 0); + return (wc->not_ready == 0); +} + /* Atomic flag bits for checkflag field */ #define WCTDM_CHECK_TIMING 0 |