diff options
Diffstat (limited to 'drivers/isdn/pcbit/drv.c')
-rw-r--r-- | drivers/isdn/pcbit/drv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/isdn/pcbit/drv.c b/drivers/isdn/pcbit/drv.c index 1eaf62273903..f02cc506fbfa 100644 --- a/drivers/isdn/pcbit/drv.c +++ b/drivers/isdn/pcbit/drv.c | |||
@@ -796,6 +796,7 @@ static void set_running_timeout(unsigned long ptr) | |||
796 | #endif | 796 | #endif |
797 | dev = (struct pcbit_dev *) ptr; | 797 | dev = (struct pcbit_dev *) ptr; |
798 | 798 | ||
799 | dev->l2_state = L2_DOWN; | ||
799 | wake_up_interruptible(&dev->set_running_wq); | 800 | wake_up_interruptible(&dev->set_running_wq); |
800 | } | 801 | } |
801 | 802 | ||
@@ -818,7 +819,8 @@ static int set_protocol_running(struct pcbit_dev *dev) | |||
818 | 819 | ||
819 | add_timer(&dev->set_running_timer); | 820 | add_timer(&dev->set_running_timer); |
820 | 821 | ||
821 | interruptible_sleep_on(&dev->set_running_wq); | 822 | wait_event(dev->set_running_wq, dev->l2_state == L2_RUNNING || |
823 | dev->l2_state == L2_DOWN); | ||
822 | 824 | ||
823 | del_timer(&dev->set_running_timer); | 825 | del_timer(&dev->set_running_timer); |
824 | 826 | ||
@@ -842,8 +844,6 @@ static int set_protocol_running(struct pcbit_dev *dev) | |||
842 | printk(KERN_DEBUG "pcbit: initialization failed\n"); | 844 | printk(KERN_DEBUG "pcbit: initialization failed\n"); |
843 | printk(KERN_DEBUG "pcbit: firmware not loaded\n"); | 845 | printk(KERN_DEBUG "pcbit: firmware not loaded\n"); |
844 | 846 | ||
845 | dev->l2_state = L2_DOWN; | ||
846 | |||
847 | #ifdef DEBUG | 847 | #ifdef DEBUG |
848 | printk(KERN_DEBUG "Bank3 = %02x\n", | 848 | printk(KERN_DEBUG "Bank3 = %02x\n", |
849 | readb(dev->sh_mem + BANK3)); | 849 | readb(dev->sh_mem + BANK3)); |