]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: ite-cir: check for receive overflow
authorSean Young <sean@mess.org>
Mon, 22 Feb 2021 08:08:35 +0000 (09:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:38:18 +0000 (10:38 +0200)
[ Upstream commit 28c7afb07ccfc0a939bb06ac1e7afe669901c65a ]

It's best if this condition is reported.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/rc/ite-cir.c

index 63165d324fffdb2ddbbfa81478b8d38618921775..7d3e50d94d86a82993996a4621684c14a5339b5c 100644 (file)
@@ -292,8 +292,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,