patch-2.4.15 linux/drivers/char/esp.c
Next file: linux/drivers/char/hp_keyb.c
Previous file: linux/drivers/char/drm/drm_vm.h
Back to the patch index
Back to the overall index
- Lines: 69
- Date:
Fri Nov 9 14:01:21 2001
- Orig file:
v2.4.14/linux/drivers/char/esp.c
- Orig date:
Sun Sep 23 11:40:57 2001
diff -u --recursive --new-file v2.4.14/linux/drivers/char/esp.c linux/drivers/char/esp.c
@@ -2123,7 +2123,7 @@
if (info->blocked_open) {
if (info->close_delay) {
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(info->close_delay);
}
wake_up_interruptible(&info->open_wait);
@@ -2156,7 +2156,7 @@
while ((serial_in(info, UART_ESI_STAT1) != 0x03) ||
(serial_in(info, UART_ESI_STAT2) != 0xff)) {
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(char_time);
if (signal_pending(current))
@@ -2170,7 +2170,7 @@
}
restore_flags(flags);
- current->state = TASK_RUNNING;
+ set_current_state(TASK_RUNNING);
}
/*
@@ -2203,6 +2203,7 @@
DECLARE_WAITQUEUE(wait, current);
int retval;
int do_clocal = 0;
+ unsigned long flags;
/*
* If the device is in the middle of being closed, then block
@@ -2274,12 +2275,14 @@
printk("block_til_ready before block: ttys%d, count = %d\n",
info->line, info->count);
#endif
+ save_flags(flags);
cli();
if (!tty_hung_up_p(filp))
info->count--;
- sti();
+ restore_flags(flags);
info->blocked_open++;
while (1) {
+ save_flags(flags);
cli();
if (!(info->flags & ASYNC_CALLOUT_ACTIVE) &&
(tty->termios->c_cflag & CBAUD)) {
@@ -2293,7 +2296,7 @@
serial_out(info, UART_ESI_CMD2,
scratch | UART_MCR_DTR | UART_MCR_RTS);
}
- sti();
+ restore_flags(flags);
set_current_state(TASK_INTERRUPTIBLE);
if (tty_hung_up_p(filp) ||
!(info->flags & ASYNC_INITIALIZED)) {
@@ -2326,7 +2329,7 @@
#endif
schedule();
}
- current->state = TASK_RUNNING;
+ set_current_state(TASK_RUNNING);
remove_wait_queue(&info->open_wait, &wait);
if (!tty_hung_up_p(filp))
info->count++;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)