- Propogate error to userspace on ttyUSB disconnect
- Set Mux open/disconnect retry to 1 to reduce recovery time.
Change-Id: I2b381299d36660480cfc60faffeb710685ccaaf8
Signed-off-by: Amol Bhatkar <amolbhatkar@motorola.com>
struct file *file,
poll_table *wait)
{
- return 0;
+ unsigned int mask = 0;
+
+ poll_wait(file, &tty->read_wait, wait);
+ poll_wait(file, &tty->write_wait, wait);
+ if (tty_hung_up_p(file))
+ mask |= POLLHUP;
+ if (!tty_is_writelocked(tty) && tty_write_room(tty) > 0)
+ mask |= POLLOUT | POLLWRNORM;
+
+ return mask;
+
+
}
/*
}
d->state = DISCONNECTING;
- try = 3;
+ /* Reducing retry to improve recovery times on BP panic/powercycle */
+ try = 1;
while (try--) {
ts27010_send_disc(ts0710, dlci);
mutex_unlock(&d->lock);
/* we are the first to try to open the dlci */
d->state = CONNECTING;
- try = dlci == 0 ? 10 : 3;
+ /* userspace already has a retry mechanism, not needed here */
+ try = dlci == 0 ? 10 : 1;
while (try--) {
ts27010_send_sabm(ts0710, dlci);