Apply a bandaid to a problem elsewhere in the driver, when the process is
blocked in a write() while waiting for the output to drain, sleep only for tp->t_timeout, not forever. This only seems to happen when there is either a modem lockup holding the hardware flow control down, or due to some problem in the driver with processes attempting to write after the modem has hung up (eg: elm, tf).
This commit is contained in:
parent
ee090854ff
commit
838c9e34b6
@ -30,7 +30,7 @@
|
|||||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||||
* NO EVENT SHALL THE AUTHORS BE LIABLE.
|
* NO EVENT SHALL THE AUTHORS BE LIABLE.
|
||||||
*
|
*
|
||||||
* $Id: si.c,v 1.46 1996/06/21 21:35:01 peter Exp $
|
* $Id: si.c,v 1.47 1996/06/30 04:56:05 peter Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -1059,8 +1059,11 @@ siwrite(dev, uio, flag)
|
|||||||
pp->sp_state |= SS_WAITWRITE;
|
pp->sp_state |= SS_WAITWRITE;
|
||||||
DPRINT((pp, DBG_WRITE, "in siwrite, wait for SS_BLOCKWRITE to clear\n"));
|
DPRINT((pp, DBG_WRITE, "in siwrite, wait for SS_BLOCKWRITE to clear\n"));
|
||||||
if (error = ttysleep(tp, (caddr_t)pp, TTOPRI|PCATCH,
|
if (error = ttysleep(tp, (caddr_t)pp, TTOPRI|PCATCH,
|
||||||
"siwrite", 0))
|
"siwrite", tp->t_timeout)) {
|
||||||
|
if (error == ETIMEDOUT)
|
||||||
|
error = EIO;
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
error = (*linesw[tp->t_line].l_write)(tp, uio, flag);
|
error = (*linesw[tp->t_line].l_write)(tp, uio, flag);
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||||
* NO EVENT SHALL THE AUTHORS BE LIABLE.
|
* NO EVENT SHALL THE AUTHORS BE LIABLE.
|
||||||
*
|
*
|
||||||
* $Id: si.c,v 1.46 1996/06/21 21:35:01 peter Exp $
|
* $Id: si.c,v 1.47 1996/06/30 04:56:05 peter Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -1059,8 +1059,11 @@ siwrite(dev, uio, flag)
|
|||||||
pp->sp_state |= SS_WAITWRITE;
|
pp->sp_state |= SS_WAITWRITE;
|
||||||
DPRINT((pp, DBG_WRITE, "in siwrite, wait for SS_BLOCKWRITE to clear\n"));
|
DPRINT((pp, DBG_WRITE, "in siwrite, wait for SS_BLOCKWRITE to clear\n"));
|
||||||
if (error = ttysleep(tp, (caddr_t)pp, TTOPRI|PCATCH,
|
if (error = ttysleep(tp, (caddr_t)pp, TTOPRI|PCATCH,
|
||||||
"siwrite", 0))
|
"siwrite", tp->t_timeout)) {
|
||||||
|
if (error == ETIMEDOUT)
|
||||||
|
error = EIO;
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
error = (*linesw[tp->t_line].l_write)(tp, uio, flag);
|
error = (*linesw[tp->t_line].l_write)(tp, uio, flag);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user