linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linux kernel 2.4.19 failure to access a serial port
@ 2002-08-16  7:01 JosMHinkle
  0 siblings, 0 replies; 5+ messages in thread
From: JosMHinkle @ 2002-08-16  7:01 UTC (permalink / raw)
  To: linux-kernel

Summary: In an i586 system with two serial ports and a modem,
Linux fails to access the modem

IRQ 3 and 4 are used by ttyS1 and ttyS0, and IRQ 10 is used by the modem.
There are no conflicts.

I previously mentioned disabling CONFIG_SERIAL_SHARE_IRQ in serial.c
to make it work. (The disabling of CONFIG_SERIAL_MANY_PORTS is an
artifact of no importance).

Stuart, you suggest:
> "This fix breaks the driver in a fundamental way. SHARE_IRQ and
> MANY_PORTS are turned on if CONFIG_PCI is on because a) pci drivers 
> *must* share interrrupts and b) generally serial ports that are behind 
> a pci bus are multiport boards."

CONFIG_PCI must be on because the video card is on that bus.  There is no
conflict between that and the serial ports.

How can this "break the driver in a fundamental way?" This is not
a system that "generally has a multiport board", it is a specific
machine that specifically does not have a multiport board.  To try
to configure it as if it might because some other machines do is just stupid.  I am sure there are many other machines built just like it in
this way, two serial ports and a plugin hardware modem card.

The consideration that the PCI drivers must share interrupts does not
apply here because this patch to make Linux work on this machine is
only in serial.c, nowhere else, and besides, on this system there seems
to be no interrupt sharing elsewhere; correct me if I'm wrong.  The four
items on the PCI bus are:
Host bridge: Silicon Integrated Systems [SiS] 5571
ISA bridge: Silicon Integrated Systems [SiS] 85C503/5513
IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE]
VGA compatible controller: S3 Inc. 86c775/86c785 [Trio 64V2/DX]

Perhaps the IDE controllers share an interrupt, but that is hardly
anything near serial.c

Again, it is very poor practice to offer a configuration item which is 
needed on a system only to silently defeat it internally because "some
systems need that".  I had to waste several days to discover this and
fix it.  If I were not technically adept enough to do it, I would simply
have told the customer that "Linux cannot be installed on your machine".




__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Linux kernel 2.4.19 failure to access a serial port
  2002-08-14 22:43 JosMHinkle
@ 2002-08-15 14:47 ` Stuart MacDonald
  0 siblings, 0 replies; 5+ messages in thread
From: Stuart MacDonald @ 2002-08-15 14:47 UTC (permalink / raw)
  To: JosMHinkle, linux-kernel

From: <JosMHinkle@netscape.net>
> Slight expansion: A system with two serial ports on ttyS0 and ttyS1
> and a hardware modem on ttyS2 was not serviced properly in kernel
> 2.4.19 and some earlier ones.  The modem at ttyS2 was fairly well
> ignored.  The interrupt requests used were ttyS0:irq4 ttyS1:irq3
> ttyS2:irq10
>
> Temporary fix:
>    In drivers/char/serial.c at the directive "#ifdef CONFIG_PCI"
> the assumption is made that interrupt requests are shared and
> there are more than four serial ports.  That is not necessarily
> true, and the directives defeat the options set in configuration.
>    The solution here was to comment out #define CONFIG_SERIAL_SHARE_IRQ
> and CONFIG_SERIAL_MANY_PORTS and recompile.
>
> #ifdef CONFIG_PCI
> #define ENABLE_SERIAL_PCI
> /*** Commented out to allow unshared IRQ's on ttyS0-ttyS3
> #ifndef CONFIG_SERIAL_SHARE_IRQ
> #define CONFIG_SERIAL_SHARE_IRQ
> #endif
> #ifndef CONFIG_SERIAL_MANY_PORTS
> #define CONFIG_SERIAL_MANY_PORTS
> #endif
> ***/
> #endif

This fix breaks the driver in a fundamental way. SHARE_IRQ and
MANY_PORTS are turned on if CONFIG_PCI is on because a) pci drivers
*must* share interrrupts and b) generally serial ports that are behind
a pci bus are multiport boards.

The effect of MANY_PORTS is merely to increase the size of the static
array that holds the serial port state. Whether or not it is on should
not have affected your problem. (I believe the smallest size of the
array is 4, for ttyS0-3.)

SHARE_IRQ should also not have affected your problem, since your modem
is configured at irq 10, and you haven't mentioned that anything else
is also using irq 10. If turning off this option "fixes" your problem
then that should indicate that your setup isn't what you think it is;
either the modem isn't really at irq 10 (unclear from your previous
post, and my lack of isapnp knowledge) and/or something else is also
using the same irq your modem is on.

Please see my previous email, and try some of my suggestions. The one
about reserving the irq in bios for isa-only use is critical.

..Stu

--
We make multiport serial boards.
<http://www.connecttech.com>
(800) 426-8979



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Linux kernel 2.4.19 failure to access a serial port
@ 2002-08-14 22:43 JosMHinkle
  2002-08-15 14:47 ` Stuart MacDonald
  0 siblings, 1 reply; 5+ messages in thread
From: JosMHinkle @ 2002-08-14 22:43 UTC (permalink / raw)
  To: linux-kernel

Summary: In an i586 system with two serial ports and a modem,
Linux fails to access the modem

Slight expansion: A system with two serial ports on ttyS0 and ttyS1
and a hardware modem on ttyS2 was not serviced properly in kernel
2.4.19 and some earlier ones.  The modem at ttyS2 was fairly well
ignored.  The interrupt requests used were ttyS0:irq4 ttyS1:irq3
ttyS2:irq10

Temporary fix:
   In drivers/char/serial.c at the directive "#ifdef CONFIG_PCI"
the assumption is made that interrupt requests are shared and
there are more than four serial ports.  That is not necessarily
true, and the directives defeat the options set in configuration.
   The solution here was to comment out #define CONFIG_SERIAL_SHARE_IRQ
and CONFIG_SERIAL_MANY_PORTS and recompile.

#ifdef CONFIG_PCI
#define ENABLE_SERIAL_PCI
/*** Commented out to allow unshared IRQ's on ttyS0-ttyS3
#ifndef CONFIG_SERIAL_SHARE_IRQ
#define CONFIG_SERIAL_SHARE_IRQ
#endif
#ifndef CONFIG_SERIAL_MANY_PORTS
#define CONFIG_SERIAL_MANY_PORTS
#endif
***/
#endif

   It seems a more sophisticated judgement needs to be made, and
perhaps simply following the directions of the configurer would be
advisable, in that these two items are made specifically available
in configuration, and should not be silently bypassed.

Note: I have been informed the mailer here does not break lines as
shown on the screen.  I hope this message turned out better.  It is
purposely reposted so the viewer doesn't have to deal with the 
unbroken line version






__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Linux kernel 2.4.19 failure to access a serial port
  2002-08-14  3:49 JosMHinkle
@ 2002-08-14 13:57 ` Stuart MacDonald
  0 siblings, 0 replies; 5+ messages in thread
From: Stuart MacDonald @ 2002-08-14 13:57 UTC (permalink / raw)
  To: JosMHinkle, linux-kernel

Please wrap your lines at less than or equal to 80 columns.

From: <JosMHinkle@netscape.net>
> Expansion: The system is a 233MHz Pentium Mmx in a board called
> "P5SV-B" manufacurer unknown.  There are two serial ports available

http://www.ecs.com.tw/products/socket7.htm

> with the mouse using one (ttyS0).  The Rockwell K56Flex modem is
> installed to use ttyS2 and IRQ 10, set by PnP.  The reason for this
> is Windows is run on the machine at times, and is the only
> arrangement it will accept, so the same configuration was intended
> to be used when Linux was run.  Indeed, when kernel 2.2.21 was used,
> there was no problem.
> The kernel was originally configured without support for sharing
> interrupts  since none were shared.

Sounds like you have an ISA modem, which cannot share interrupts.

>   However, the symptoms are strings sent to the modem might or might
> not reach it, and when they do, they come in 16 byte segments about
> once every 30 seconds.  I understand that is typical behaviour when
> interrupts are shared, and indeed when the serial driver becomes

It's typical behaviour when a device that can't share interrupts is
sharing its interrupt with someone else.

> active on bootup, the annunciation is "Serial driver version 5.05c
> with MANY_PORTS SHARE_IRQ SERIAL_PCI ISAPNP enabled" whether or not
> those were selected in the configuration before kernel compilation.

The first three serial options are turned on if you have PCI support
(in the general setup menu, not the serial menu) turned on. The pci
side of the serial driver needs those options to support pci based
serial boards.

>   Initially /dev/ttyS2 is reported as using IRQ4 on bootup even
> though the isapnp.conf directs it to be IRQ10.  setserial is used
> later thus: "setserial /dev/ttyS2 irq 10 baud_base 115200 spd_normal
> skip_test".
>    Curiously, with or without that, the modem responds the same way
> whether IRQ4 or IRQ10 is used after the isapnp software has
> allegedly set it to use IRQ10.

I don't have any knowledge of isapnp. But it sounds like you have an
irq conflict. Here's a couple things to try, apologies if they are
irrelevant:
- double check what irq your modem is set to
- double check in your bios that you have that irq reserved for isa
  use only
- if possible try disbling the isapnp.conf, and just trying the port
  with whatever irq it autodetects at

Hm. This isn't a Winmodem is it?

..Stu



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Linux kernel 2.4.19 failure to access a serial port
@ 2002-08-14  3:49 JosMHinkle
  2002-08-14 13:57 ` Stuart MacDonald
  0 siblings, 1 reply; 5+ messages in thread
From: JosMHinkle @ 2002-08-14  3:49 UTC (permalink / raw)
  To: linux-kernel

Summary: In an i586 system with two serial ports and a modem, Linux fails to access the modem

Expansion: The system is a 233MHz Pentium Mmx in a board called "P5SV-B" manufacurer unknown.  There are two serial ports available with the mouse using one (ttyS0).  The Rockwell K56Flex modem is installed to use ttyS2 and IRQ 10, set by PnP.  The reason for this is Windows is run on the machine at times, and is the only arrangement it will accept, so the same configuration was intended to be used when Linux was run.  Indeed, when kernel 2.2.21 was used, there was no problem.
The kernel was originally configured without support for sharing interrupts  since none were shared.
  However, the symptoms are strings sent to the modem might or might not reach it, and when they do, they come in 16 byte segments about once every 30 seconds.  I understand that is typical behaviour when interrupts are shared, and indeed when the serial driver becomes active on bootup, the annunciation is "Serial driver version 5.05c with MANY_PORTS SHARE_IRQ SERIAL_PCI ISAPNP enabled" whether or not those were selected in the configuration before kernel compilation.
  Initially /dev/ttyS2 is reported as using IRQ4 on bootup even though the isapnp.conf directs it to be IRQ10.  setserial is used later thus: "setserial /dev/ttyS2 irq 10 baud_base 115200 spd_normal skip_test".
   Curiously, with or without that, the modem responds the same way whether IRQ4 or IRQ10 is used after the isapnp software has allegedly set it to use IRQ10.
   /dev/ttyS0 (the mouse) and /dev/ttyS1 (a serial port ppp link) work perfectly well, and as mentioned, /dev/ttyS2 also worked perfectly well in a kernel 2.2.21 installation.
   Contents of /proc/tty/driver/serial:
0: uart:16550A port:3F8 irq:4 baud:1200 RTS|DTR
1: uart:16550A port:2F8 irq:3 baud:115200 RTS|CTS|DTR|DSR|CD
2: uart:16550A port:3E8 irq:10 baud:9600 CTS|DTR

Perhaps this is not a kernel issue, but one of PnP software, or something else.  I post this here because I have found precious little related to such a problem in my searches, and perhaps others have seen this and would benefit from a response here.

For what it's worth:
Gnu c 2.95.3
Gnu make 3.79.1
util-linux 2.11r
mount      2.11r
modutils   2.4.16
e2fsprogs  1.27
PPP        2.4.1
Linux C Library 2.5.so*
Dynamic linker (ldd) 2.2.5
Procps               2.0.7
Net-tools            1.6.0
Kbd                  command
Sh-utils             2.0
Modules loaded       bsd_comp opl3 opl3sa2 ad1848 mpu401 sound soundcore
                     ppp_deflate ppp_async ppp_generic slhc lp parport_pc                       parport
The sound system uses IRQ5 and the parallel port IRQ7




__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-08-16  6:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-16  7:01 Linux kernel 2.4.19 failure to access a serial port JosMHinkle
  -- strict thread matches above, loose matches on Subject: below --
2002-08-14 22:43 JosMHinkle
2002-08-15 14:47 ` Stuart MacDonald
2002-08-14  3:49 JosMHinkle
2002-08-14 13:57 ` Stuart MacDonald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).