[ltp] Serial/PCMCIA problems with TP600E

Tom Grydeland linux-thinkpad@www.bm-soft.com
Fri, 16 Feb 2001 16:54:57 +0100 (MET)


On Fri, 16 Feb 2001, Thomas Hood wrote:

Okay, this was a flurry of messages, I'll try to summarise a bit :-)

> --- Tom Grydeland <Tom.Grydeland@phys.uit.no> wrote: 
> > Now that drivers are available, I would like to be able to use all of
> > the following (although not at the same time, I want to switch between
> > them without rebooting):
> >     * The built-in serial port
> >     * The IR port
> >     * The built-in modem
> > I'm not asking too much, am I?
> 
> No, all of these should work under Linux.  I have used both
> the serial port and the IR port, though not at the same time.
> If you don't need to use them both at the same time, I would
> recommend enabling only one of them at a time.  Then you can
> use the same ioports and irq for both.

Yes, that sounds reasonable.

> > Serial-A (built-in serial port): enabled COM1
> >     I/O:	0x3f8
> >     IRQ:	4
> > IR: enabled
> >     ADD:	<empty>
> 
>   Hmm I wonder what "ADD" means.  I forget.

 [later]

> Okay, I just checked.  On my system PS2.EXE does not allow
> you to set IR ioports and irqs independently, but invites you
> to select an "ADDress" from 1 to 4 corresponding to DOS
> COM ports COM1 through COM4.  COM1 is 0x3f8 irq4, 
> COM2 at 0x2f8 irq3, COM3 at 0x3e8 irq4, COM4 at 0x2e8 irq3.
> This means that using PS2.EXE you can only set the IR
> device to use irq3 or irq4.  Is the output you give above
> actually from PS2.EXE?  If so then your version of the
> program is different from mine.  Perhaps the 600E is
> different from the 600 in this respect.

This is not *output* from PS2.EXE, but it is transcribed from this
output.  For the IR-port, the allowable interrupts were 3, 4, 5 and 7.

> > IMODEM: Enabled
> >     IRQ:	10 3
> >     DSPADD:	0x130
> >     IMODEMADD:	0x2f8
> 
> If you use the Mwave/ACP modem then another serial
> device, probably /dev/ttyS1, will appear at this address
> using irq 3.  You will see the "mwave_3780i" device using
> ioports at 0x130.
> 
> >     DMA:	7
> 
> I read somewhere that the Mwave/ACP modem driver doesn't
> actually use a DMA channel.

Well, PS2.EXE (on my machine) lets me set DMA to one of 0, 1, 6 or 7,
with 7 the default.  I just left it like that.

> Looks okay.  If you aren't using the MIDI sequencer then I'd
> recommend disabling it using PS2.EXE to free up this irq.

Having the MIDI player work for the first time was fun, though.  I never
use the parallel port, so I think I'll rather move it to IRQ 7.

> > Sound works great (even the MIDI synthesizer), although on boot I get the
> > message
> > ------------------------------
> > ad1848: Interrupt test failed (IRQ5)
> > ------------------------------
> > which doesn't seem to make any difference.
> 
> I have never got this message.  It's worrisome.

But AFAIK, nothing else uses this IRQ, and sound works, so ...

> You might like to compare your [PCMCIA config.opts] file with the one
>    http://panopticon.csustan.edu/thood/config.opts

Why is the 'exclude irq 10' line commented out in that file?

> > (Where are interrupts from the IR port going to appear?
> > Will this be a problem?)
> 
> Yes!  Because IRQ 7 is used by a device (the IR port) you
> should add
>     exclude irq 7
> to /etc/pcmcia/config.opts.  Then when the card is inserted,
> pcmcia cardmgr will assign the card an unused interrupt.

But at this point, no drivers are loaded for the IR port, and the
interrupt is *not* used.  I don't see how this could cause a problem at
this point.

> > When I now try to disable both serial ports:
> > and reinsert the modem card, the system hangs completely (no reaction to
> > mouse or keyboard), and I have to reset the system.

> Hmm.  A hang like this is probably due to some driver
> probing for interrupts and ending up waiting forever
> for an interrupt.  This may be a bug in the pcmcia
> serial driver (serial_cs).  

... I would've thought so too, except the same thing happened when I
tried with the MWAVE driver.


> You need to free up an interrupt for your pcmcia card.
> This means freeing it up physically (using PS2.EXE or tpctl)
> and freeing it "so far as the kernel knows" (using setserial)
> and freeing it "so far as the pcmcia cardmgr knows" (by
> removing 'exclude irq x' from /etc/pcmcia/config.opts).

[...]

> It is a bit surprising that you can't initialize the Mwave modem,
> since irqs 10 and 3 and the relevant ioports are all free.
> However, I think I once had the same problem and solved it
> by using PS2.EXE to disable the IR port.

I thought it should be possible to switch between the devices without
going through PS2.EXE every time.


> I checked again and I see that Windows gives the user a bit
> more flexibility in controlling resources than PS2.EXE does.
> In Windows Settings|Control Panel|System once can set the
> IR interface to use IRQ 5 as well as 3 and 4.  The IBM
> Technical Reference confirms this.  I don't have a complete
> list of irq "compatibility" for all devices handy though.
> I have posted the choices available under PS2.EXE on my site
> in the "resources" section:
>     http://panopticon.csustan.edu/thood/tp600lnx.htm#secres

This matches my options, except that for my 600E, IRQ 7 is also reported
as a valid choice for the IR port.

> > irq 7 is excluded in your config.opts file, so
> > pcmcia cardmgr won't use it.
> 
> Oops again.  I see that irq 7 is *not* excluded in your
> config.opts file.  The failure to grab irq 7 must therefore
> be due either to another driver (such as parport) having
> reserved irq7, or to the serial driver's failure to see the
> card's UART ioports and irq.  Either way, as I said before,
> I suggest you stay away from using irq 7 for PCMCIA cards.
> Use irq 9.  If you like, try getting MIDI to work with irq 7
> instead.  I think I am going to try doing that myself.

In this case, the parallel port is disabled by PS2, the parport drivers,
although compiled as modules, are not loaded into the kernel and I don't
see what else should be wanting to use IRQ 7.

But I'll try to have MIDI use IRQ 7 and leave IRQ 9 for the PC-card
instead.  I'll report what happened.

Thanks for your efforts!

> Thomas

-- 
//Tom Grydeland <Tom.Grydeland@phys.uit.no>


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