From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
mm-commits@vger.kernel.org, Antti Palosaari <crope@iki.fi>,
Greg KH <gregkh@suse.de>, USB list <linux-usb@vger.kernel.org>
Subject: Re: DVB: af9015 defunct [was: mmotm 2010-10-20-15-01 uploaded]
Date: Fri, 22 Oct 2010 11:56:20 -0200 [thread overview]
Message-ID: <4CC19804.1080109@redhat.com> (raw)
In-Reply-To: <4CC1577F.9060207@gmail.com>
Em 22-10-2010 07:21, Jiri Slaby escreveu:
> On 10/21/2010 07:51 PM, Jiri Slaby wrote:
>> On 10/21/2010 12:01 AM, akpm@linux-foundation.org wrote:
>>> The mm-of-the-moment snapshot 2010-10-20-15-01 has been uploaded to
>>
>> Well, this release happens to be a multimedia failure :(.
>>
>> I hit another regression against mmotm 2010-10-13-17-13, where
>> 0413:6029 (DVB USB tuner) can't be inited when plugged in. Even lsusb
>> waits inifitely.
>
> Revert of this commit helps:
Ah, the problem is here (drivers/media/dvb/dvb-usb/af9015.c):
static struct tda18271_config af9015_tda18271_config = {
.gate = TDA18271_GATE_DIGITAL,
.small_i2c = 1,
};
small_i2c is an enum, currently defined as:
enum tda18271_small_i2c {
TDA18271_39_BYTE_CHUNK_INIT = 0,
TDA18271_16_BYTE_CHUNK_INIT = 16,
TDA18271_08_BYTE_CHUNK_INIT = 8,
TDA18271_03_BYTE_CHUNK_INIT = 3,
};
The value is just a magic number, but having it associated with the max
I2C size makes more sense than a random value.
The value, before the patch was:
enum tda18271_small_i2c {
TDA18271_39_BYTE_CHUNK_INIT = 0,
TDA18271_16_BYTE_CHUNK_INIT = 1,
TDA18271_08_BYTE_CHUNK_INIT = 2,
};
So, it seems that the max I2C size for af9015 is 16 bytes. The proper init
should be:
.small_i2c = TDA18271_16_BYTE_CHUNK_INIT;
Please check if the enclosed patch fixes the issue.
Thanks,
Mauro
---
[media] af9015: Properly initialize tda18271.small_i2c
As reported by Jiri, a regression at mm series is happening on af9015:
tda18271 18-00c0: creating new instance
TDA18271HD/C2 detected @ 18-00c0
af9015: command failed:1
tda18271_write_regs: [18-00c0|M] ERROR: idx = 0x0, len = 39,
i2c_transfer returned: -1
af9015: command failed:1
The cause is that tda18271.small_i2c is an enum. Drivers should use the value
alias, instead of its number, as the "magic" number may change anytime.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c
index 759cbf8..f5e4066 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -1144,7 +1144,7 @@ static struct qt1010_config af9015_qt1010_config = {
static struct tda18271_config af9015_tda18271_config = {
.gate = TDA18271_GATE_DIGITAL,
- .small_i2c = 1,
+ .small_i2c = TDA18271_16_BYTE_CHUNK_INIT;,
};
static struct mxl5005s_config af9015_mxl5003_config = {
next prev parent reply other threads:[~2010-10-22 13:56 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 22:01 mmotm 2010-10-20-15-01 uploaded akpm
2010-10-21 2:54 ` Li Zefan
2010-10-21 3:15 ` Li Zefan
2010-10-21 3:38 ` Konrad Rzeszutek Wilk
2010-10-21 3:44 ` Li Zefan
2010-10-21 14:28 ` Konrad Rzeszutek Wilk
2010-10-21 3:46 ` Andrew Morton
2010-10-21 7:17 ` Peter Zijlstra
2010-10-21 7:30 ` Andrew Morton
2010-10-21 9:52 ` Peter Zijlstra
2010-10-21 9:54 ` Peter Zijlstra
2010-10-21 7:41 ` HDA: no sound [was: mmotm 2010-10-20-15-01 uploaded] Jiri Slaby
2010-10-21 7:49 ` Takashi Iwai
2010-10-21 7:57 ` Jiri Slaby
2010-10-21 8:05 ` Takashi Iwai
2010-10-21 18:27 ` Jiri Slaby
2010-10-21 19:20 ` Takashi Iwai
2010-10-21 19:21 ` Jiri Slaby
2010-10-21 19:22 ` Takashi Iwai
2010-10-21 19:40 ` Takashi Iwai
2010-10-21 20:29 ` Valdis.Kletnieks
2010-10-21 20:48 ` Takashi Iwai
2010-10-21 21:24 ` Valdis.Kletnieks
2010-10-21 21:31 ` Takashi Iwai
2010-10-21 21:42 ` Jiri Slaby
2010-10-22 8:46 ` Colin Guthrie
2010-10-22 9:02 ` Takashi Iwai
2010-10-22 9:18 ` Jiri Slaby
2010-10-22 9:40 ` Takashi Iwai
2010-10-22 9:45 ` Jiri Slaby
2010-10-22 10:26 ` Takashi Iwai
2010-10-22 11:10 ` Jiri Slaby
2010-10-22 9:41 ` Colin Guthrie
2010-10-22 11:31 ` [alsa-devel] " Clemens Ladisch
2010-10-22 11:51 ` Jiri Slaby
2010-10-22 14:03 ` Takashi Iwai
2010-10-22 19:53 ` Colin Guthrie
2010-10-21 15:22 ` Valdis.Kletnieks
2010-10-21 17:59 ` Jiri Slaby
2010-10-21 11:10 ` mmotm 2010-10-20-15-01 uploaded Zimny Lech
2010-10-21 11:14 ` mmotm 2010-10-20 - netfilter Kconfig whinge Valdis.Kletnieks
2010-10-29 19:11 ` Patrick McHardy
2010-10-21 17:51 ` DVB: af9015 defunct [was: mmotm 2010-10-20-15-01 uploaded] Jiri Slaby
2010-10-21 22:24 ` Jiri Slaby
2010-10-22 9:21 ` Jiri Slaby
2010-10-22 13:56 ` Mauro Carvalho Chehab [this message]
2010-10-22 14:06 ` Jiri Slaby
2010-10-27 16:12 ` Mauro Carvalho Chehab
2010-10-27 16:36 ` Jiri Slaby
2010-10-27 17:05 ` Mauro Carvalho Chehab
2010-10-27 16:41 ` Antti Palosaari
2010-10-27 17:11 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CC19804.1080109@redhat.com \
--to=mchehab@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=crope@iki.fi \
--cc=gregkh@suse.de \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox