From patchwork Mon Jan 13 11:02:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 3474521 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EB648C02DC for ; Mon, 13 Jan 2014 11:02:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A37C120107 for ; Mon, 13 Jan 2014 11:02:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C710F200FE for ; Mon, 13 Jan 2014 11:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751375AbaAMLCS (ORCPT ); Mon, 13 Jan 2014 06:02:18 -0500 Received: from mailout3.w2.samsung.com ([211.189.100.13]:8417 "EHLO usmailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751355AbaAMLCR (ORCPT ); Mon, 13 Jan 2014 06:02:17 -0500 Received: from uscpsbgm1.samsung.com (u114.gpu85.samsung.co.kr [203.254.195.114]) by usmailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MZC007WT6NP0U00@usmailout3.samsung.com> for linux-media@vger.kernel.org; Mon, 13 Jan 2014 06:02:14 -0500 (EST) X-AuditID: cbfec372-b7fa96d000006a7b-cb-52d3c7b52052 Received: from ussync2.samsung.com ( [203.254.195.82]) by uscpsbgm1.samsung.com (USCPMTA) with SMTP id 5D.93.27259.5B7C3D25; Mon, 13 Jan 2014 06:02:13 -0500 (EST) Received: from localhost.localdomain ([105.144.34.7]) by ussync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MZC00DNJ6NM8810@ussync2.samsung.com>; Mon, 13 Jan 2014 06:02:13 -0500 (EST) Date: Mon, 13 Jan 2014 09:02:08 -0200 From: Mauro Carvalho Chehab To: Rich Freeman Cc: Greg Kroah-Hartman , LMML Subject: Re: Issue with 3.12.5/7 and CX23880/1/2/3 DVB Card Message-id: <20140113090208.0437013b@samsung.com> In-reply-to: References: X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.22; x86_64-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDLMWRmVeSWpSXmKPExsVy+t/hIN2txy8HGVyYYmHRvHg9m0XPhq2s Fpf37mR0YPa4/P0Ns8f+uWvYPT5vkgtgjuKySUnNySxLLdK3S+DKmHRiC1tBl0PF27NpDYwv jLsYOTkkBEwkGuadYoKwxSQu3FvP1sXIxSEksIRR4vfEdiYIp5tJoqP3HQtIFYuAqsTdw83M IDabgJHEq8YWVhBbREBZ4v6tKWA2s0CkxKYbbxlBbGEBa4m5k/4D1XNw8AoYStw6yAticgoE SzQvLQapEBIIkFj+bjFYhYSAk8TuA1IgYV4BQYkfk++xQAzUkti8rQlquLzE5jVvmScwCsxC UjYLSdksJGULGJlXMYqWFicXFCel5xrqFSfmFpfmpesl5+duYoSEaNEOxmcbrA4xCnAwKvHw 7hC6HCTEmlhWXJl7iFGCg1lJhLfwEFCINyWxsiq1KD++qDQntfgQIxMHp1QDYyxfYnvHnq4b Kivebgq1vyI381DbqeKl+i8VXt/d2JqQ8tZ1sYSXhnyUYqZg961qpVk5XdNvXk59aKUgs67J 5Ex4rdHuf0bnZ02/v/ut08y3y+LXyHgsFJnxbNVamZcmv2If/X/WMjO+WM1G6XCA0Vzhkwr3 xe1ez9vrsXJve+O/hUc/t5SxXVViKc5INNRiLipOBABEZL5LLwIAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Em Sun, 12 Jan 2014 16:26:41 -0500 Rich Freeman escreveu: > I noticed that you authored commit > 19496d61f3962fd6470b106b779eddcdbe823c9b, which replaced a dynamic > buffer with a static one when sending data to the card. > > This broke my ATI HD tuner, listed in lspci as: > 04:07.0 Multimedia video controller: Conexant Systems, Inc. > CX23880/1/2/3 PCI Video and Audio Decoder (rev 05) > 04:07.1 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 > PCI Video and Audio Decoder [Audio Port] (rev 05) > 04:07.2 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 > PCI Video and Audio Decoder [MPEG Port] (rev 05) > > (I'd have to rip the card out to actually get the model number - it > has been ages since I bought it.) > > The card fails to load firmware in 3.12.7 and will not record video. > It loads with a warning in 3.12.5, and recording works. > > The warnings in 3.12.5 are: > Dec 20 10:52:04 rich kernel: [ 31.747903] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747908] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747910] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747912] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747914] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747916] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747918] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747919] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747921] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747923] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747925] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747926] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747928] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747930] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747931] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747933] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747935] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747937] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747938] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747940] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747942] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747943] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747945] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747947] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747949] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747950] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747952] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747954] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747955] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747957] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747959] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747961] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747962] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747964] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747966] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747967] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747969] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! > Dec 20 10:52:04 rich kernel: [ 31.747971] nxt200x: > nxt200x_writebytes: i2c wr reg=002c: len=149 is too big! > Dec 20 10:52:04 rich kernel: [ 31.750080] nxt200x: nxt2004_init: > Firmware upload complete > > The error in 3.12.7 is: > Dec 19 17:35:21 rich kernel: [ 128.768232] nxt200x: Error writing > multireg register 0x08 > Dec 19 17:35:21 rich kernel: [ 128.771271] nxt200x: Error writing > multireg register 0x08 > Dec 19 17:35:21 rich kernel: [ 128.783125] nxt200x: Error writing > multireg register 0x80 > Dec 19 17:35:21 rich kernel: [ 128.788617] nxt200x: Error writing > multireg register 0x08 > Dec 19 17:35:21 rich kernel: [ 128.794113] nxt200x: Error writing > multireg register 0x08 > Dec 19 17:35:21 rich kernel: [ 128.799608] nxt200x: Error writing > multireg register 0x80 > Dec 19 17:35:21 rich kernel: [ 128.802640] nxt200x: Error writing > multireg register 0x81 > Dec 19 17:35:21 rich kernel: [ 128.806025] nxt200x: Error writing > multireg register 0x82 > Dec 19 17:35:21 rich kernel: [ 128.811516] nxt200x: Error writing > multireg register 0x88 > Dec 19 17:35:21 rich kernel: [ 128.817014] nxt200x: Error writing > multireg register 0x80 > Dec 19 17:35:21 rich kernel: [ 129.048443] nxt200x: Timeout waiting > for nxt2004 to init. > Dec 19 17:35:22 rich kernel: [ 129.770854] nxt200x: Timeout waiting > for nxt200x to stop. This is ok after firmware upload. > (this was a loop that overran my ring buffer, so I can't vouch for > which of those errors came first) > > This is using the kernel.org git kernel built from the tagged releases. > > I reverted your commit and the resulting 3.12.7 kernel worked fine, > initializing the card with no errors/warnings, and the card was able > to record video. > > Hopefully this is helpful in resolving the problem. If you need > additional info or would like me to test any patches let me know. If > this is best directed elsewhere, let me know. > > Rich Freeman Can you please try the following patch? Thanks! Mauro - nxt200x: increase write buffer size The buffer size on nxt200x is not enough: ... > Dec 20 10:52:04 rich kernel: [ 31.747949] nxt200x: nxt200x_writebytes: i2c wr reg=002c: len=255 is too big! ... Increase it to 256 bytes. Reported-by: Rich Freeman Signed-off-by: Mauro Carvalho Chehab diff --git a/drivers/media/dvb-frontends/nxt200x.c b/drivers/media/dvb-frontends/nxt200x.c index fbca9856313a..4bf057544607 100644 --- a/drivers/media/dvb-frontends/nxt200x.c +++ b/drivers/media/dvb-frontends/nxt200x.c @@ -40,7 +40,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* Max transfer size done by I2C transfer functions */ -#define MAX_XFER_SIZE 64 +#define MAX_XFER_SIZE 256 #define NXT2002_DEFAULT_FIRMWARE "dvb-fe-nxt2002.fw" #define NXT2004_DEFAULT_FIRMWARE "dvb-fe-nxt2004.fw"