Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40669
b: refs/heads/master
c: 1f604c4
h: refs/heads/master
i:
  40667: 64e0afa
v: v3
  • Loading branch information
Amol Lad authored and Linus Torvalds committed Nov 3, 2006
1 parent 80ce48a commit f578410
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43530d2b04b63ac4bb4ac25deee5f1180ccedc2e
refs/heads/master: 1f604c4bc078213aa1c4576efa0e8dad98522fa7
19 changes: 4 additions & 15 deletions trunk/drivers/isdn/hysdn/hysdn_sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,52 +155,41 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
if (card->debug_flags & LOG_SCHED_ASYN)
hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1);

spin_lock_irqsave(&card->hysdn_lock, flags);
while (card->async_busy) {
sti();

if (card->debug_flags & LOG_SCHED_ASYN)
hysdn_addlog(card, "async tx-cfg delayed");

msleep_interruptible(20); /* Timeout 20ms */
if (!--cnt) {
spin_unlock_irqrestore(&card->hysdn_lock, flags);
if (!--cnt)
return (-ERR_ASYNC_TIME); /* timed out */
}
cli();
} /* wait for buffer to become free */

spin_lock_irqsave(&card->hysdn_lock, flags);
strcpy(card->async_data, line);
card->async_len = strlen(line) + 1;
card->async_channel = chan;
card->async_busy = 1; /* request transfer */

/* now queue the task */
schedule_work(&card->irq_queue);
sti();
spin_unlock_irqrestore(&card->hysdn_lock, flags);

if (card->debug_flags & LOG_SCHED_ASYN)
hysdn_addlog(card, "async tx-cfg data queued");

cnt++; /* short delay */
cli();

while (card->async_busy) {
sti();

if (card->debug_flags & LOG_SCHED_ASYN)
hysdn_addlog(card, "async tx-cfg waiting for tx-ready");

msleep_interruptible(20); /* Timeout 20ms */
if (!--cnt) {
spin_unlock_irqrestore(&card->hysdn_lock, flags);
if (!--cnt)
return (-ERR_ASYNC_TIME); /* timed out */
}
cli();
} /* wait for buffer to become free again */

spin_unlock_irqrestore(&card->hysdn_lock, flags);

if (card->debug_flags & LOG_SCHED_ASYN)
hysdn_addlog(card, "async tx-cfg data send");

Expand Down

0 comments on commit f578410

Please sign in to comment.