lkml.org 
[lkml]   [2018]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH 6/8] serial: 8250: Copy mctrl when register port.
    ----- Original Message -----
    > From: "Giulio Benetti" <giulio.benetti@micronovasrl.com>
    > Sent: Friday, June 1, 2018 7:40:19 AM

    > RS485 can modify mctrl on startup, especially when RTS_AFTER_SEND is on
    > TIOCM_RTS is set, then need to keep it set when registering port.
    >
    > Copy mctrl to new port too.
    >
    > Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
    > ---
    > drivers/tty/serial/8250/8250_core.c | 1 +
    > 1 file changed, 1 insertion(+)
    >
    > diff --git a/drivers/tty/serial/8250/8250_core.c
    > b/drivers/tty/serial/8250/8250_core.c
    > index c8c2b260c681..c8e62fbd6570 100644
    > --- a/drivers/tty/serial/8250/8250_core.c
    > +++ b/drivers/tty/serial/8250/8250_core.c
    > @@ -993,6 +993,7 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
    > uart->port.unthrottle = up->port.unthrottle;
    > uart->port.rs485_config = up->port.rs485_config;
    > uart->port.rs485 = up->port.rs485;
    > + uart->port.mctrl = up->port.mctrl;

    Hi Guilio,

    I ran into this same thing about six months ago, but I was able to
    accomplish what I needed by assigning a set_mctrl() function in my
    port definition. Perhaps that would be enough for your case, too?

    You should see a little lower in this file that set_mctrl is copied
    to the new port.

    -Aaron

    > uart->dma = up->dma;
    > uart->em485 = up->em485;
    > --
    > 2.17.0

    \
     
     \ /
      Last update: 2018-06-06 16:38    [W:2.331 / U:0.008 seconds]
    ©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site