Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp632591pxb; Tue, 5 Apr 2022 16:39:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3OyuEqAW/TWhDGGdV78Drd7jTEW8f8DRtFH7QDwaMXPuA+LhIyzcP1224NT8CFlCLLQgO X-Received: by 2002:a63:250:0:b0:386:4fd7:432b with SMTP id 77-20020a630250000000b003864fd7432bmr4842847pgc.26.1649201949989; Tue, 05 Apr 2022 16:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649201949; cv=none; d=google.com; s=arc-20160816; b=LKCG7rXxXpF9YB1MnFBszSpKnUYZ8NneHCpF8A0sp8hBwrfreM8F0Nz3nHGOqRj1aC 4g1tFcU+pyDpcwhPF8sqeBs3RIOjF/4amb+ZhqafXLVBgepuaTwcLkcIW19PMSMCMySb IAlXXeaL54bcDwr5IXU1eiWQaIRh3lqsXb+jD8HN53SLHUNlQsuFgMpOzdER7eOfxm+t 7mq4YcJu9y0dDWN7Klz+v3sdaniL84B9zxJ1Uv0l5KTNj6JuEIlvZifUwmbKrM//gbWU IKFYcO/CdVUVXWPLQkMjEMv84UPkwkKf20x0EO9eFJUFb4m6ZIevSTFnhyhqbTZIKy8l tZ5g== 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=ZJ8L5FsBJbLA9OR2zytRZ3T67qROLHLNSvKxIxPHup0+y8SvX+Yr8JUHfQtL/KVCQb VJB5SaRS1Qu6WgUF9owAJQE9+uuX9fe8HA7WhmFDxJKYrMzXap0i/cAAXu8uilgUzcz4 ay7Q74jIzgM9ENTqFmHJKqRSWCrFV16IZ2OXI4VB+eNQpmlB+isGAUqCaz25XjdPbueB vNclFYkgrh3FHXyoGdxz+d3N3P59kCi0MrCVaeopyUXBrZWu0oYYupnULAy/Cgc4i/pT VFdCRbqBKk4aPirW0yK+Zai9Lah4BM4HFSgotYPBnq4LhhGBfpQ16mnkTStwr3oPUMdb mRrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oV6OPfcM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a31-20020a634d1f000000b003816043f10bsi6666553pgb.768.2022.04.05.16.39.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:39:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oV6OPfcM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8E69F1BE104; Tue, 5 Apr 2022 16:23:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379794AbiDEN3r (ORCPT + 99 others); Tue, 5 Apr 2022 09:29:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345312AbiDEJWZ (ORCPT ); Tue, 5 Apr 2022 05:22:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 136252AE00; Tue, 5 Apr 2022 02:10:22 -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 dfw.source.kernel.org (Postfix) with ESMTPS id A6EC361527; Tue, 5 Apr 2022 09:10:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0648C385A2; Tue, 5 Apr 2022 09:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149821; bh=BS9+xBaILP2NTve/YGTy5aoxWamiPKm3xneZ2z7LGuc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oV6OPfcMbWKXZZvcL+wPwe0gvLdyrKJ4HqdoSukuUr6Uqo3PUGYwsEnlolbx57R6G 40flP+Sp5hV+kupJvCNnc+WeT/4n0+ttB8gspgWzUmOI2w+cfBB/atdlGA0nQYt8oe dV8M5cSCHdbxw9LY3cmb14lNMkfivRvuDGyN1KK4= 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.16 0836/1017] media: cx88-mpeg: clear interrupt status register before streaming video Date: Tue, 5 Apr 2022 09:29:09 +0200 Message-Id: <20220405070419.057876762@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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