[ltp] IR (SIR) success!

Thomas Hood linux-thinkpad@www.bm-soft.com
Mon, 26 Feb 2001 22:24:02 +0000 (GMT)


--- Tom Grydeland <Tom.Grydeland@phys.uit.no> wrote: 
> And finally, the spring of 1999, I got this *excellent* laptop, the IBM
> ThinkPad 600E (PII/300, 128 MB/6.4 GB, 1024x768 @ 8 bpp).  And, I have
> to add, this is the best machine of them all.  I really love the stick
> mouse (and 3 buttons!), the great keyboard and the handy form factor.

Yep, the TP600s are nice.

> Very well, but can I determine whether the chip is in 'legacy' or 'PnP'
> mode?  I usually don't compile my kernels with PnP support, but maybe
> that doesn't make any difference?

The chip is always in PnP mode by the time Linux boots (SFAIK).
The findchip utility has it wrong.  (findchip -dv is more 
verbose and claims explicitly that the chip is in legacy mode,
which it certainly is not.)

Warning.  Since I started playing with nsc-ircc my machine has
been locking up.  I've had to reboot twice using the magic
sysrq key.

Since I last wrote I have taken a look at 
/usr/src/linux-2.4.2/drivers/net/irda/nsc-ircc.c .
The chip probing code is really brain dead.  It reads
a series of addresses and if it gets back anything other
than 0xff it thinks it has found a natsemi pc87338.
The code is "finding" a pc87338 at a spurious address.
Here's a quick fix:

jdthood@thanatos:/usr/src/linux-2.4.2/drivers/net/irda$ diff -Naur
nsc-ircc.c_2.4.2 nsc-ircc.c
--- nsc-ircc.c_2.4.2	Tue Feb 13 16:15:05 2001
+++ nsc-ircc.c	Mon Feb 26 17:17:02 2001
@@ -90,7 +90,7 @@
 static nsc_chip_t chips[] = {
 	{ "PC87108", { 0x150, 0x398, 0xea }, 0x05, 0x10, 0xf0, 
 	  nsc_ircc_probe_108, nsc_ircc_init_108 },
-	{ "PC87338", { 0x398, 0x15c, 0x2e }, 0x08, 0xb0, 0xf0, 
+	{ "PC87338", { 0x2e, 0x398, 0x15c }, 0x08, 0xb0, 0xf0, 
 	  nsc_ircc_probe_338, nsc_ircc_init_338 },
 	{ NULL }
 };

This will make the driver probe address 0x2e first.  Try it and
see if this fixes the problem for you.

It would be nice if I could see the debugging output from this
module, but in my case the module loader can't resolve the
ircc_debug variable.  There is a bug in the Makefiles somewhere.

Thomas


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html