rpms/kernel/F-8 linux-2.6-isapnp-fix-limits.patch, NONE, 1.1 linux-2.6-pnp-extend-resource-limits.patch, NONE, 1.1 kernel.spec, 1.412, 1.413

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Tue Apr 1 15:59:16 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29940

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-isapnp-fix-limits.patch 
	linux-2.6-pnp-extend-resource-limits.patch 
Log Message:
* Tue Apr 01 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.4-67
- Fix ISAPnP device resource limits so they match the spec.
- Extend the PnP memory resource limit to 24.


linux-2.6-isapnp-fix-limits.patch:

--- NEW FILE linux-2.6-isapnp-fix-limits.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=245073f0b3a8b8b626f3222dacb483695bf46419
Commit:     245073f0b3a8b8b626f3222dacb483695bf46419
Parent:     a57543376c99e4d074516c5bf23c7ddc1dc613a0
Author:     Bjorn Helgaas <bjorn.helgaas at hp.com>
AuthorDate: Fri Mar 21 12:08:37 2008 -0600
Committer:  Linus Torvalds <torvalds at linux-foundation.org>
CommitDate: Sat Mar 22 17:00:03 2008 -0700

    ISAPNP: fix limits of logical device register set
    
    PNP_MAX_MEM and PNP_MAX_PORT are mainly used to size tables of PNP
    device resources.  In 2.6.24, we increased their values to accomodate
    ACPI devices that have many resources:
    
                     2.6.23    2.6.24
                     ------    ------
      PNP_MAX_MEM       4         12
      PNP_MAX_PORT      8         40
    
    However, ISAPNP also used these constants as the size of parts of the
    logical device register set.  This register set is fixed by hardware,
    so increasing the constants meant that we were reading and writing
    unintended parts of the register set.
    
    This patch changes ISAPNP to use the correct register set sizes (the
    same values we used prior to 2.6.24).
    
    Signed-off-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 drivers/pnp/isapnp/core.c |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index 2c925b7..257f5d8 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -88,6 +88,15 @@ MODULE_LICENSE("GPL");
 #define _LTAG_MEM32RANGE	0x85
 #define _LTAG_FIXEDMEM32RANGE	0x86
 
+/*
+ * Sizes of ISAPNP logical device configuration register sets.
+ * See PNP-ISA-v1.0a.pdf, Appendix A.
+ */
+#define ISAPNP_MAX_MEM		4
+#define ISAPNP_MAX_PORT		8
+#define ISAPNP_MAX_IRQ		2
+#define ISAPNP_MAX_DMA		2
+
 static unsigned char isapnp_checksum_value;
 static DEFINE_MUTEX(isapnp_cfg_mutex);
 static int isapnp_csn_count;
@@ -945,14 +954,14 @@ static int isapnp_read_resources(struct pnp_dev *dev,
 
 	dev->active = isapnp_read_byte(ISAPNP_CFG_ACTIVATE);
 	if (dev->active) {
-		for (tmp = 0; tmp < PNP_MAX_PORT; tmp++) {
+		for (tmp = 0; tmp < ISAPNP_MAX_PORT; tmp++) {
 			ret = isapnp_read_word(ISAPNP_CFG_PORT + (tmp << 1));
 			if (!ret)
 				continue;
 			res->port_resource[tmp].start = ret;
 			res->port_resource[tmp].flags = IORESOURCE_IO;
 		}
-		for (tmp = 0; tmp < PNP_MAX_MEM; tmp++) {
+		for (tmp = 0; tmp < ISAPNP_MAX_MEM; tmp++) {
 			ret =
 			    isapnp_read_word(ISAPNP_CFG_MEM + (tmp << 3)) << 8;
 			if (!ret)
@@ -960,7 +969,7 @@ static int isapnp_read_resources(struct pnp_dev *dev,
 			res->mem_resource[tmp].start = ret;
 			res->mem_resource[tmp].flags = IORESOURCE_MEM;
 		}
-		for (tmp = 0; tmp < PNP_MAX_IRQ; tmp++) {
+		for (tmp = 0; tmp < ISAPNP_MAX_IRQ; tmp++) {
 			ret =
 			    (isapnp_read_word(ISAPNP_CFG_IRQ + (tmp << 1)) >>
 			     8);
@@ -970,7 +979,7 @@ static int isapnp_read_resources(struct pnp_dev *dev,
 			    res->irq_resource[tmp].end = ret;
 			res->irq_resource[tmp].flags = IORESOURCE_IRQ;
 		}
-		for (tmp = 0; tmp < PNP_MAX_DMA; tmp++) {
+		for (tmp = 0; tmp < ISAPNP_MAX_DMA; tmp++) {
 			ret = isapnp_read_byte(ISAPNP_CFG_DMA + tmp);
 			if (ret == 4)
 				continue;
@@ -1002,14 +1011,14 @@ static int isapnp_set_resources(struct pnp_dev *dev,
 	isapnp_cfg_begin(dev->card->number, dev->number);
 	dev->active = 1;
 	for (tmp = 0;
-	     tmp < PNP_MAX_PORT
+	     tmp < ISAPNP_MAX_PORT
 	     && (res->port_resource[tmp].
 		 flags & (IORESOURCE_IO | IORESOURCE_UNSET)) == IORESOURCE_IO;
 	     tmp++)
 		isapnp_write_word(ISAPNP_CFG_PORT + (tmp << 1),
 				  res->port_resource[tmp].start);
 	for (tmp = 0;
-	     tmp < PNP_MAX_IRQ
+	     tmp < ISAPNP_MAX_IRQ
 	     && (res->irq_resource[tmp].
 		 flags & (IORESOURCE_IRQ | IORESOURCE_UNSET)) == IORESOURCE_IRQ;
 	     tmp++) {
@@ -1019,14 +1028,14 @@ static int isapnp_set_resources(struct pnp_dev *dev,
 		isapnp_write_byte(ISAPNP_CFG_IRQ + (tmp << 1), irq);
 	}
 	for (tmp = 0;
-	     tmp < PNP_MAX_DMA
+	     tmp < ISAPNP_MAX_DMA
 	     && (res->dma_resource[tmp].
 		 flags & (IORESOURCE_DMA | IORESOURCE_UNSET)) == IORESOURCE_DMA;
 	     tmp++)
 		isapnp_write_byte(ISAPNP_CFG_DMA + tmp,
 				  res->dma_resource[tmp].start);
 	for (tmp = 0;
-	     tmp < PNP_MAX_MEM
+	     tmp < ISAPNP_MAX_MEM
 	     && (res->mem_resource[tmp].
 		 flags & (IORESOURCE_MEM | IORESOURCE_UNSET)) == IORESOURCE_MEM;
 	     tmp++)


linux-2.6-pnp-extend-resource-limits.patch:

--- NEW FILE linux-2.6-pnp-extend-resource-limits.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=03c086a747d0b242878eb881971ec61c1555869d
Commit:     03c086a747d0b242878eb881971ec61c1555869d
Parent:     245073f0b3a8b8b626f3222dacb483695bf46419
Author:     Darren Salt <linux at youmustbejoking.demon.co.uk>
AuthorDate: Thu Mar 13 15:35:49 2008 +0000
Committer:  Linus Torvalds <torvalds at linux-foundation.org>
CommitDate: Sat Mar 22 17:00:57 2008 -0700

    PNP: increase the number of PnP memory resources from 12 to 24
    
    Increase the number of PnP memory resources from 12 to 24.
    
    This removes an "exceeded the max num of mem resources" warning on boot. I
    also noticed the reservation of two more iomem ranges on the computer on
    which this was tested.
    
    Signed-off-by: Darren Salt <linux at youmustbejoking.demon.co.uk>
    Signed-off-by: Ingo Molnar <mingo at elte.hu>
    Acked-by: Bjorn Helgaas <bjorn.helgaas at hp.com>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 include/linux/pnp.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index cd6332b..29dd558 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -14,7 +14,7 @@
 #include <linux/mod_devicetable.h>
 
 #define PNP_MAX_PORT		40
-#define PNP_MAX_MEM		12
+#define PNP_MAX_MEM		24
 #define PNP_MAX_IRQ		2
 #define PNP_MAX_DMA		2
 #define PNP_NAME_LEN		50



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.412
retrieving revision 1.413
diff -u -r1.412 -r1.413
--- kernel.spec	31 Mar 2008 21:26:23 -0000	1.412
+++ kernel.spec	1 Apr 2008 15:58:29 -0000	1.413
@@ -632,6 +632,8 @@
 Patch380: linux-2.6-pci-keep-SMBus-hidden-on-nx6110.patch
 Patch381: linux-2.6-pci-remove-default-pci-rom-allocation.patch
 Patch382: linux-2.6-pci-revert-remove-transparent-bridge-resizing.patch
+Patch383: linux-2.6-isapnp-fix-limits.patch
+Patch384: linux-2.6-pnp-extend-resource-limits.patch
 
 Patch400: linux-2.6-scsi-cpqarray-set-master.patch
 Patch402: linux-2.6-scsi-mpt-vmware-fix.patch
@@ -1191,6 +1193,10 @@
 ApplyPatch linux-2.6-pci-revert-remove-transparent-bridge-resizing.patch
 # make "pci=rom" work as documented: don't assign addresses to every rom by default
 ApplyPatch linux-2.6-pci-remove-default-pci-rom-allocation.patch
+# fix resource limits for isapnp devices
+ApplyPatch linux-2.6-isapnp-fix-limits.patch
+# extend memory resource limit for pnp devices
+ApplyPatch linux-2.6-pnp-extend-resource-limits.patch
 
 #
 # SCSI Bits.
@@ -1992,6 +1998,10 @@
 
 
 %changelog
+* Tue Apr 01 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.4-67
+- Fix ISAPnP device resource limits so they match the spec.
+- Extend the PnP memory resource limit to 24.
+
 * Mon Mar 31 2008 Jarod Wilson <jwilson at redhat.com> 2.6.24.4-66
 - Patch up paranoid iret cs reg corruption crasher on x86_64 (#431314)
 




More information about the fedora-extras-commits mailing list