summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp/xhfc.c
diff options
context:
space:
mode:
authorRuss Meyerriecks <rmeyerreicks@digium.com>2011-06-28 22:29:00 +0000
committerRuss Meyerriecks <rmeyerreicks@digium.com>2011-06-28 22:29:00 +0000
commit608d6c66bc79ab57d2acf067ec7ed5d40b7d7749 (patch)
tree7e436a730202eb527cc319abfa2befecf1df40de /drivers/dahdi/wctdm24xxp/xhfc.c
parentc7a4ca9241ab1774ef45e027afeb59573ee117c0 (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/xhfc.c')
-rw-r--r--drivers/dahdi/wctdm24xxp/xhfc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/dahdi/wctdm24xxp/xhfc.c b/drivers/dahdi/wctdm24xxp/xhfc.c
index de6ad89..c5eb5a6 100644
--- a/drivers/dahdi/wctdm24xxp/xhfc.c
+++ b/drivers/dahdi/wctdm24xxp/xhfc.c
@@ -1160,7 +1160,7 @@ static int xhfc_find_sync_with_timingcable(struct b400m *b4)
}
for (j = 0; j < WC_MAX_IFACES && ifaces[j]; j++) {
- if (!ifaces[j]->initialized) {
+ if (is_initialized(ifaces[j])) {
set_bit(WCTDM_CHECK_TIMING, &wc->checkflag);
osrc = -2;
goto out;
@@ -2194,7 +2194,7 @@ int b400m_spanconfig(struct file *file, struct dahdi_span *span,
b4 = bspan->parent;
wc = b4->wc;
- if ((file->f_flags & O_NONBLOCK) && !wc->initialized)
+ if ((file->f_flags & O_NONBLOCK) && !is_initialized(wc))
return -EAGAIN;
res = wctdm_wait_for_ready(wc);
@@ -2271,7 +2271,7 @@ int b400m_chanconfig(struct file *file, struct dahdi_chan *chan, int sigtype)
struct b400m *b4 = bspan->parent;
int res;
- if ((file->f_flags & O_NONBLOCK) && !b4->wc->initialized)
+ if ((file->f_flags & O_NONBLOCK) && !is_initialized(b4->wc))
return -EAGAIN;
res = wctdm_wait_for_ready(b4->wc);
@@ -2395,7 +2395,7 @@ static void xhfc_work(struct work_struct *work)
int i, j, k, fifo;
unsigned char b, b2;
- if (b4->shutdown || !b4->wc->initialized)
+ if (b4->shutdown || !is_initialized(b4->wc))
return;
b4->irq_oview = b400m_getreg(b4, R_IRQ_OVIEW);
@@ -2518,7 +2518,7 @@ void wctdm_bri_checkisr(struct wctdm *wc, struct wctdm_module *const mod,
return;
/* DEFINITELY don't do anything if our structures aren't ready! */
- if (!wc->initialized || !b4 || !b4->inited)
+ if (!is_initialized(wc) || !b4 || !b4->inited)
return;
if (offset == 0) {