lkml.org 
[lkml]   [1997]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectSharing IRQs between the first 4 serial ports.
Traditionally IRQs have been assigned to the first four serial ports in
this way:

COM1 4
COM2 3
COM3 4
COM4 3

That is: sharing IRQs between COM 1/3 and COM 2/4.

A de facto standard for internal modems seems to be:

COM1 4
COM2 3
COM3 5
COM4 2

That is: no IRQ sharing.

I've made a small patch to make this ``new standard'' default in the Linux
serial driver. The ``old standard'' can be chosen by setting
CONFIG_SERIAL_SHARE_IRQ during configuration (already used for serial
boards.)

This allows users with internal modems to use those without having to use
setserial.

I'd like to hear your comments on which IRQ scheme should be the default
in the kernel.


--- linux/drivers/char/serial.c.orig Fri Nov 21 11:06:38 1997
+++ linux/drivers/char/serial.c Sun Nov 23 09:37:53 1997
@@ -22,6 +22,9 @@
* 1/97: Extended dumb serial ports are a config option now.
* Saves 4k. Michael A. Griffith <grif@acm.org>
*
+ * 11/97: Configuring to share IRQs between COM 1/3 and COM 2/4 via
+ * CONFIG_SERIAL_SHARE_IRQ. Niels Kristian Bech Jensen <nkbj@image.dk>
+ *
* This module exports the following rs232 io functions:
*
* int rs_init(void);
@@ -53,7 +56,7 @@
#include <asm/bitops.h>

static char *serial_name = "Serial driver";
-static char *serial_version = "4.24";
+static char *serial_version = "4.25";

static DECLARE_TASK_QUEUE(tq_serial);

@@ -211,10 +214,17 @@

static struct serial_state rs_table[] = {
/* UART CLK PORT IRQ FLAGS */
+#ifdef CONFIG_SERIAL_SHARE_IRQ
{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */
{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */
{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */
{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
+#else
+ { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */
+ { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */
+ { 0, BASE_BAUD, 0x3E8, 5, STD_COM_FLAGS }, /* ttyS2 */
+ { 0, BASE_BAUD, 0x2E8, 2, STD_COM4_FLAGS }, /* ttyS3 */
+#endif /* CONFIG_SERIAL_SHARE_IRQ */
#ifdef CONFIG_SERIAL_MANY_PORTS
{ 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */
{ 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */

--
Med venlig hilsen / Regards

Niels Kristian Bech Jensen nkbj@image.dk
http://www.image.dk/~nkbj/


\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.096 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site