Skip to content

Commit 41c6068

Browse files
jason77-wanggregkh
authored andcommitted
Revert "serial: sc16is7xx: Clear RS485 bits in the shutdown"
This reverts commit 927728a. Once the uart_port->rs485->flag is set to SER_RS485_ENABLED, the port should always work in RS485 mode. If users want the port to leave RS485 mode, they need to call ioctl() to clear SER_RS485_ENABLED. So here we shouldn't clear the RS485 bits in the shutdown(). Fixes: 927728a ("serial: sc16is7xx: Clear RS485 bits in the shutdown") Signed-off-by: Hui Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4847380 commit 41c6068

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/tty/serial/sc16is7xx.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,12 +1238,10 @@ static void sc16is7xx_shutdown(struct uart_port *port)
12381238

12391239
/* Disable all interrupts */
12401240
sc16is7xx_port_write(port, SC16IS7XX_IER_REG, 0);
1241-
/* Disable TX/RX, clear auto RS485 and RTS invert */
1241+
/* Disable TX/RX */
12421242
sc16is7xx_port_update(port, SC16IS7XX_EFCR_REG,
12431243
SC16IS7XX_EFCR_RXDISABLE_BIT |
1244-
SC16IS7XX_EFCR_TXDISABLE_BIT |
1245-
SC16IS7XX_EFCR_AUTO_RS485_BIT |
1246-
SC16IS7XX_EFCR_RTS_INVERT_BIT,
1244+
SC16IS7XX_EFCR_TXDISABLE_BIT,
12471245
SC16IS7XX_EFCR_RXDISABLE_BIT |
12481246
SC16IS7XX_EFCR_TXDISABLE_BIT);
12491247

0 commit comments

Comments
 (0)