Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3054042pxb; Mon, 18 Apr 2022 14:38:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3fUFmKYvMhz1TRQGv8BY7nr5Om9xNl3quQHVbcHpZmR2nawvD0eEIPd5Fxw7VcVER7sEG X-Received: by 2002:a17:903:213:b0:156:7efe:4783 with SMTP id r19-20020a170903021300b001567efe4783mr12911152plh.126.1650317891753; Mon, 18 Apr 2022 14:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650317891; cv=none; d=google.com; s=arc-20160816; b=xyfdmJFl6AtH0ZChT4b9GfU5byW0ysiDWEi83F9x9ypPVP9RvyjpnY1HtBjGvpz2YB rE9OzA1qD4AeZhLUSGrv+n5OLGk5kpXSMJQ+WXkn+aIiXoHM4Ld4M1a1IOT20szx4V0W BCmE3D7YqPbOiKacIjxNedwYaMt4RSmxdYQLq5JJHW/evi7Zo/q5iTJFFbkWacaqIapJ rzCFtOCraNX5M0+DXw0lz8v2AkxhR+827erZxwPWdm6v5QEtgiG/CeeJ7bUkWeO3bUwL RKUBs+Fk8eiQXs8168a8yqGJFsgMQwGNjuuzYbWKs2yQlYrTNfIOiNlR1ta7hrod+FaG LscQ== 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=AEIGJCHcu8PSDxpGz0LvI2Qm7kXdoHFb7+SzECAe7ac=; b=WDSdMZ60zmB/KFToDFDXvTyt3Myip62/rwL3ZHl4VXojbFJzKqkOEpWNFEXxpj/MtH u6d1/PxpRsJU5oi5+oDigfIJZ/RmhR/0ptk/g9OGXEzm0NVJs9kC/mPy97ys+0mDuYKg nUPXY9NssB15QmqEogAjn3Q/IJWcOMVVljkP0O4ml8wPU09U1susaDG68Cl6iXvjOubL ViG49A06V383qWJDHgRDJenIiPmCWGLcj2tzxCqKNtQFiF/UL4+7L8qFdGpl1Ri7nttV /4zx1aXE+aX9PYhqf2Z2qBiZQjPS/PKsj2zSTTTIRpnQd8Y8JvfR8Fe8K4qkTq5xlyEG gXUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="a5s50/rt"; 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 b1-20020a056a00114100b004fa3a8e005dsi9733119pfm.276.2022.04.18.14.37.56; Mon, 18 Apr 2022 14:38:11 -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="a5s50/rt"; 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 S242681AbiDRN7J (ORCPT + 99 others); Mon, 18 Apr 2022 09:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242045AbiDRNgB (ORCPT ); Mon, 18 Apr 2022 09:36:01 -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 A581B24F00; Mon, 18 Apr 2022 05:58:11 -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 BA42A612D0; Mon, 18 Apr 2022 12:58:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9E75C385A1; Mon, 18 Apr 2022 12:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286690; bh=3oTTFOn4x8U2QCSUJl8IaTqxzpbx4bG6EGPFTDb8hoA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a5s50/rtmHq1o5Sur/PJWIN/zJsXtOs3OSz6gfzbZ+TLvlNPBPMP3yQNyt0WFTviS 3aME7xlB4GlYyXer1tba01Ifz7dHPWaN+agvYH9MZhI3YrmnJbY53HxqsQIBQm0wqd mKY2BzlxYIVujJg/oTW+XEixwB/jQikC4/OFI0QE= 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 4.14 174/284] media: cx88-mpeg: clear interrupt status register before streaming video Date: Mon, 18 Apr 2022 14:12:35 +0200 Message-Id: <20220418121216.689136716@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@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.7 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 52ff00ebd4bd..281eca525340 100644 --- a/drivers/media/pci/cx88/cx88-mpeg.c +++ b/drivers/media/pci/cx88/cx88-mpeg.c @@ -171,6 +171,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