From: Adam Belay <ambx1@neo.rr.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Aditional PnP Changes for 2.5.62
Date: Sat, 22 Feb 2003 22:10:55 +0000 [thread overview]
Message-ID: <20030222221055.GD1212@neo.rr.com> (raw)
In-Reply-To: <20030222221004.GC1212@neo.rr.com>
# 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.1024 -> 1.1025
# drivers/pnp/resource.c 1.8 -> 1.9
# drivers/pnp/manager.c 1.3 -> 1.4
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/02/22 ambx1@neo.rr.com 1.1025
# Resource Management Performance Fix
#
# Fixes a typo in pnp_check_*_conflicts functions. Without this fix the
# resource algorithm will work but will take longer to assign resources.
#
# Also contains some minor reordering in pnp_activate_dev.
# --------------------------------------------
#
diff -Nru a/drivers/pnp/manager.c b/drivers/pnp/manager.c
--- a/drivers/pnp/manager.c Sat Feb 22 22:04:48 2003
+++ b/drivers/pnp/manager.c Sat Feb 22 22:04:48 2003
@@ -602,10 +602,6 @@
pnp_info("res: The PnP device '%s' is already active.", dev->dev.bus_id);
return -EBUSY;
}
- spin_lock(&pnp_lock); /* we lock just in case the device is being configured during this call */
- dev->active = 1;
- spin_unlock(&pnp_lock); /* once the device is claimed active we know it won't be configured so we can unlock */
-
/* If this condition is true, advanced configuration failed, we need to get this device up and running
* so we use the simple config engine which ignores cold conflicts, this of course may lead to new failures */
if (!pnp_is_active(dev)) {
@@ -614,6 +610,11 @@
goto fail;
}
}
+
+ spin_lock(&pnp_lock); /* we lock just in case the device is being configured during this call */
+ dev->active = 1;
+ spin_unlock(&pnp_lock); /* once the device is claimed active we know it won't be configured so we can unlock */
+
if (dev->config_mode & PNP_CONFIG_INVALID) {
pnp_info("res: Unable to activate the PnP device '%s' because its resource configuration is invalid.", dev->dev.bus_id);
goto fail;
diff -Nru a/drivers/pnp/resource.c b/drivers/pnp/resource.c
--- a/drivers/pnp/resource.c Sat Feb 22 22:04:48 2003
+++ b/drivers/pnp/resource.c Sat Feb 22 22:04:48 2003
@@ -268,7 +268,7 @@
/* check for cold conflicts */
pnp_for_each_dev(tdev) {
/* Is the device configurable? */
- if (tdev == dev || (mode ? !dev->active : dev->active))
+ if (tdev == dev || (mode ? !tdev->active : tdev->active))
continue;
for (tmp = 0; tmp < PNP_MAX_PORT; tmp++) {
if (tdev->res.port_resource[tmp].flags & IORESOURCE_IO) {
@@ -339,7 +339,7 @@
/* check for cold conflicts */
pnp_for_each_dev(tdev) {
/* Is the device configurable? */
- if (tdev == dev || (mode ? !dev->active : dev->active))
+ if (tdev == dev || (mode ? !tdev->active : tdev->active))
continue;
for (tmp = 0; tmp < PNP_MAX_MEM; tmp++) {
if (tdev->res.mem_resource[tmp].flags & IORESOURCE_MEM) {
@@ -408,7 +408,7 @@
/* check for cold conflicts */
pnp_for_each_dev(tdev) {
/* Is the device configurable? */
- if (tdev == dev || (mode ? !dev->active : dev->active))
+ if (tdev == dev || (mode ? !tdev->active : tdev->active))
continue;
for (tmp = 0; tmp < PNP_MAX_IRQ; tmp++) {
if (tdev->res.irq_resource[tmp].flags & IORESOURCE_IRQ) {
@@ -490,7 +490,7 @@
/* check for cold conflicts */
pnp_for_each_dev(tdev) {
/* Is the device configurable? */
- if (tdev == dev || (mode ? !dev->active : dev->active))
+ if (tdev == dev || (mode ? !tdev->active : tdev->active))
continue;
for (tmp = 0; tmp < PNP_MAX_DMA; tmp++) {
if (tdev->res.dma_resource[tmp].flags & IORESOURCE_DMA) {
prev parent reply other threads:[~2003-02-23 3:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-22 22:10 [PATCH] Aditional PnP Changes for 2.5.62 Adam Belay
2003-02-22 22:10 ` Adam Belay [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030222221055.GD1212@neo.rr.com \
--to=ambx1@neo.rr.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.