Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3570985pxb; Mon, 24 Jan 2022 12:29:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlP8dmL+opYCnvLP6Nd04BM0ETeUhYzRBGj5o3sGtr5eTdwd0LVhlxTFKhwsC7M2FhdVK9 X-Received: by 2002:a17:902:b7c1:b0:14b:62a4:6e5a with SMTP id v1-20020a170902b7c100b0014b62a46e5amr3108897plz.2.1643056182834; Mon, 24 Jan 2022 12:29:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643056182; cv=none; d=google.com; s=arc-20160816; b=TWlDEEgUmHEflPSMJd6qkyBjifA04icmBvNVjSMoG1oMEM9cMGqnTUzlkJsb04RiBN 6i5/DW6fMFVEmGJM2RyCB88xQYw9IbWdJADWw/P6+xyzrVBq0PIHXjevHX6fN+e//iwd fz77aHFUpUwragCovJZAqLnD7NFN5kwZHTag/uXnXVMAsPOwGTejjAUQbH9m4VJsbt2j Ocz2LFojndhxlYyLonfEYl4PRosxQWWooC41b2PZZQvRZ6ktyN16ogPWwA8J/z/MCCQ5 uXPJ3ZM8BbUy02kIAwwqvgvdREpvPlCqgmoHvRwlN+O13rco8NpIWZrRtI3CGQI0y9gn EZOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k0DJ32zCCvaXzJdzwrUYpdCQw7u8PjAP4tiWafxqzEs=; b=laS2Hjb/yPf4qavrdm9T0j8gLMnH+NgFcoutzYviL8fjbzey7FNvuXwFXIkV41ExDk PgkifedKlz3imdTklBlI5oRUmFAHAHrhPrpV0BDwbeyFUZa4lqmdjagCLxnnLkdKOEJX RK81qtBoVpURSiGFS3iKHakRSn6iub6L5I9Ns18hiT/NZgPJu9L4hiXkE5FjjlWOBb23 qCBgoIxLAmOrukpwXhm9IAk9dQ9zx0RPyNkGLbxaABX75CBPuVGtS42NcyBXyCxBQxye MZhsb9thPC+rxIzab4MZhLL+pr4UXxVsG21LryDjTcHZnNATRTZy+SE2DMY4CUJnsA8K HQUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LhSvSf52; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i190si6112813pge.699.2022.01.24.12.29.29; Mon, 24 Jan 2022 12:29:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LhSvSf52; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346801AbiAXTbc (ORCPT + 99 others); Mon, 24 Jan 2022 14:31:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349925AbiAXTWz (ORCPT ); Mon, 24 Jan 2022 14:22:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2DF8C02B865; Mon, 24 Jan 2022 11:08:45 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 53B3060B7B; Mon, 24 Jan 2022 19:08:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31DDCC340E8; Mon, 24 Jan 2022 19:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051324; bh=R7V9/x7dkmKmUlvwmV4BF5Mr5APc4p8ioiYZydxfyRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LhSvSf52qRW9iCzeWQB8DVBm7krQ6IxgIQ/uc0KRCqLxjgaVvZWI7v3UQFm2zDkuD XwrQDEcUo3IBxD7bq7ZdEq8F99voWimXZ246ihKOSlU4Vl9qZpRUQmo+v4wsE1fUzT c+tobpHa+0tbC/BM4AYMX58UMIwoHaQ8VgXpaWNo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sean Young , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.14 108/186] media: igorplugusb: receiver overflow should be reported Date: Mon, 24 Jan 2022 19:43:03 +0100 Message-Id: <20220124183940.588661906@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Young [ 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 Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- 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 a5ea86be8f449..2a0325d1f9def 100644 --- a/drivers/media/rc/igorplugusb.c +++ b/drivers/media/rc/igorplugusb.c @@ -73,9 +73,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