[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1355136608-22029-7-git-send-email-siglesias@igalia.com>
Date: Mon, 10 Dec 2012 11:50:03 +0100
From: Samuel Iglesias Gonsalvez <siglesias@...lia.com>
To: Jens Taprogge <jens.taprogge@...rogge.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: industrypack-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, devel@...uxdriverproject.org,
Samuel Iglesias Gonsalvez <siglesias@...lia.com>
Subject: [PATCH 07/12] 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@...lia.com>
---
drivers/ipack/devices/ipoctal.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c
index 96467bb..45920f5 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;
}
@@ -384,12 +388,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;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists