Skip to contentSkip to conversation

serial: omap: fix the reciever line error case

PATCH New Shubhrajyoti D 3 participants 3 messages Sep 21, 2012 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 serial: omap: fix the reciever line error case

This patch does the following
- In case of errors if there least one data character in the RX FIFO read it otherwise it may stall the receiver.

This is recommended in the interrupt reset method in the table 23-246 of the omap4 TRM.

---
- Tested on omap4sdp.
- pm tested hitting off in idle and suspend.
- v2 changes update the changelogs.
- Also remove the dummy check as FE , PE , BI and OE are the only receiver errors.

 drivers/tty/serial/omap-serial.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/tty/serial/omap-serial.c +4 -0
index a0d4460..4fea16b 100644
@@ -334,6 +334,10 @@ static unsigned int check_modem_status(struct uart_omap_port *up)
 static void serial_omap_rlsi(struct uart_omap_port *up, unsigned int lsr)
 {
 	unsigned int flag;
+	unsigned char ch = 0;
+
+	if (likely(lsr & UART_LSR_DR))
+		ch = serial_in(up, UART_RX);
 
 	up->port.icount.rx++;
 	flag = TTY_NORMAL;
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH v2 1/1 serial: omap: fix the reciever line error case

Quoted 8 lines · Shubhrajyoti D

This patch does the following
- In case of errors if there least one data character in the RX FIFO read it otherwise it may stall the receiver.

This is recommended in the interrupt reset method in the table 23-246 of the omap4 TRM.

FWIW:

Quoted 32 lines

---
- Tested on omap4sdp.
- pm tested hitting off in idle and suspend.
- v2 changes update the changelogs.
- Also remove the dummy check as FE , PE , BI and OE are the only receiver errors.

 drivers/tty/serial/omap-serial.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/tty/serial/omap-serial.c +4 -0
index a0d4460..4fea16b 100644
@@ -334,6 +334,10 @@ static unsigned int check_modem_status(struct uart_omap_port *up)
 static void serial_omap_rlsi(struct uart_omap_port *up, unsigned int lsr)
 {
 	unsigned int flag;
+	unsigned char ch = 0;
+
+	if (likely(lsr & UART_LSR_DR))
+		ch = serial_in(up, UART_RX);
 
 	up->port.icount.rx++;
 	flag = TTY_NORMAL;
Signature · 6 lines
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120921/716d4245/attachment.sig>
#2 lore raw

PATCH v2 1/1 serial: omap: fix the reciever line error case

In reply to Shubhrajyoti D
Quoted 7 lines · Shubhrajyoti D

This patch does the following
- In case of errors if there least one data character in the RX FIFO read it otherwise it may stall the receiver.

This is recommended in the interrupt reset method in the table 23-246 of the omap4 TRM.

Quoted 7 lines

---
- Tested on omap4sdp.
- pm tested hitting off in idle and suspend.
- v2 changes update the changelogs.
- Also remove the dummy check as FE , PE , BI and OE are the only receiver errors.

This one also makes the regression I was seeing on 3530/Overo disappear.

Thanks,

Kevin