On Tue, Sep 19, 2017 at 11:44:57PM +0200, Andreas Steinmetz wrote: > [Please CC me on replies, I'm not subscribed] > > There's systems around that only have incompletely wired serial ports, > e.g. the CompuLab Intense PC3 which only has 4 wire serial ports (RxD, > TxD, RTS, CTS). > > The kernel currently only supports DCD for the PPS line discipline. > > The attached patch adds a configuration option that allows CTS to be > used instead of DCD for the PPS line discipline for 8250/16x50 based > serial ports. > > It may look a bit ugly but it seems to me to be the least intrusive way > to enable the use of the kernel PPS line discipline for machines with > incompletely wired serial ports. > > The patch is actually against 4.12.10 (sorry for the older kernel) and > tested with gpsd on a CompuLab Intense PC3. > -- > Andreas Steinmetz SPAMmers use robotrap@xxxxxxxx > --- linux.orig/drivers/tty/serial/serial_core.c 2017-09-19 22:15:00.655700355 +0200 > +++ linux/drivers/tty/serial/serial_core.c 2017-09-19 22:15:05.748732334 +0200 > @@ -2920,10 +2920,13 @@ > { > struct tty_port *port = &uport->state->port; > struct tty_struct *tty = port->tty; > +#ifndef CONFIG_PPS_CLIENT_LDISC_CTS > struct tty_ldisc *ld; > +#endif Ick, that's pretty bad. And probably something, if you really wanted to do this, you should do on a per-port basis, not for all serial ports, right? Also, we hate #ifdef in .c code, as well as the patch not being in a format we could apply it in, even if we liked it. Care to fix it up to be more general purpose? Or how about just buying better hardware? :) thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html