lkml.org 
[lkml]   [2022]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 40/73] media: igorplugusb: receiver overflow should be reported
    Date
    From: Sean Young <sean@mess.org>

    [ Upstream commit 8fede658e7ddb605bbd68ed38067ddb0af033db4 ]

    Without this, some IR will be missing mid-stream and we might decode
    something which never really occurred.

    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/igorplugusb.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/drivers/media/rc/igorplugusb.c b/drivers/media/rc/igorplugusb.c
    index b981f7290c1b2..1e8276040ea5b 100644
    --- a/drivers/media/rc/igorplugusb.c
    +++ b/drivers/media/rc/igorplugusb.c
    @@ -64,9 +64,11 @@ static void igorplugusb_irdata(struct igorplugusb *ir, unsigned len)
    if (start >= len) {
    dev_err(ir->dev, "receive overflow invalid: %u", overflow);
    } else {
    - if (overflow > 0)
    + if (overflow > 0) {
    dev_warn(ir->dev, "receive overflow, at least %u lost",
    overflow);
    + ir_raw_event_reset(ir->rc);
    + }

    do {
    rawir.duration = ir->buf_in[i] * 85333;
    --
    2.34.1
    \
     
     \ /
      Last update: 2022-01-18 04:40    [W:4.192 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site