ipack/devices/ipoctal: add missing rx_enable = 1
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 18 Jan 2013 07:57:21 +0000 (08:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Jan 2013 00:04:16 +0000 (16:04 -0800)
There was a bug in the code when managing a GE IP-OCTAL-485 board. The RX would
be enabled but we have a wrong state in the rx_enable flag.

Then, if the user changes the terminal settings, RX would not be enabled again.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ipack/devices/ipoctal.c

index 0b3c4b8fe83012a7a77480ee4a87c1f23202d712..93cbf9dda1fec1bca4cdaa2d6864e421c0d069b6 100644 (file)
@@ -207,6 +207,7 @@ static void ipoctal_irq_channel(struct ipoctal_channel *channel)
                if (channel->board_id == IPACK1_DEVICE_ID_SBS_OCTAL_485) {
                        iowrite8(CR_CMD_NEGATE_RTSN, &channel->regs->w.cr);
                        iowrite8(CR_ENABLE_RX, &channel->regs->w.cr);
                if (channel->board_id == IPACK1_DEVICE_ID_SBS_OCTAL_485) {
                        iowrite8(CR_CMD_NEGATE_RTSN, &channel->regs->w.cr);
                        iowrite8(CR_ENABLE_RX, &channel->regs->w.cr);
+                       channel->rx_enable = 1;
                }
        }
 
                }
        }