serial closing_wait and close_delay used from wrong data structure
PATCH 1/1 serial closing_wait and close_delay used from wrong data structure
Hi Marcello,
Here's the split-off patch you requested.
In several drivers, the closing_wait and close_delay values are written to a struct serial_state by TIOCSSERIAL, but the values used in the close routine are read from a struct async_struct, with no code to transfer of values between the two structures. This patch ignores the members in struct async_struct and uses the values from struct serial_state.
-- Ian.
Signed-off-by Ian Abbott <[email protected]>
arch/ppc/8xx_io/uart.c +4 -4
@@ -1760,8 +1760,8 @@* the line discipline to only process XON/XOFF characters. */ tty->closing =1 ; -if (info->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) -tty_wait_until_sent (tty, info->closing_wait); +if (state->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) +tty_wait_until_sent (tty, state->closing_wait);/* * At this point we stop accepting input. To do this, we * disable the receive line status interrupts, and tell the
@@ -1797,9 +1797,9 @@ info->event =0 ; info->tty =0 ;if (info->blocked_open) { -if (info->close_delay) { +if (state->close_delay) { current->state =TASK_INTERRUPTIBLE ; -schedule_timeout (info->close_delay); +schedule_timeout (state->close_delay); }wake_up_interruptible (&info->open_wait); }
arch/ppc/cpm2_io/uart.c +4 -4
@@ -1754,8 +1754,8 @@* the line discipline to only process XON/XOFF characters. */ tty->closing =1 ; -if (info->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) -tty_wait_until_sent (tty, info->closing_wait); +if (state->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) +tty_wait_until_sent (tty, state->closing_wait);/* * At this point we stop accepting input. To do this, we * disable the receive line status interrupts, and tell the
@@ -1790,9 +1790,9 @@ info->event =0 ; info->tty =0 ;if (info->blocked_open) { -if (info->close_delay) { +if (state->close_delay) { current->state =TASK_INTERRUPTIBLE ; -schedule_timeout (info->close_delay); +schedule_timeout (state->close_delay); }wake_up_interruptible (&info->open_wait); }
drivers/char/amiserial.c +4 -4
@@ -1581,8 +1581,8 @@* the line discipline to only process XON/XOFF characters. */ tty->closing =1 ; -if (info->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) -tty_wait_until_sent (tty, info->closing_wait); +if (state->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) +tty_wait_until_sent (tty, state->closing_wait);/* * At this point we stop accepting input. To do this, we * disable the receive line status interrupts, and tell the
@@ -1614,9 +1614,9 @@ info->event =0 ; info->tty =0 ;if (info->blocked_open) { -if (info->close_delay) { +if (state->close_delay) { current->state =TASK_INTERRUPTIBLE ; -schedule_timeout (info->close_delay); +schedule_timeout (state->close_delay); }wake_up_interruptible (&info->open_wait); }
drivers/char/au1x00-serial.c +4 -4
@@ -1948,8 +1948,8 @@* the line discipline to only process XON/XOFF characters. */ tty->closing =1 ; -if (info->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) -tty_wait_until_sent (tty, info->closing_wait); +if (state->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) +tty_wait_until_sent (tty, state->closing_wait);/* * At this point we stop accepting input. To do this, we * disable the receive line status interrupts, and tell the
@@ -1976,9 +1976,9 @@ info->event =0 ; info->tty =0 ;if (info->blocked_open) { -if (info->close_delay) { +if (state->close_delay) {set_current_state (TASK_INTERRUPTIBLE ); -schedule_timeout (info->close_delay); +schedule_timeout (state->close_delay); }wake_up_interruptible (&info->open_wait); }
drivers/char/serial.c +4 -4
@@ -2845,8 +2845,8 @@* the line discipline to only process XON/XOFF characters. */ tty->closing =1 ; -if (info->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) -tty_wait_until_sent (tty, info->closing_wait); +if (state->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) +tty_wait_until_sent (tty, state->closing_wait);/* * At this point we stop accepting input. To do this, we * disable the receive line status interrupts, and tell the
@@ -2873,9 +2873,9 @@ info->event =0 ; info->tty =0 ;if (info->blocked_open) { -if (info->close_delay) { +if (state->close_delay) {set_current_state (TASK_INTERRUPTIBLE ); -schedule_timeout (info->close_delay); +schedule_timeout (state->close_delay); }wake_up_interruptible (&info->open_wait); }
drivers/char/serial_txx927.c +4 -4
@@ -1442,8 +1442,8 @@* the line discipline to only process XON/XOFF characters. */ tty->closing =1 ; -if (info->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) -tty_wait_until_sent (tty, info->closing_wait); +if (state->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) +tty_wait_until_sent (tty, state->closing_wait);/* * At this point we stop accepting input. To do this, we * disable the receive line status interrupts, and tell the
@@ -1471,9 +1471,9 @@ info->event =0 ; info->tty =0 ;if (info->blocked_open) { -if (info->close_delay) { +if (state->close_delay) { current->state =TASK_INTERRUPTIBLE ; -schedule_timeout (info->close_delay); +schedule_timeout (state->close_delay); }wake_up_interruptible (&info->open_wait); }
drivers/char/vac-serial.c +4 -4
@@ -1699,8 +1699,8 @@* the line discipline to only process XON/XOFF characters. */ tty->closing =1 ; -if (info->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) -tty_wait_until_sent (tty, info->closing_wait); +if (state->closing_wait !=ASYNC_CLOSING_WAIT_NONE ) +tty_wait_until_sent (tty, state->closing_wait);/* * At this point we stop accepting input. To do this, we * disable the receive line status interrupts, and tell the
@@ -1727,9 +1727,9 @@ info->event =0 ; info->tty =0 ;if (info->blocked_open) { -if (info->close_delay) { +if (state->close_delay) { current->state =TASK_INTERRUPTIBLE ; -schedule_timeout (info->close_delay); +schedule_timeout (state->close_delay); }wake_up_interruptible (&info->open_wait); }