From: Chuah Kim Tatt <kim.tatt.chuah@intel.com>
To: gregkh@linuxfoundation.org, vinod.koul@intel.com
Cc: heikki.krogerus@linux.intel.com,
andriy.shevchenko@linux.intel.com,
mika.westerberg@linux.intel.com, kim.tatt.chuah@intel.com,
linux-kernel@vger.kernel.org, jui.nee.tan@intel.com,
peter@hurleysoftware.com, linux-serial@vger.kernel.org
Subject: [PATCH v2 3/3] serial: 8250_mid: Read RX buffer on RX DMA timeout for DNV
Date: Wed, 15 Jun 2016 13:44:13 +0800 [thread overview]
Message-ID: <1465969453-16198-4-git-send-email-kim.tatt.chuah@intel.com> (raw)
In-Reply-To: <1465969453-16198-1-git-send-email-kim.tatt.chuah@intel.com>
From: "Chuah, Kim Tatt" <kim.tatt.chuah@intel.com>
In DNV, when RX DMA is used and number of bytes received is less than
transfer size, only RX DMA timeout interrupt is sent. When this happens,
read the RX buffer.
Signed-off-by: Chuah, Kim Tatt <kim.tatt.chuah@intel.com>
---
drivers/tty/serial/8250/8250_mid.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_mid.c b/drivers/tty/serial/8250/8250_mid.c
index b218ff5..339de9c 100644
--- a/drivers/tty/serial/8250/8250_mid.c
+++ b/drivers/tty/serial/8250/8250_mid.c
@@ -96,6 +96,7 @@ static int tng_setup(struct mid8250 *mid, struct uart_port *p)
static int dnv_handle_irq(struct uart_port *p)
{
struct mid8250 *mid = p->private_data;
+ struct uart_8250_port *up = up_to_u8250p(p);
unsigned int fisr = serial_port_in(p, INTEL_MID_UART_DNV_FISR);
u32 status;
int ret = IRQ_NONE;
@@ -103,9 +104,10 @@ static int dnv_handle_irq(struct uart_port *p)
if (fisr & BIT(2)) {
err = hsu_dma_get_status(&mid->dma_chip, 1, &status);
- if (err > 0)
+ if (err > 0) {
+ serial8250_rx_dma_flush(up);
ret |= IRQ_HANDLED;
- else if (err == 0)
+ } else if (err == 0)
ret |= hsu_dma_do_irq(&mid->dma_chip, 1, status);
}
if (fisr & BIT(1)) {
--
1.9.1
next prev parent reply other threads:[~2016-06-15 5:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 5:44 [PATCH v2 0/3] Fix DNV HSUART RX DMA timeout interrupt issue Chuah Kim Tatt
2016-06-15 5:44 ` [PATCH v2 1/3] dmaengine: hsu: Export hsu_dma_get_status() Chuah Kim Tatt
2016-06-30 4:34 ` Vinod Koul
2016-06-15 5:44 ` [PATCH v2 2/3] serial: 8250_dma: Export serial8250_rx_dma_flush() Chuah Kim Tatt
2016-06-15 5:44 ` Chuah Kim Tatt [this message]
2016-06-15 12:15 ` [PATCH v2 0/3] Fix DNV HSUART RX DMA timeout interrupt issue Andy Shevchenko
2016-06-16 9:34 ` Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465969453-16198-4-git-send-email-kim.tatt.chuah@intel.com \
--to=kim.tatt.chuah@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jui.nee.tan@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=peter@hurleysoftware.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®