Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp695504pxb; Tue, 5 Apr 2022 19:08:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkWils8FvDqQJwVRwer+71y1iT/uQPiPfVpmAfjTwdKwosVsJoPqlK/iNZMRTLu8J+DbPj X-Received: by 2002:a05:6402:3549:b0:419:343c:521 with SMTP id f9-20020a056402354900b00419343c0521mr6391314edd.85.1649210885895; Tue, 05 Apr 2022 19:08:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649210885; cv=none; d=google.com; s=arc-20160816; b=vhai0YK62JPHHuRHFALG/ie/esNSQHMDZBWrwO+2djo7LrNapceBTgWF5XBntdrB+T D/cJV/dj0dJYRooRG8ebp1qsD4aBtemEIodW2wZUvGmAH9Wha62gwjOtUJrmwvMooLsE 7NLPfbYVniErl3XSxObK8xvMPmb+teHw4wtK4VD0DRBe15wFIzEYa8QP8QLFAceeGQFm qw+prZZxYOnehj7lvWhzJZ3/5dpIo/rM/PJUBnc/k1S6JvlLvSNmfceMAASY2mSTBf4j ckhgs8NJKVGLywQFUi+C6asvOaAqlQdrzKelUR6gXEaMDeXMqvG4o39khjTk0I0ZOQvD 29Ag== 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=ykYNcJeekFSLpNkkkRQHK/92oqngpglhD8nPq/ml16Q=; b=scwTDzQ1QWwRUJ/x2SYb63xpiGxlBJz7jTUj82OJjSnppUXcTuq79eK31pPwvLc/Uz vonaQIuMbCSaGd12b2tZPTkuUeJ5ABa9CeYHVFeOV28osry71DipVCjGZQBeZsjfeycp XN40ZLcUYV4sTNFDRcZEECH9+nIHJEZuB9J8bPjvvAjQSdRuLlFWoJvmBRK5C7e4dlIF Hupshy7KSYiGsGRkCYjZEqf3o6llyyC6Qp7SxJNlIPIZm6USgTvXW/GrQZlr2s3PdNwI XbriSUuI1P7F6SaHjQlkhKltmQzzamPzReUgf/biMSWCAp0ATdP+Hmb+I83Bzgkq+m+m OtfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Iqr6Wy0x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r2-20020aa7da02000000b00418e8ed6aacsi10682990eds.481.2022.04.05.19.07.36; Tue, 05 Apr 2022 19:08:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Iqr6Wy0x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S241568AbiDELJa (ORCPT + 99 others); Tue, 5 Apr 2022 07:09:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238677AbiDEIar (ORCPT ); Tue, 5 Apr 2022 04:30:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 832813298E; Tue, 5 Apr 2022 01:22:37 -0700 (PDT) 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 32B4BB81B92; Tue, 5 Apr 2022 08:22:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CAD8C385A0; Tue, 5 Apr 2022 08:22:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146954; bh=BS9+xBaILP2NTve/YGTy5aoxWamiPKm3xneZ2z7LGuc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Iqr6Wy0xeQpbO836nrDAtRh7Poh0PoIgD2Aed1UBtAGui+6cpcxieD5k232JqacGJ wnYHjPq2IMnlWIzHvX66NcgIvwGM1NR8LJVnlsbYYd5mxxSaxW3/b+cloelmODUeAb 9evwFFS7BmTiYb04rSCAUr43xJS3dKUM5IW3n+2w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= , Sasha Levin Subject: [PATCH 5.17 0922/1126] media: cx88-mpeg: clear interrupt status register before streaming video Date: Tue, 5 Apr 2022 09:27:49 +0200 Message-Id: <20220405070434.582365145@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel González Cabanelas [ Upstream commit 56cb61f70e547e1b0cdfe6ff5a1f1ce6242e6d96 ] Some cx88 video cards may have transport stream status interrupts set to 1 from cold start, causing errors like this: cx88xx: cx88_print_irqbits: core:irq mpeg [0x100000] ts_err?* cx8802: cx8802_mpeg_irq: mpeg:general errors: 0x00100000 According to CX2388x datasheet, the interrupt status register should be cleared before enabling IRQs to stream video. Fix it by clearing the Transport Stream Interrupt Status register. Signed-off-by: Daniel González Cabanelas Signed-off-by: Sasha Levin --- drivers/media/pci/cx88/cx88-mpeg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c index 680e1e3fe89b..2c1d5137ac47 100644 --- a/drivers/media/pci/cx88/cx88-mpeg.c +++ b/drivers/media/pci/cx88/cx88-mpeg.c @@ -162,6 +162,9 @@ int cx8802_start_dma(struct cx8802_dev *dev, cx_write(MO_TS_GPCNTRL, GP_COUNT_CONTROL_RESET); q->count = 0; + /* clear interrupt status register */ + cx_write(MO_TS_INTSTAT, 0x1f1111); + /* enable irqs */ dprintk(1, "setting the interrupt mask\n"); cx_set(MO_PCI_INTMSK, core->pci_irqmask | PCI_INT_TSINT); -- 2.34.1