summaryrefslogtreecommitdiff
path: root/drivers/ipack
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>2012-12-10 11:50:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-15 18:24:38 -0800
commita3882b7814fb3a5b7ea211e421451b1c4685f8f9 (patch)
tree25d99a83388db3fed0a35b8ae84849f31e416296 /drivers/ipack
parent9d01b6f064c130028be8beb729ada7c39021b582 (diff)
downloadlwn-a3882b7814fb3a5b7ea211e421451b1c4685f8f9.tar.gz
lwn-a3882b7814fb3a5b7ea211e421451b1c4685f8f9.zip
ipack/devices/ipoctal: avoid re-enable RX two times.
RX is enabled when the tty port is open, so no need to do it in initialization time: it can allow the device to receive characters but no TTY client is listening to them. It produced an infinite number of IRQ as RxFIFO is not read to clear that IRQ in the device, so it is still pending. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/ipack')
-rw-r--r--drivers/ipack/devices/ipoctal.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c
index f2875f0f14d4..09e3a8e63e22 100644
--- a/drivers/ipack/devices/ipoctal.c
+++ b/drivers/ipack/devices/ipoctal.c
@@ -60,6 +60,10 @@ static int ipoctal_port_activate(struct tty_port *port, struct tty_struct *tty)
channel = dev_get_drvdata(tty->dev);
+ /*
+ * Enable RX. TX will be enabled when
+ * there is something to send
+ */
iowrite8(CR_ENABLE_RX, &channel->regs->w.cr);
return 0;
}
@@ -385,12 +389,6 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
continue;
}
dev_set_drvdata(tty_dev, channel);
-
- /*
- * Enable again the RX. TX will be enabled when
- * there is something to send
- */
- iowrite8(CR_ENABLE_RX, &channel->regs->w.cr);
}
return 0;