[linux-dvb] Re: [PATCH] MSI Megasky 580 GL861 i2c timeout fix

Jonas Larsson linuxdvb at larsson.eu.com
Wed Feb 14 19:35:47 CET 2007


I've tested your patch (in v4l-dvb repository). It worked fine, once I
increased the delay to 15us. I refined the patch a bit to be able to set
the access gap time with a module parameter.

System specs:
CPU: AMD 4200+ X2 CPU
Motherboard: Asus M2NPV-VM
Memory: 1G DDR2 PC6400 CL5 Dual-Channel

/ Jonas

Antti Palosaari wrote:
> heissan
> attached patch adds a little delay before usb-control message sending to
> avoid i2c timeouts (unwanted message log errors) seen many people.
> 
> Looks like gl861 usb-controller messes up and stops responding if i2c
> messages are send too fast. This happens especially with faster
> computers. First I tried to change usb_control_msg timeout from 2000 to
> 4000 but it didn't help.
> 
> This bug is mentioned (at least) following mails:
> http://linuxtv.org/pipermail/linux-dvb/2007-February/015863.html
> http://linuxtv.org/pipermail/linux-dvb/2007-January/015458.html
> 
> Jonas Larsson and gingis could you test and report if it works. If still
> timeouts after the patch then try to add more delay [udelay(10)].
> 
> Signed-off-by: Antti Palosaari <crope at iki.fi>
> 
> 
> ------------------------------------------------------------------------
> 
> diff -r 580ad59c8bb5 linux/drivers/media/dvb/dvb-usb/gl861.c
> --- a/linux/drivers/media/dvb/dvb-usb/gl861.c	Tue Feb 13 16:26:26 2007 -0500
> +++ b/linux/drivers/media/dvb/dvb-usb/gl861.c	Wed Feb 14 00:28:13 2007 +0200
> @@ -44,6 +44,8 @@ static int gl861_i2c_msg(struct dvb_usb_
>  		warn("wlen = %x, aborting.", wlen);
>  		return -EINVAL;
>  	}
> +
> +	udelay(10); /* avoid usb i2c timeouts */
>  
>  	return usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), req, type,
>  			       value, index, rbuf, rlen, 2000);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: megasky-g861.patch
Type: text/x-diff
Size: 1013 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20070214/b6fe24ef/megasky-g861-0001.bin


More information about the linux-dvb mailing list