[PATCH 6/6] media: ite-cir: check for receive overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's best if this condition is reported.

Signed-off-by: Sean Young <sean@xxxxxxxx>
---
 drivers/media/rc/ite-cir.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index cc0a70dcf93d..9580e9e6e5c9 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -236,8 +236,14 @@ static irqreturn_t ite_cir_isr(int irq, void *data)
 	/* read the interrupt flags */
 	iflags = dev->params->get_irq_causes(dev);
 
+	/* Check for RX overflow */
+	if (iflags & ITE_IRQ_RX_FIFO_OVERRUN) {
+		dev_warn(&dev->rdev->dev, "receive overflow\n");
+		ir_raw_event_reset(dev->rdev);
+	}
+
 	/* check for the receive interrupt */
-	if (iflags & (ITE_IRQ_RX_FIFO | ITE_IRQ_RX_FIFO_OVERRUN)) {
+	if (iflags & ITE_IRQ_RX_FIFO) {
 		/* read the FIFO bytes */
 		rx_bytes = dev->params->get_rx_bytes(dev, rx_buf,
 						    ITE_RX_FIFO_LEN);
@@ -496,13 +502,13 @@ static int it87_get_irq_causes(struct ite_dev *dev)
 
 	switch (iflags) {
 	case IT87_II_RXDS:
-		ret = ITE_IRQ_RX_FIFO;
+		ret |= ITE_IRQ_RX_FIFO;
 		break;
 	case IT87_II_RXFO:
-		ret = ITE_IRQ_RX_FIFO_OVERRUN;
+		ret |= ITE_IRQ_RX_FIFO_OVERRUN;
 		break;
 	case IT87_II_TXLDL:
-		ret = ITE_IRQ_TX_FIFO;
+		ret |= ITE_IRQ_TX_FIFO;
 		break;
 	}
 
-- 
2.29.2




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux