From: "Subbu K. K." <kksubramaniam@novell.com>
To: Gerd Knorr <kraxel@bytesex.org>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: Fix for "MT2032 Fatal Error: PLLs didn't lock"
Date: Thu, 27 Nov 2003 12:56:39 +0530 [thread overview]
Message-ID: <1069917999.1914.85.camel@dog.blr.novell.com> (raw)
In-Reply-To: <1069743507.1270.2.camel@dog.blr.novell.com>
On Tue, 2003-11-25 at 12:28, Subbu K. K. wrote:
> Let me poke around in the assembly code tonight to find out why the sign
> change happens on my box. I suspect this could be due to gcc/athlon
> combo.
>
ok. Found the error.
bttv-0.7.103 and earlier (kernel 2.4.20 and earlier) had the following
lines in two places:
mt2032_set_if_freq(c,freq* 1000*1000/16, ...
When freq is defined as int, this computation causes a sign extension
error when freq is 2244 (140.25MHz). The error disappears if
1000*1000/16 is replaced with 62500 and/or if freq is defined as
unsigned int.
Here is a simple test to surface this error:
// test with gcc -o signext signext.c && ./signext
main(int argc, char *argv[])
{
int s; unsigned f;
s = 2244; f = s;
printf("freq=%d rfin=%d\n", s*62500, s*1000*1000/16);
printf("freq=%d rfin=%d\n", f*62500, f*1000*1000/16);
}
the output shows:
freq=14025000 rfin=-128185456
freq=14025000 rfin=140250000
bttv-0.7.104+ and kernel 2.4.21+ have the fix. Still, I thought of
recording the error for those still on older kernels.
Subbu K. K.
next prev parent reply other threads:[~2003-11-27 7:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20031124004835.3abbb4cf.akpm@osdl.org>
2003-11-24 11:46 ` Gerd Knorr
2003-11-25 6:58 ` Subbu K. K.
2003-11-25 8:50 ` Gerd Knorr
2003-11-27 7:26 ` Subbu K. K. [this message]
2003-11-24 8:01 Subbu K. K.
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=1069917999.1914.85.camel@dog.blr.novell.com \
--to=kksubramaniam@novell.com \
--cc=akpm@osdl.org \
--cc=kraxel@bytesex.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®