ssize_t read_chan (struct tty_struct * tty, struct file * file, unsigned char __user * buf, size_t nr);
Perform reads for the line discipline. We are guaranteed that the line discipline will not be closed under us but we may get multiple parallel readers and must handle this ourselves. We may also get a hangup. Always called in user context, may sleep.
This code must be sure never to sleep through a hangup.