Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp998586pxb; Wed, 6 Apr 2022 06:22:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyg1xbOcVLxlwzI7LskKriE9re3p13VIMLcAKrkYm3BDTCKq/bhqn6ucUJrZ3utCD5ClmZw X-Received: by 2002:a17:903:110c:b0:153:1293:5624 with SMTP id n12-20020a170903110c00b0015312935624mr8547822plh.149.1649251341204; Wed, 06 Apr 2022 06:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649251341; cv=none; d=google.com; s=arc-20160816; b=HiUF2tNxtxxdqkgiThL8Ygi4iMekjC+d0l6rsxi7xQ4uoAAU/s5UkaUhlRG9yJG4VV E5SNsnIUaJsNlqtkZDj8RzSF/+9YBDxK1cYLH7CWpRNScE8P3AEHshw5GAC7D/Zq5/Ky NvXfT7e0v1+nNZwPCowqAJha3Ci6i+ObL7d3yzlUrDaXZa6QD0hYjovcYiKrrBPN+ik8 nG/eQE97Eh3h57Qs9jhiEbLp6rh6XPDUsSrdAUXd0lrKgfejklJRyOuVoVMl7qV/zcPd nAq23AKBcO8hnjhAr4ZTyamjNJ+rq2abEZ/sG3fWmLM9QxV3YMDxv0+06DzvCtcloDDf MbqQ== 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=N5EW5oj2B7fUzXH1eiDRPxxgLm8d33KgGfHgl7r3ENOlaHkhTp1Ll8RY8R6KyPbcq5 HbaLD4tF9+4Lb2FJvkFpvnAqwiE2Fz2KOC1WSHnsqbly7eSG/oQxRL4dd2D0x1c2mNQZ 3NPlDBjST/TOcX3Zbya+Usvt9O1G/s7GzZCbfoNEx7vRUAHXrnB6G+5VBzwmCY9O/qeS HNnBAedpe8+BXRIfBhDKF/jQvV4slhJ8zEL2+XENPgo0ID6HoR4fDKBiG+rUU1abB7pw Bt5Z6A+lR1fOnxtE/oeWCNDpZJkr1e8POkEm4M/Nr41JIwCP8+5Ju641xAjRxU9chVW+ fAcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a2d7qWGL; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id l189-20020a633ec6000000b003980aecb0d8si15685934pga.556.2022.04.06.06.22.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:22:21 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a2d7qWGL; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9478E6C8C5F; Wed, 6 Apr 2022 04:03:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235119AbiDEVdh (ORCPT + 99 others); Tue, 5 Apr 2022 17:33:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352216AbiDEKEF (ORCPT ); Tue, 5 Apr 2022 06:04:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BAB1AC938; Tue, 5 Apr 2022 02:52:58 -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 DE4CFB81B76; Tue, 5 Apr 2022 09:52:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E206C385A2; Tue, 5 Apr 2022 09:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152375; bh=BS9+xBaILP2NTve/YGTy5aoxWamiPKm3xneZ2z7LGuc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a2d7qWGL2njJwFsNLB2twJNCNGjZUWHXVN1dKJP7ssKay8Zoev9kaRNtEU6zBPxq6 89plCkKZXx4N+XxRc99zlsu60nzBVBqvHgF7nBjz4LU1pTxT7u3VG6mHfIDTP+j69r rb6SNox7KkfLKlB/HS+ZHV6afl8YzlVCyRHbzQoA= 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.15 755/913] media: cx88-mpeg: clear interrupt status register before streaming video Date: Tue, 5 Apr 2022 09:30:17 +0200 Message-Id: <20220405070402.464405716@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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