Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133198
b: refs/heads/master
c: 554b91e
h: refs/heads/master
v: v3
  • Loading branch information
Krzysztof Helt authored and Takashi Iwai committed Jan 13, 2009
1 parent 94bd505 commit c2974c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 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: 199f7978730a4bbd88038fd84212b30759579f1a
refs/heads/master: 554b91edec1c588b889a7357ff201c0a450e31ff
24 changes: 12 additions & 12 deletions trunk/sound/isa/sscape.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,20 +393,20 @@ static int sscape_wait_dma_unsafe(unsigned io_base, enum GA_REG reg, unsigned ti
*/
static int obp_startup_ack(struct soundscape *s, unsigned timeout)
{
while (timeout != 0) {
unsigned long end_time = jiffies + msecs_to_jiffies(timeout);

do {
unsigned long flags;
unsigned char x;

schedule_timeout_uninterruptible(1);

spin_lock_irqsave(&s->lock, flags);
x = inb(HOST_DATA_IO(s->io_base));
spin_unlock_irqrestore(&s->lock, flags);
if ((x & 0xfe) == 0xfe)
return 1;

--timeout;
} /* while */
msleep(10);
} while (time_before(jiffies, end_time));

return 0;
}
Expand All @@ -420,20 +420,20 @@ static int obp_startup_ack(struct soundscape *s, unsigned timeout)
*/
static int host_startup_ack(struct soundscape *s, unsigned timeout)
{
while (timeout != 0) {
unsigned long end_time = jiffies + msecs_to_jiffies(timeout);

do {
unsigned long flags;
unsigned char x;

schedule_timeout_uninterruptible(1);

spin_lock_irqsave(&s->lock, flags);
x = inb(HOST_DATA_IO(s->io_base));
spin_unlock_irqrestore(&s->lock, flags);
if (x == 0xfe)
return 1;

--timeout;
} /* while */
msleep(10);
} while (time_before(jiffies, end_time));

return 0;
}
Expand Down Expand Up @@ -529,10 +529,10 @@ static int upload_dma_data(struct soundscape *s,
* give it 5 seconds (max) ...
*/
ret = 0;
if (!obp_startup_ack(s, 5)) {
if (!obp_startup_ack(s, 5000)) {
snd_printk(KERN_ERR "sscape: No response from on-board processor after upload\n");
ret = -EAGAIN;
} else if (!host_startup_ack(s, 5)) {
} else if (!host_startup_ack(s, 5000)) {
snd_printk(KERN_ERR "sscape: SoundScape failed to initialise\n");
ret = -EAGAIN;
}
Expand Down

0 comments on commit c2974c6

Please sign in to comment.