aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hysdn/hysdn_sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hysdn/hysdn_sched.c')
-rw-r--r--drivers/isdn/hysdn/hysdn_sched.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/isdn/hysdn/hysdn_sched.c
index 1c0d54ac12ab..1fadf0133e9b 100644
--- a/drivers/isdn/hysdn/hysdn_sched.c
+++ b/drivers/isdn/hysdn/hysdn_sched.c
@@ -155,8 +155,7 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
155 if (card->debug_flags & LOG_SCHED_ASYN) 155 if (card->debug_flags & LOG_SCHED_ASYN)
156 hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1); 156 hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1);
157 157
158 save_flags(flags); 158 spin_lock_irqsave(&card->hysdn_lock, flags);
159 cli();
160 while (card->async_busy) { 159 while (card->async_busy) {
161 sti(); 160 sti();
162 161
@@ -165,7 +164,7 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
165 164
166 msleep_interruptible(20); /* Timeout 20ms */ 165 msleep_interruptible(20); /* Timeout 20ms */
167 if (!--cnt) { 166 if (!--cnt) {
168 restore_flags(flags); 167 spin_unlock_irqrestore(&card->hysdn_lock, flags);
169 return (-ERR_ASYNC_TIME); /* timed out */ 168 return (-ERR_ASYNC_TIME); /* timed out */
170 } 169 }
171 cli(); 170 cli();
@@ -194,13 +193,13 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
194 193
195 msleep_interruptible(20); /* Timeout 20ms */ 194 msleep_interruptible(20); /* Timeout 20ms */
196 if (!--cnt) { 195 if (!--cnt) {
197 restore_flags(flags); 196 spin_unlock_irqrestore(&card->hysdn_lock, flags);
198 return (-ERR_ASYNC_TIME); /* timed out */ 197 return (-ERR_ASYNC_TIME); /* timed out */
199 } 198 }
200 cli(); 199 cli();
201 } /* wait for buffer to become free again */ 200 } /* wait for buffer to become free again */
202 201
203 restore_flags(flags); 202 spin_unlock_irqrestore(&card->hysdn_lock, flags);
204 203
205 if (card->debug_flags & LOG_SCHED_ASYN) 204 if (card->debug_flags & LOG_SCHED_ASYN)
206 hysdn_addlog(card, "async tx-cfg data send"); 205 hysdn_addlog(card, "async tx-cfg data send");