[ltp] Some experiences with serial ports, internal modem and

Thomas Hood linux-thinkpad@www.bm-soft.com
Mon, 26 Feb 2001 15:55:25 +0000 (GMT)


--- Till.Straumann@TU-Berlin.de wrote: 
> Some remarks on IRQ sharing among serial devices and IR port
> 
>  - serial irq sharing must be enabled in the kernel
>     + enable questions for `experimental/development' code/drivers
>     + under `char devices' enable questions for
>       "extended dumb serial driver options"
>     + enable "support for sharing serial IRQs"

Qualification.  I am running Linux 2.4.2.  I did *not* select
CONFIG_SERIAL_SHARE_IRQ=y.  Yet when I boot the serial driver 
nevertheless says:  "Serial driver version 5.02 (2000-08-09)
with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled".  Here is the
code in  drivers/char/serial.c that's responsible for this:

#ifdef CONFIG_PCI
#	define ENABLE_SERIAL_PCI
#	ifndef CONFIG_SERIAL_SHARE_IRQ
#		define CONFIG_SERIAL_SHARE_IRQ
#	endif
#	ifndef CONFIG_SERIAL_MANY_PORTS
#		define CONFIG_SERIAL_MANY_PORTS
#	endif
#endif

>  - use setpnp -b 0x13 irq 4
> 
>  - before trying IRQ sharing, make sure the individual
>    devices work.

Sensible advice.  :)

>  - if you intend to share an irq for the built in serial
>    port and the IR interface, you _must_ use the irtty
>    line discipline, i.e. both devices must use the "serial"
>    driver.
> 
>  - I also made the experience that after unloading the FIR
>    driver, things became sometimes unstable. Especially, 
>    the using the "irtty" after having used the FIR driver
>    does _not_ work. BTW: I use dongle_id=0x9 for the FIR...

This is a bug, I presume.  Any idea of where the bug is?

>  - IRQ sharing with the MWAVE modem does not work

But it might work if the serial driver were a module
which wasn't loaded at the same time as mwavedd.o ?

>  - I think it's possible to hack the serial_cs driver
>    so IRQ sharing also could work for PCMCMIA modems.
> 
> However, IRQ sharing among the DB9 serial and the IR port
> DOES WORK - as poster earlier, I can simultaneously communicate
> with a palm-pilot (on DB9) and a nokia phone (on ircomm).
> 
> Never give up!

Linux will reward you in the end.  :)

Since the motivation for sharing interrupts is not
having enough interrupts to go 'round, I should point
out the following.

- Serial and parallel port drivers only "grab" the interrupts
  they use while they are loaded and their corresponding 
  device nodes are open.
- The parallel port will work without using an interrupt.
  The parport_pc driver is capable of "polled" operation.
- You only need to assign an IRQ to "MIDI" if you are 
  using the MPU-401 UART to communicate with an *external*
  MIDI device.  The 98% of use who don't have external
  MIDI devices need only one interrupt for the sound card.

Someone please correct me if I'm wrong.

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