[ltp] Re: [Linux-IrDA] [PATCH] nsc-ircc

Thomas Hood linux-thinkpad@www.bm-soft.com
Tue, 27 Feb 2001 23:48:29 +0000 (GMT)


Dag Brattli wrote:
> > > -     pnp = (reg >> 4) & 0x01;
> > > +     pnp = (reg >> 3) & 0x01;
> > 
> > An important change.  The pnp flag is bit 3, not bit 4.
> > See datasheet.
> 
>       Re-Ouch !
>       What's the impact ?

With the bug, the driver thinks that the chip is in legacy
mode and so talks to the wrong set of registers to, e.g.,
set the base io address.  (On ThinkPads, at least, the
chip is always in PnP mode by the time Linux boots.)

Tom Grydeland wrote: 
> The patch applied cleanly to a 2.2.x kernel but it would not compile
> cleanly -- I had to remove this piece of it to get it to compile:
> -       ret = check_region(self->io.fir_base, self->io.fir_ext);
> -       if (ret < 0) { 
> -               WARNING(__FUNCTION__ "(), can't get iobase of 0x%03x\n",
> +       ret = request_region(self->io.fir_base, self->io.fir_ext,
> driver_name);
> +       if (ret == NULL) { 
> +               WARNING(__FUNCTION__ "(), Request for io region at 0x%03x was
> refused\n",

This is indeed appropriate only for 2.4 kernels.

>   Feb 27 04:52:06 ska kernel: nsc-ircc, Request for irq 4 was refused 
> I'm not sure I believe the 'Request for irq 4 was refused' message --
> IRQ 4 was registered as in use by irda at this point.

This message is bad news.  It means that two modules are
fighting over the same irq.  No surprise your machine 
locked up.  My patch didn't address this problem at all.

You say that irq 4 was registered to the "irda" driver?
You're sure it wasn't registered to the serial driver?

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