Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3386748pxb; Mon, 17 Jan 2022 19:18:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVSMhiIlGAIyZDmNqZWV+Q3WbESDsRD6c1ADqAktVtz76IPOekqs3ceUyYJnvYaIQckaUR X-Received: by 2002:a65:6ab0:: with SMTP id x16mr22200342pgu.24.1642475920458; Mon, 17 Jan 2022 19:18:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642475920; cv=none; d=google.com; s=arc-20160816; b=1CCmbyymbWZDvHEngolVZX4wDtM4lpHRkQ/aPNKLQF/tqcdzpV2+yqg2QkFkZmEYF1 vmiMkqAEgUheeJ6B0Fed1hDj4SSPd3A1svJwvyYJtNvwXY+ayIwfDLjypkLqm6bXYSth cEAKBOEAllj7HF4F2auPR0ktTNcSYrdUYp4kIDvFd7qqI9yfWdTRY/ufqgjm824WoK5p LX6sxkQz272us4W+RjBjxBCj9Z6AxgQqcf4sQJSi+gUAqvRyGkBMuB2R8SAqV4Irsr/C MWC5w/lFG5cNccnLKmctQ2cNxUehBYK70t5sZwDUx4swqTExUPoHy2A9iy3VarqejmKm g7gw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bWHt8I0GnhNLIrwDNN2cgibn+LRWW8M1FtQe+XtpZsU=; b=d0sQQNieTtKXHY2QjdgR/llp9ZopQhUzmtqoBMZNJW1TJbgvESTtwLjEzwFRIzfPtp QdfNfEkG10otWDHh+UUNvZEMuB8X8e+F/735DIkctyiGU/FwEa3wRdytq34NPn+FYjZC sp2EfgEo5H/BAHct88zVLjbxSbVoXgjXJvEWxZdDixyfNQ1ITxsaKBTbxuIjySSav803 GfAoZhHPCbJ6Nh4ERKTrKacjZSw7su49fSzVqqJVx/C7FYWBDh6XZEIO+qwRUNg0unMT k1Ert+Jihf9PcpVibRoc9v61d8PXQLDsl1d3LCRfCEZGn6RrM+iiZUpr/SahvoPL6p9b xYyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U8letCoF; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 31si16287987pgt.316.2022.01.17.19.18.25; Mon, 17 Jan 2022 19:18:40 -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=@kernel.org header.s=k20201202 header.b=U8letCoF; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344024AbiARC2s (ORCPT + 99 others); Mon, 17 Jan 2022 21:28:48 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:40148 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343651AbiARC0g (ORCPT ); Mon, 17 Jan 2022 21:26:36 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 816EFB81249; Tue, 18 Jan 2022 02:26:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99EADC36AF6; Tue, 18 Jan 2022 02:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642472793; bh=WPTVkbAlftiPDcELrGcS+39e8k3c46GZhJ5lqBJBBQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U8letCoFF8X+NbnjxC7DRbpvmvrHosTc15zC79BxbHhUl9r7ALPihPl1WRIwyNity MTH224Bu3M26T1KeuDkI2/ZK9tdVGnyf8WDdhASjUOmtabyHOTRZrjb2Ltd9NflGxZ 9c4003doSPggbZQ5au44nOOU+U0MMuZMiDdzxlDToNvjnZwfbWmcqXMT1STERfa7YJ uIaSRUyYyg8K9J4B8/WDhcH8eh63XqVlTeFenukRsiR81xUfsbMbJIha5ebfTrnGT4 6BgbdnRqtYGI9uKqyYlDaSJrlgbHDPgK5Y7MXc0R3JyUlL/rihP20/y5C+kkz85Aji glXxJcaGXDolw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sean Young , Mauro Carvalho Chehab , Sasha Levin , mchehab@kernel.org, linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 5.16 134/217] media: igorplugusb: receiver overflow should be reported Date: Mon, 17 Jan 2022 21:18:17 -0500 Message-Id: <20220118021940.1942199-134-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220118021940.1942199-1-sashal@kernel.org> References: <20220118021940.1942199-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 effaa5751d6c9..3e9988ee785f0 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] * 85; -- 2.34.1