Skip to content

Commit

Permalink
media: ite-cir: check for receive overflow
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
seanyoung authored and mchehab committed Mar 11, 2021
1 parent 0b16cd5 commit 28c7afb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/media/rc/ite-cir.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,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);
Expand Down

0 comments on commit 28c7afb

Please sign in to comment.