Skip to contentSkip to conversation

PnP Changes for 2.5.72

PATCH In review Adam Belay 5 participants 17 messages Jun 19, 2003 – Jun 21, 2003

Subsystems (2)
lore
Share & tools
lore

Adam Belay

author
#0 lore raw

PATCH 1/1 PnP Changes for 2.5.72

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1414 -> 1.1415
# drivers/serial/8250_pnp.c 1.11 -> 1.12
# drivers/pnp/interface.c 1.14 -> 1.15

#	  drivers/pnp/base.h	1.4     -> 1.5    
#	  drivers/pnp/core.c	1.9     -> 1.10   

# drivers/pnp/support.c 1.2 -> 1.3
# drivers/pnp/isapnp/core.c 1.36 -> 1.37
# drivers/pnp/resource.c 1.13 -> 1.14
# drivers/pnp/quirks.c 1.10 -> 1.11
# drivers/pnp/manager.c 1.6 -> 1.7
# include/linux/pnp.h 1.20 -> 1.21
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/18 [email protected] 1.1415
# [PNP] Resource Management Cleanups and Updates
#
# This patch does the following...
# 1.) changes struct pnp_resources to pnp_option for clarity # 2.) greatly cleans up resource option registration # 3.) removes some of the current conflict prevention code in

# order to increase flexibility, (users will have more control)
# 4.) various manager cleanups, resulting code is more efficient
# 5.) fixes the locking bugs many have reported (now uses a mutex)
# 6.) removes the conflict displaying interface
#  - it is better to handle such things in user space
# 7.) also many misc. cleanups
# --------------------------------------------
#
diff -Nru a/drivers/pnp/base.h b/drivers/pnp/base.h
--- a/drivers/pnp/base.h	Wed Jun 18 23:02:24 2003
+++ b/drivers/pnp/base.h	Wed Jun 18 23:02:24 2003
@@ -4,29 +4,11 @@
 int pnp_interface_attach_device(struct pnp_dev *dev);
 void pnp_name_device(struct pnp_dev *dev);
 void pnp_fixup_device(struct pnp_dev *dev);
-void pnp_free_resources(struct pnp_resources *resources);
+void pnp_free_option(struct pnp_option *option);
 int __pnp_add_device(struct pnp_dev *dev);
 void __pnp_remove_device(struct pnp_dev *dev);

-/* resource conflict types */
-#define CONFLICT_TYPE_NONE 0x0000 /* there are no conflicts, other than those in the link */
-#define CONFLICT_TYPE_RESERVED 0x0001 /* the resource requested was reserved */
-#define CONFLICT_TYPE_IN_USE 0x0002 /* there is a conflict because the resource is in use */
-#define CONFLICT_TYPE_PCI 0x0004 /* there is a conflict with a pci device */
-#define CONFLICT_TYPE_INVALID 0x0008 /* the resource requested is invalid */
-#define CONFLICT_TYPE_INTERNAL 0x0010 /* resources within the device conflict with each ohter */
-#define CONFLICT_TYPE_PNP_WARM 0x0020 /* there is a conflict with a pnp device that is active */
-#define CONFLICT_TYPE_PNP_COLD 0x0040 /* there is a conflict with a pnp device that is disabled */
-
-/* conflict search modes */
-#define SEARCH_WARM 1 /* check for conflicts with active devices */
-#define SEARCH_COLD 0 /* check for conflicts with disabled devices */
-
-struct pnp_dev * pnp_check_port_conflicts(struct pnp_dev * dev, int idx, int mode);
int pnp_check_port(struct pnp_dev * dev, int idx);
-struct pnp_dev * pnp_check_mem_conflicts(struct pnp_dev * dev, int idx, int mode);
int pnp_check_mem(struct pnp_dev * dev, int idx);
-struct pnp_dev * pnp_check_irq_conflicts(struct pnp_dev * dev, int idx, int mode);
int pnp_check_irq(struct pnp_dev * dev, int idx);
-struct pnp_dev * pnp_check_dma_conflicts(struct pnp_dev * dev, int idx, int mode);
int pnp_check_dma(struct pnp_dev * dev, int idx);

drivers/pnp/core.c +3 -3
diff -Nru a/drivers/pnp/core.c b/drivers/pnp/core.c
@@ -104,8 +104,8 @@
 static void pnp_release_device(struct device *dmdev)
 {
 	struct pnp_dev * dev = to_pnp_dev(dmdev);
-	if (dev->possible)
-		pnp_free_resources(dev->possible);
+	pnp_free_option(dev->independent);
+	pnp_free_option(dev->dependent);
 	pnp_free_ids(dev);
 	kfree(dev);
 }
@@ -122,7 +122,7 @@
 	list_add_tail(&dev->global_list, &pnp_global);
 	list_add_tail(&dev->protocol_list, &dev->protocol->devices);
 	spin_unlock(&pnp_lock);
-	pnp_auto_config_dev(dev);
+
 	ret = device_register(&dev->dev);
 	if (ret == 0)
 		pnp_interface_attach_device(dev);
drivers/pnp/interface.c +52 -157

322 lines not on this page · raw message

drivers/pnp/isapnp/core.c +89 -110

407 lines not on this page · raw message

drivers/pnp/manager.c +319 -529

1,032 lines not on this page · raw message

drivers/pnp/quirks.c +9 -9
diff -Nru a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
@@ -30,7 +30,7 @@
 static void quirk_awe32_resources(struct pnp_dev *dev)
 {
 	struct pnp_port *port, *port2, *port3;
-	struct pnp_resources *res = dev->possible->dep;
+	struct pnp_option *res = dev->dependent;
 
 	/*
 	 * Unfortunately the isapnp_add_port_resource is too tightly bound
@@ -38,7 +38,7 @@
 	 * two extra ports (at offset 0x400 and 0x800 from the one given) by
 	 * hand.
 	 */
-	for ( ; res ; res = res->dep ) {
+	for ( ; res ; res = res->next ) {
 		port2 = pnp_alloc(sizeof(struct pnp_port));
 		if (!port2)
 			return;
@@ -62,9 +62,9 @@
 
 static void quirk_cmi8330_resources(struct pnp_dev *dev)
 {
-	struct pnp_resources *res = dev->possible->dep;
+	struct pnp_option *res = dev->dependent;
 
-	for ( ; res ; res = res->dep ) {
+	for ( ; res ; res = res->next ) {
 
 		struct pnp_irq *irq;
 		struct pnp_dma *dma;
@@ -82,7 +82,7 @@
 static void quirk_sb16audio_resources(struct pnp_dev *dev)
 {
 	struct pnp_port *port;
-	struct pnp_resources *res = dev->possible->dep;
+	struct pnp_option *res = dev->dependent;
 	int    changed = 0;
 
 	/*
@@ -91,7 +91,7 @@
 	 * auto-configured.
 	 */
 
-	for( ; res ; res = res->dep ) {
+	for( ; res ; res = res->next ) {
 		port = res->port;
 		if(!port)
 			continue;
@@ -118,11 +118,11 @@
 	 * doesn't allow a DMA channel of 0, afflicted card is an
 	 * OPL3Sax where x=4.
 	 */
-	struct pnp_resources *res;
+	struct pnp_option *res;
 	int max;
-	res = dev->possible;
+	res = dev->dependent;
 	max = 0;
-	for (res = res->dep; res; res = res->dep) {
+	for (; res; res = res->next) {
 		if (res->dma->map > max)
 			max = res->dma->map;
 	}
drivers/pnp/resource.c +147 -357

756 lines not on this page · raw message

drivers/pnp/support.c +35 -30

214 lines not on this page · raw message

drivers/serial/8250_pnp.c +28 -34

91 lines not on this page · raw message

include/linux/pnp.h +53 -74

103 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

author
#1 lore raw

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1415 -> 1.1416
# drivers/pnp/resource.c 1.14 -> 1.15
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/18 [email protected] 1.1416
# [PNP] /drivers/pnp/resource.c check_region warning fix
#
# This patch resolves the compiler warning caused by the depreciated check_region

# function.  It may not be the best solution but check_region really is what is
# needed here because we never actually have to call "request_region".  If prefered,
# I could alternatively request and release but doing so would be less efficient.
# --------------------------------------------
#
diff -Nru a/drivers/pnp/resource.c b/drivers/pnp/resource.c
--- a/drivers/pnp/resource.c	Wed Jun 18 23:02:14 2003
+++ b/drivers/pnp/resource.c	Wed Jun 18 23:02:14 2003
@@ -255,7 +255,7 @@
 	/* check if the resource is already in use, skip if the
 	 * device is active because it itself may be in use */
 	if(!dev->active) {
-		if (check_region(*port, length(port,end)))
+		if (__check_region(&ioport_resource, *port, length(port,end)))
 			return 0;
 	}

@@ -309,7 +309,7 @@
/* check if the resource is already in use, skip if the
* device is active because it itself may be in use */
if(!dev->active) {
- if (__check_region(&iomem_resource, *addr, length(addr,end)))
+ if (check_mem_region(*addr, length(addr,end)))
return 0;
}

author
#2 lore raw
In reply to Adam Belay

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1416 -> 1.1417
# drivers/pnp/resource.c 1.15 -> 1.16
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/18 [email protected] 1.1417
# [PNP] Module Compilation Fix
#
# Fixes a trivial typo in an export symbol macro.
# --------------------------------------------
#

drivers/pnp/resource.c +2 -2
diff -Nru a/drivers/pnp/resource.c b/drivers/pnp/resource.c
@@ -469,8 +469,8 @@
 }
 
 
-EXPORT_SYMBOL(pnp_register_dependent_resource);
-EXPORT_SYMBOL(pnp_register_independent_resource);
+EXPORT_SYMBOL(pnp_register_dependent_option);
+EXPORT_SYMBOL(pnp_register_independent_option);
 EXPORT_SYMBOL(pnp_register_irq_resource);
 EXPORT_SYMBOL(pnp_register_dma_resource);
 EXPORT_SYMBOL(pnp_register_port_resource);
author
#3 lore raw
In reply to Adam Belay

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1417 -> 1.1418
# drivers/pnp/pnpbios/core.c 1.31 -> 1.32
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/18 [email protected] 1.1418
# [PNP] PnPBIOS resource setting fix
#
# If a device is disabled when initially read, its blank resource data will not

# be cleared and the pnp layer will assume incorrectly that the device has
# already been configured.  This patch resolves the issue by initializing the
# resource table if the device is found to be disabled.
# --------------------------------------------
#
diff -Nru a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
--- a/drivers/pnp/pnpbios/core.c	Wed Jun 18 23:01:51 2003
+++ b/drivers/pnp/pnpbios/core.c	Wed Jun 18 23:01:51 2003
@@ -935,6 +935,10 @@
 		dev->capabilities |= PNP_REMOVABLE;
 	dev->protocol = &pnpbios_protocol;

+ /* clear out the damaged flags */
+ if (!dev->active)
+ pnp_init_resources(&dev->res);
+
pnp_add_device(dev);
pnpbios_interface_attach_device(node);

author
#4 lore raw
In reply to Adam Belay

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1418 -> 1.1419
# drivers/pnp/interface.c 1.15 -> 1.16
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/18 [email protected] 1.1419
# [PNP] re-add the previously removed "get" command in interface.c. #
# This patch adds the "get" command because at this point it is needed

# for debugging.
# --------------------------------------------
#
diff -Nru a/drivers/pnp/interface.c b/drivers/pnp/interface.c
--- a/drivers/pnp/interface.c	Wed Jun 18 23:01:42 2003
+++ b/drivers/pnp/interface.c	Wed Jun 18 23:01:42 2003
@@ -333,6 +333,13 @@
 		pnp_init_resources(&dev->res);
 		goto done;
 	}
+	if (!strnicmp(buf,"get",3)) {
+		down(&pnp_res_mutex);
+		if (pnp_can_read(dev))
+			dev->protocol->get(dev, &dev->res);
+		up(&pnp_res_mutex);
+		goto done;
+	}
 	if (!strnicmp(buf,"set",3)) {
 		int nport = 0, nmem = 0, nirq = 0, ndma = 0;
 		if (dev->active)
author
#5 lore raw
In reply to Adam Belay

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1419 -> 1.1420
# drivers/pnp/support.c 1.3 -> 1.4
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/18 [email protected] 1.1420
# [PNP] Trivial Typo fix regarding DMAs
#
# The irq index is used instead of the dma index when parsing dmas. # --------------------------------------------
#

drivers/pnp/support.c +1 -1
diff -Nru a/drivers/pnp/support.c b/drivers/pnp/support.c
@@ -635,7 +635,7 @@
 		{
 			if (len != 2)
 				goto sm_err;
-			write_dma(p, &res->dma_resource[irq]);
+			write_dma(p, &res->dma_resource[dma]);
 			dma++;
 			break;
 		}
author
#6 lore raw
In reply to Adam Belay

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1420 -> 1.1421
# drivers/pnp/isapnp/core.c 1.37 -> 1.38
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/18 [email protected] 1.1421
# [PNP] Remove some leftover resource config options in isapnp
#
# Must have missed it earlier, but the pci module parameter is not needed. # --------------------------------------------
#

drivers/pnp/isapnp/core.c +0 -4
diff -Nru a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
@@ -55,7 +55,6 @@
 int isapnp_disable;			/* Disable ISA PnP */
 int isapnp_rdp;				/* Read Data Port */
 int isapnp_reset = 1;			/* reset all PnP cards (deactivate) */
-int isapnp_skip_pci_scan;		/* skip PCI resource scanning */
 int isapnp_verbose = 1;			/* verbose mode */
 
 MODULE_AUTHOR("Jaroslav Kysela <[email protected]>");
@@ -67,8 +66,6 @@
 MODULE_PARM(isapnp_reset, "i");
 MODULE_PARM_DESC(isapnp_reset, "ISA Plug & Play reset all cards");
 MODULE_PARM(isapnp_allow_dma0, "i");
-MODULE_PARM(isapnp_skip_pci_scan, "i");
-MODULE_PARM_DESC(isapnp_skip_pci_scan, "ISA Plug & Play skip PCI resource scanning");
 MODULE_PARM(isapnp_verbose, "i");
 MODULE_PARM_DESC(isapnp_verbose, "ISA Plug & Play verbose mode");
 MODULE_LICENSE("GPL");
@@ -1175,7 +1172,6 @@
 {
 	(void)((get_option(&str,&isapnp_rdp) == 2) &&
 	       (get_option(&str,&isapnp_reset) == 2) &&
-	       (get_option(&str,&isapnp_skip_pci_scan) == 2) &&
 	       (get_option(&str,&isapnp_verbose) == 2));
 	return 1;
 }
author
#7 lore raw
In reply to Adam Belay

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1421 -> 1.1422
# drivers/pnp/support.c 1.4 -> 1.5
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/18 [email protected] 1.1422
# [PNP] Important Resource Parsing Fixes
#
# In some cases, we're reading the wrong bits for large tags. This patch corrects

# the issue by setting the affected bits forward by an offset of 2 (skipping over
# the size portion of the tag).
# --------------------------------------------
#
diff -Nru a/drivers/pnp/support.c b/drivers/pnp/support.c
--- a/drivers/pnp/support.c	Wed Jun 18 23:01:17 2003
+++ b/drivers/pnp/support.c	Wed Jun 18 23:01:17 2003
@@ -257,11 +257,11 @@
 	mem = pnp_alloc(sizeof(struct pnp_mem));
 	if (!mem)
 		return;
-	mem->min = ((p[3] << 8) | p[2]) << 8;
-	mem->max = ((p[5] << 8) | p[4]) << 8;
-	mem->align = (p[7] << 8) | p[6];
-	mem->size = ((p[9] << 8) | p[8]) << 8;
-	mem->flags = p[1];
+	mem->min = ((p[5] << 8) | p[4]) << 8;
+	mem->max = ((p[7] << 8) | p[6]) << 8;
+	mem->align = (p[9] << 8) | p[8];
+	mem->size = ((p[11] << 8) | p[10]) << 8;
+	mem->flags = p[3];
 	pnp_register_mem_resource(option,mem);
 	return;
 }
@@ -272,11 +272,11 @@
 	mem = pnp_alloc(sizeof(struct pnp_mem));
 	if (!mem)
 		return;
-	mem->min = (p[5] << 24) | (p[4] << 16) | (p[3] << 8) | p[2];
-	mem->max = (p[9] << 24) | (p[8] << 16) | (p[7] << 8) | p[6];
-	mem->align = (p[13] << 24) | (p[12] << 16) | (p[11] << 8) | p[10];
-	mem->size = (p[17] << 24) | (p[16] << 16) | (p[15] << 8) | p[14];
-	mem->flags = p[1];
+	mem->min = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4];
+	mem->max = (p[11] << 24) | (p[10] << 16) | (p[9] << 8) | p[8];
+	mem->align = (p[15] << 24) | (p[14] << 16) | (p[13] << 8) | p[12];
+	mem->size = (p[19] << 24) | (p[18] << 16) | (p[17] << 8) | p[16];
+	mem->flags = p[3];
 	pnp_register_mem_resource(option,mem);
 	return;
 }
@@ -287,10 +287,10 @@
 	mem = pnp_alloc(sizeof(struct pnp_mem));
 	if (!mem)
 		return;
-	mem->min = mem->max = (p[5] << 24) | (p[4] << 16) | (p[3] << 8) | p[2];
-	mem->size = (p[9] << 24) | (p[8] << 16) | (p[7] << 8) | p[6];
+	mem->min = mem->max = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4];
+	mem->size = (p[11] << 24) | (p[10] << 16) | (p[9] << 8) | p[8];
 	mem->align = 0;
-	mem->flags = p[1];
+	mem->flags = p[3];
 	pnp_register_mem_resource(option,mem);
 	return;
 }
@@ -486,12 +486,12 @@
 {
 	unsigned long base = res->start;
 	unsigned long len = res->end - res->start + 1;
-	p[2] = (base >> 8) & 0xff;
-	p[3] = ((base >> 8) >> 8) & 0xff;
 	p[4] = (base >> 8) & 0xff;
 	p[5] = ((base >> 8) >> 8) & 0xff;
-	p[8] = (len >> 8) & 0xff;
-	p[9] = ((len >> 8) >> 8) & 0xff;
+	p[6] = (base >> 8) & 0xff;
+	p[7] = ((base >> 8) >> 8) & 0xff;
+	p[10] = (len >> 8) & 0xff;
+	p[11] = ((len >> 8) >> 8) & 0xff;
 	return;
 }

@@ -499,32 +499,32 @@
{
unsigned long base = res->start; unsigned long len = res->end - res->start + 1;
- p[2] = base & 0xff;
- p[3] = (base >> 8) & 0xff;
- p[4] = (base >> 16) & 0xff;
- p[5] = (base >> 24) & 0xff;
- p[6] = base & 0xff;
- p[7] = (base >> 8) & 0xff;
- p[8] = (base >> 16) & 0xff;
- p[9] = (base >> 24) & 0xff;
- p[14] = len & 0xff;
- p[15] = (len >> 8) & 0xff;
- p[16] = (len >> 16) & 0xff;
- p[17] = (len >> 24) & 0xff;
+ p[4] = base & 0xff;
+ p[5] = (base >> 8) & 0xff;
+ p[6] = (base >> 16) & 0xff;
+ p[7] = (base >> 24) & 0xff;
+ p[8] = base & 0xff;
+ p[9] = (base >> 8) & 0xff;
+ p[10] = (base >> 16) & 0xff;
+ p[11] = (base >> 24) & 0xff;
+ p[16] = len & 0xff;
+ p[17] = (len >> 8) & 0xff;
+ p[18] = (len >> 16) & 0xff;
+ p[19] = (len >> 24) & 0xff;
return;
}

static void write_fixed_mem32(unsigned char *p, struct resource * res)
{ unsigned long base = res->start;
unsigned long len = res->end - res->start + 1;
- p[2] = base & 0xff;
- p[3] = (base >> 8) & 0xff;
- p[4] = (base >> 16) & 0xff;
- p[5] = (base >> 24) & 0xff;
- p[6] = len & 0xff;
- p[7] = (len >> 8) & 0xff;
- p[8] = (len >> 16) & 0xff;
- p[9] = (len >> 24) & 0xff;
+ p[4] = base & 0xff;
+ p[5] = (base >> 8) & 0xff;
+ p[6] = (base >> 16) & 0xff;
+ p[7] = (base >> 24) & 0xff;
+ p[8] = len & 0xff;
+ p[9] = (len >> 8) & 0xff;
+ p[10] = (len >> 16) & 0xff;
+ p[11] = (len >> 24) & 0xff;
return;
}

#8 lore raw
In reply to Adam Belay
Quoted 24 lines · Adam Belay

diff -Nru a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c

drivers/serial/8250_pnp.c +0 -13
@@ -315,19 +315,6 @@
 
 MODULE_DEVICE_TABLE(pnp, pnp_dev_table);
 
-static inline void avoid_irq_share(struct pnp_dev *dev)
-{
-	unsigned int map = 0x1FF8;
-	struct pnp_irq *irq;
-	struct pnp_resources *res = dev->possible;
-
-	serial8250_get_irq_map(&map);
-
-	for ( ; res; res = res->dep)
-		for (irq = res->irq; irq; irq = irq->next)
-			irq->map = map;
-}
-
 static char *modem_names[] __devinitdata = {
 	"MODEM", "Modem", "modem", "FAX", "Fax", "fax",
 	"56K", "56k", "K56", "33.6", "28.8", "14.4",

drivers/serial/8250_pnp.c line 396

Quoted 8 lines
drivers/serial/8250_pnp.c +0 -2
@@ -395,8 +391,6 @@
 		if (ret < 0)
 			return ret;
 	}
-	if (flags & SPCI_FL_NO_SHIRQ)
-		avoid_irq_share(dev);
 	memset(&serial_req, 0, sizeof(serial_req));
 	serial_req.irq = pnp_irq(dev,0);
 	serial_req.port = pnp_port_start(dev, 0);

Why did you remove this? I'd like this to go to Linus as a separate cset so it can easily be backed out again if needed.

It's purpose is trying to ensure that we don't use an interrupt which another serial port is using. Presumably this is because the card does not work, for whatever reason, when it shares interrupts with other serial ports.

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
author
#9 lore raw
Quoted 2 lines · Russell King

It's purpose is trying to ensure that we don't use an interrupt which another serial port is using. Presumably this is because the card does

PnP automatically does this without modification to the rule structure.

Quoted 3 lines

not work, for whatever reason, when it shares interrupts with other serial ports.

I removed avoid_irq_share because the current pnp code, like the previous, does not allow irq sharing. Also it corrupts the device rule structure by replacing it with modified values that may not apply after devices are disabled etc. Is there a set of conditions I could follow to determine if a serial pnp device is capable of irq sharing, and also with which other devices can a capable device share an irq? If so, I could have the resource manager handle this type of situation when few irqs are available.

Thanks,
Adam

#10 lore raw
Quoted 7 lines · Adam Belay

I removed avoid_irq_share because the current pnp code, like the previous, does not allow irq sharing. Also it corrupts the device rule structure by replacing it with modified values that may not apply after devices are disabled etc. Is there a set of conditions I could follow to determine if a serial pnp device is capable of irq sharing, and also with which other devices can a capable device share an irq? If so, I could have the resource manager handle this type of situation when few irqs are available.

The problem is one of a lack of historical information on why it was added. The driver itself allows serial ports to share interrupts between themselves. Maybe tytso knows why the "Rockwell 56K ACF II Fax+Data+Voice Modem" is unable to share IRQs?

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
#11 lore raw
Quoted 9 lines · Russell King
Quoted 7 lines · Adam Belay

I removed avoid_irq_share because the current pnp code, like the previous, does not allow irq sharing. Also it corrupts the device rule structure by replacing it with modified values that may not apply after devices are disabled etc. Is there a set of conditions I could follow to determine if a serial pnp device is capable of irq sharing, and also with which other devices can a capable device share an irq? If so, I could have the resource manager handle this type of situation when few irqs are available.

Quoted 4 lines

The problem is one of a lack of historical information on why it was added. The driver itself allows serial ports to share interrupts between themselves. Maybe tytso knows why the "Rockwell 56K ACF II Fax+Data+Voice Modem" is unable to share IRQs?

It was me who added this crappy quirk.

My ELine modem which identified itself "Rockwell 56K ACF II Fax+Data+Voice Modem" was going mad when its IRQ was shared with any device. So I decided to add this quirk.

Personally I think that ISA IRQ sharing should be absolutely last resort technic, because ISA bus was never designed to support IRQ sharing sanely. If you have to enable ISA PnP device and do not have enough IRQ, you must print BIG FAT WARNING before doing this. May be kernel config options must be added for brave guys wanting to use ISA IRQ sharing.

Signature · 2 lines
Andrey Panin		| Linux and UNIX system administrator
[email protected]		| PGP key: wwwkeys.pgp.net
#12 lore raw
Quoted 1 line · Andrey Panin

It was me who added this crappy quirk.

It helps when the people with the problems are reading the list. 8)

Quoted 3 lines

My ELine modem which identified itself "Rockwell 56K ACF II Fax+Data+Voice Modem" was going mad when its IRQ was shared with any device. So I decided to add this quirk.

Can you remember any further details? Eg, was it when sharing with other serial ports (and were these serial ports in use), or any thing else?

Thanks.

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
#13 lore raw
Quoted 11 lines · Russell King
Quoted 1 line · Andrey Panin

It was me who added this crappy quirk.

It helps when the people with the problems are reading the list. 8)

Quoted 3 lines

My ELine modem which identified itself "Rockwell 56K ACF II Fax+Data+Voice Modem" was going mad when its IRQ was shared with any device. So I decided to add this quirk.

Can you remember any further details? Eg, was it when sharing with other serial ports (and were these serial ports in use), or any thing else?

Modem IRQ4 (IIRC) wash shared with onboard serial port and in this configuration there were massive receive data losses on the modem.

Signature · 2 lines
Andrey Panin		| Linux and UNIX system administrator
[email protected]		| PGP key: wwwkeys.pgp.net
#14 lore raw
In reply to Andrey Panin
Quoted 21 lines · Andrey Panin
Quoted 9 lines · Russell King
Quoted 7 lines · Adam Belay

I removed avoid_irq_share because the current pnp code, like the previous, does not allow irq sharing. Also it corrupts the device rule structure by replacing it with modified values that may not apply after devices are disabled etc. Is there a set of conditions I could follow to determine if a serial pnp device is capable of irq sharing, and also with which other devices can a capable device share an irq? If so, I could have the resource manager handle this type of situation when few irqs are available.

Quoted 4 lines

The problem is one of a lack of historical information on why it was added. The driver itself allows serial ports to share interrupts between themselves. Maybe tytso knows why the "Rockwell 56K ACF II Fax+Data+Voice Modem" is unable to share IRQs?

It was me who added this crappy quirk.

My ELine modem which identified itself "Rockwell 56K ACF II Fax+Data+Voice Modem" was going mad when its IRQ was shared with any device. So I decided to add this quirk.

Quoted 5 lines

Personally I think that ISA IRQ sharing should be absolutely last resort technic, because ISA bus was never designed to support IRQ sharing sanely. If you have to enable ISA PnP device and do not have enough IRQ, you must print BIG FAT WARNING before doing this. May be kernel config options must be added for brave guys wanting to use ISA IRQ sharing.

But dumb multiport boards support sharing just fine:

0: uart:16550A port:3F8 irq:4 baud:1200 tx:6 rx:9587 RTS|CTS|DTR|DSR 1: uart:16550A port:2F8 irq:3 baud:9600 tx:9 rx:2 brk:2 2: uart:unknown port:3E8 irq:4
3: uart:unknown port:2E8 irq:3
4: uart:16550A port:1A0 irq:5 baud:9600 tx:0 rx:0 CTS
5: uart:16550A port:1A8 irq:5 baud:9600 tx:0 rx:0
6: uart:16550A port:1B0 irq:5 baud:9600 tx:0 rx:0
7: uart:16550A port:1B8 irq:5 baud:9600 tx:0 rx:0

There's more to it than just "it doesn't work." I note that 2.5.70 still sets the NIC and AHA1540 to the same irq, while 2.4.18 doesn't. I gave up on that, I can't change the hardware (specialty hardware) so I run 2.4 kernels. Someday I'll fight with it.

Signature · 3 lines
bill davidsen <[email protected]>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
#15 lore raw
Quoted 14 lines · Bill Davidsen
Quoted 12 lines · Andrey Panin
Quoted 4 lines · Russell King

The problem is one of a lack of historical information on why it was added. The driver itself allows serial ports to share interrupts between themselves. Maybe tytso knows why the "Rockwell 56K ACF II Fax+Data+Voice Modem" is unable to share IRQs?

It was me who added this crappy quirk.

My ELine modem which identified itself "Rockwell 56K ACF II Fax+Data+Voice Modem" was going mad when its IRQ was shared with any device. So I decided to add this quirk.

Quoted 5 lines
Quoted 5 lines

Personally I think that ISA IRQ sharing should be absolutely last resort technic, because ISA bus was never designed to support IRQ sharing sanely. If you have to enable ISA PnP device and do not have enough IRQ, you must print BIG FAT WARNING before doing this. May be kernel config options must be added for brave guys wanting to use ISA IRQ sharing.

Problem is, 'unprepared' ISA cards are electrically unable to share interrupts (like in: an interrupting card cant't drive the interrupt line high while at the same time another one actively drives it at a low level). You _can_ make things work when you replace the IRQ-selection-jumper on all sharing devices with a diode and add a pull down resistor. BTDT - works sufficiently well.

Quoted 1 line

But dumb multiport boards support sharing just fine:

Yes, they usually contain the necessary sharing circuity onboard. But you can't share them with other instances of the same or other cards unless you make the modifications above.

Unfortunately on-board serial ports seldom have IRQ-jumpers - which makes them practically not shareable at all.

And for PNP devices, well they also don't have jumpers. It is possible to find the necessary wires on the pcb though ..... ;-)

Bye,
Thorsten

Signature · 3 lines
| Thorsten Kranzkowski        Internet: [email protected]                      |
| Mobile: ++49 170 1876134       Snail: Kiebitzstr. 14, 49324 Melle, Germany  |
| Ampr: dl8bcu@db0lj.#rpl.deu.eu, [email protected] [44.130.8.19] |
#16 lore raw
Quoted 21 lines · Thorsten Kranzkowski
Quoted 14 lines · Bill Davidsen
Quoted 12 lines · Andrey Panin
Quoted 4 lines · Russell King

The problem is one of a lack of historical information on why it was added. The driver itself allows serial ports to share interrupts between themselves. Maybe tytso knows why the "Rockwell 56K ACF II Fax+Data+Voice Modem" is unable to share IRQs?

It was me who added this crappy quirk.

My ELine modem which identified itself "Rockwell 56K ACF II Fax+Data+Voice Modem" was going mad when its IRQ was shared with any device. So I decided to add this quirk.

Quoted 5 lines
Quoted 5 lines

Personally I think that ISA IRQ sharing should be absolutely last resort technic, because ISA bus was never designed to support IRQ sharing sanely. If you have to enable ISA PnP device and do not have enough IRQ, you must print BIG FAT WARNING before doing this. May be kernel config options must be added for brave guys wanting to use ISA IRQ sharing.

Quoted 5 lines

Problem is, 'unprepared' ISA cards are electrically unable to share interrupts (like in: an interrupting card cant't drive the interrupt line high while at the same time another one actively drives it at a low level). You _can_ make things work when you replace the IRQ-selection-jumper on all sharing devices with a diode and add a pull down resistor. BTDT - works sufficiently well.

Problem is that almost all all ISA cards fall into 'unprepared' category, unable to share interrupts with another card. ISA IRQ sharing allways was the risky bussiness, depending on electrical characteristics of both IRQ sharing devices.

Quoted 8 lines
Quoted 1 line

But dumb multiport boards support sharing just fine:

Yes, they usually contain the necessary sharing circuity onboard. But you can't share them with other instances of the same or other cards unless you make the modifications above.

Unfortunately on-board serial ports seldom have IRQ-jumpers - which makes them practically not shareable at all.

It's exactly my point beyond the ugly quirk which disables ISA IRQ sharing.

Quoted 3 lines

And for PNP devices, well they also don't have jumpers. It is possible to find the necessary wires on the pcb though ..... ;-)

Reverse enginerring of the PCB layout is not acceptable for allmost all users of ISA PnP boards :)

Signature · 2 lines
Andrey Panin		| Linux and UNIX system administrator
[email protected]		| PGP key: wwwkeys.pgp.net