Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: AMD64 and DVB



Yay, just came home from work and everything is working 8)

Thank you very much for your help
/max

P.S. if you need someone to test some stuff on amd64, just give me a
call :)

Am Fr, den 20.02.2004 schrieb Johannes Stezenbach um 13:51:
> Max Nickel wrote:
> > 
> > It looks like that the bug i'm experiencing is caused by saa7146_core.c's 
> > saa7146_wait_for_debi_done function.
> ...
> > dvb_ttpci: load_dram(): Writing DRAM block 72
> > saa7146: saa7146_wait_for_debi_done(): timed out while waiting for transfer completion
> 
> Yikes! You're right, there's a grave bug. Try the patch below.
> 
> BTW, it's the same kind of bug that Gerd Knorr fixed for
> the saa7146 i2c stuff to make his budget card work on AMD64,
> so I though Michael would have fixed all of them...
> 
> 
> Index: drivers/media/common/saa7146_core.c
> ===================================================================
> RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/common/saa7146_core.c,v
> retrieving revision 1.49
> diff -u -p -r1.49 saa7146_core.c
> --- drivers/media/common/saa7146_core.c	3 Jan 2004 22:33:16 -0000	1.49
> +++ drivers/media/common/saa7146_core.c	20 Feb 2004 12:46:22 -0000
> @@ -69,14 +69,14 @@ void saa7146_set_gpio(struct saa7146_dev
>  /* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */
>  int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
>  {
> -	int start;
> +	unsigned long start;
>  
>  	/* wait for registers to be programmed */
>  	start = jiffies;
>  	while (1) {
>                  if (saa7146_read(dev, MC2) & 2)
>                          break;
> -		if (jiffies-start > HZ/20) {
> +		if (time_after(jiffies, start + HZ/20)) {
>  			DEB_S(("timed out while waiting for registers getting programmed\n"));
>  			return -ETIMEDOUT;
>  		}
> @@ -88,7 +88,7 @@ int saa7146_wait_for_debi_done(struct sa
>  		if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S))
>  			break;
>  		saa7146_read(dev, MC2);
> -		if (jiffies-start > HZ/4) {
> +		if (time_after(jiffies, start + HZ/4)) {
>  			DEB_S(("timed out while waiting for transfer completion\n"));
>  			return -ETIMEDOUT;
>  		}
> 
> Thanks for tracking this down.
> 
> Johannes
> 



-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index