Commit a26f009a authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: mos7720: fix hardware flow control

The register access to enable hardware flow control depends on the
device port number and not the port minor number.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c1ec1bcf
...@@ -1629,7 +1629,7 @@ static void change_port_settings(struct tty_struct *tty, ...@@ -1629,7 +1629,7 @@ static void change_port_settings(struct tty_struct *tty,
mos7720_port->shadowMCR |= (UART_MCR_XONANY); mos7720_port->shadowMCR |= (UART_MCR_XONANY);
/* To set hardware flow control to the specified * /* To set hardware flow control to the specified *
* serial port, in SP1/2_CONTROL_REG */ * serial port, in SP1/2_CONTROL_REG */
if (port->number) if (port_number)
write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x01); write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x01);
else else
write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x02); write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x02);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment