Linux Media Controller development
 help / color / mirror / Atom feed
From: Patrick Boettcher <pboettcher@kernellabs.com>
To: Mario Bachmann <grafgrimm77@gmx.de>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: dibusb-common.c FE_HAS_LOCK problem
Date: Thu, 19 Nov 2009 16:37:18 +0100 (CET)	[thread overview]
Message-ID: <alpine.LRH.2.00.0911191630250.12734@pub2.ifh.de> (raw)
In-Reply-To: <20091107105614.7a51f2f5@x2.grafnetz>

On Sat, 7 Nov 2009, Mario Bachmann wrote:

> Hi there,
>
> I tried linux-2.6.31.5 and tuning still does not work:
> tuning to 738000000 Hz
> video pid 0x0131, audio pid 0x0132
> status 00 | signal 0000 | snr 0000 | ber 001fffff | unc 0000ffff |
> status 00 | signal 0000 | snr 0000 | ber 001fffff | unc 0000ffff |
> status 00 | signal 0000 | snr 0000 | ber 001fffff | unc 0000ffff |
> status 04 | signal 0000 | snr 0000 | ber 001fffff | unc 0000ffff |
>
> With some changes for the following file it works again:
> /usr/src/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
>
> diff -Naur dibusb-common.c-ORIGINAL dibusb-common.c
>
> --- dibusb-common.c-ORIGINAL	2009-11-07 10:30:43.705344308 +0100
> +++ dibusb-common.c	2009-11-07 10:33:49.969345253 +0100
> @@ -133,17 +133,14 @@
>
> 	for (i = 0; i < num; i++) {
> 		/* write/read request */
> -		if (i+1 < num && (msg[i].flags & I2C_M_RD) == 0
> -					  && (msg[i+1].flags & I2C_M_RD)) {
> +		if (i+1 < num && (msg[i+1].flags & I2C_M_RD)) {
> 			if (dibusb_i2c_msg(d, msg[i].addr, msg[i].buf,msg[i].len,
> 						msg[i+1].buf,msg[i+1].len) < 0)
> 				break;
> 			i++;
> -		} else if ((msg[i].flags & I2C_M_RD) == 0) {
> +		} else
> 			if (dibusb_i2c_msg(d, msg[i].addr, msg[i].buf,msg[i].len,NULL,0) < 0)
> 				break;
> -		} else
> -			break;
> 	}

Doing it is reverting a fix which avoids that uncontrolled i2c-access from 
userspace is destroying the USB-eeprom.

I understand that this is breaking the tuning for your board. I'm just not 
understanding why.

If you have some time to debug this issue, could you please try the 
following:

One of the devices for your board is trying to do an I2c access which is 
falling into the last 'else'-branch - can you add a printk to find out 
which one it is? The access must be wrongly constructed and must be fixed 
in that driver.

thanks,

PS: if you don't have time to do it, please tell so.

--

Patrick
http://www.kernellabs.com/

  reply	other threads:[~2009-11-19 15:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-07  9:56 dibusb-common.c FE_HAS_LOCK problem Mario Bachmann
2009-11-19 15:37 ` Patrick Boettcher [this message]
2009-11-21 17:25   ` grafgrimm77
2009-11-23  9:01     ` Patrick Boettcher
2009-11-23 11:03       ` Mario Bachmann
2009-11-23 11:11         ` Patrick Boettcher
2009-11-23 11:33           ` grafgrimm77
2009-11-23 12:24             ` Patrick Boettcher
2009-11-23 13:19               ` Patrick Boettcher
2009-11-23 13:41                 ` grafgrimm77

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=alpine.LRH.2.00.0911191630250.12734@pub2.ifh.de \
    --to=pboettcher@kernellabs.com \
    --cc=grafgrimm77@gmx.de \
    --cc=linux-media@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