sc16is7xx: don't wipe out port configuration on shutdown
authorJakub Kicinski <kubakici@wp.pl>
Mon, 16 Mar 2015 23:28:47 +0000 (00:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 21:38:36 +0000 (22:38 +0100)
EFCR register contains RS-485 configuration which should not
be changed by shutdown.  Instead of doing a write only update
the appropriate bits.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Jon Ringle <jringle@gridpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c

index 11bb440..e6b396e 100644 (file)
@@ -903,9 +903,11 @@ static void sc16is7xx_shutdown(struct uart_port *port)
        /* Disable all interrupts */
        sc16is7xx_port_write(port, SC16IS7XX_IER_REG, 0);
        /* Disable TX/RX */
-       sc16is7xx_port_write(port, SC16IS7XX_EFCR_REG,
-                            SC16IS7XX_EFCR_RXDISABLE_BIT |
-                            SC16IS7XX_EFCR_TXDISABLE_BIT);
+       sc16is7xx_port_update(port, SC16IS7XX_EFCR_REG,
+                             SC16IS7XX_EFCR_RXDISABLE_BIT |
+                             SC16IS7XX_EFCR_TXDISABLE_BIT,
+                             SC16IS7XX_EFCR_RXDISABLE_BIT |
+                             SC16IS7XX_EFCR_TXDISABLE_BIT);
 
        sc16is7xx_power(port, 0);
 }