patch-2.4.27 linux-2.4.27/drivers/hotplug/acpiphp_pci.c
Next file: linux-2.4.27/drivers/hotplug/acpiphp_res.c
Previous file: linux-2.4.27/drivers/hotplug/acpiphp_glue.c
Back to the patch index
Back to the overall index
- Lines: 48
- Date:
2004-08-07 16:26:04.737350188 -0700
- Orig file:
linux-2.4.26/drivers/hotplug/acpiphp_pci.c
- Orig date:
2003-11-28 10:26:20.000000000 -0800
diff -urN linux-2.4.26/drivers/hotplug/acpiphp_pci.c linux-2.4.27/drivers/hotplug/acpiphp_pci.c
@@ -29,11 +29,11 @@
*
*/
-#include <linux/config.h>
-#include <linux/kernel.h>
+#include <linux/init.h>
#include <linux/module.h>
+
+#include <linux/kernel.h>
#include <linux/pci.h>
-#include <linux/init.h>
#include "pci_hotplug.h"
#include "acpiphp.h"
@@ -78,8 +78,8 @@
if (bar & PCI_BASE_ADDRESS_SPACE_IO) {
/* This is IO */
- len = bar & 0xFFFFFFFC;
- len = ~len + 1;
+ len = bar & (PCI_BASE_ADDRESS_IO_MASK & 0xFFFF);
+ len = len & ~(len - 1);
dbg("len in IO %x, BAR %d\n", len, count);
@@ -340,8 +340,8 @@
if (len & PCI_BASE_ADDRESS_SPACE_IO) {
/* This is IO */
base = bar & 0xFFFFFFFC;
- len &= 0xFFFFFFFC;
- len = ~len + 1;
+ len = len & (PCI_BASE_ADDRESS_IO_MASK & 0xFFFF);
+ len = len & ~(len - 1);
dbg("BAR[%d] %08x - %08x (IO)\n", count, (u32)base, (u32)base + len - 1);
@@ -465,8 +465,8 @@
if (len & PCI_BASE_ADDRESS_SPACE_IO) {
/* This is IO */
base = bar & 0xFFFFFFFC;
- len &= 0xFFFFFFFC;
- len = ~len + 1;
+ len = len & (PCI_BASE_ADDRESS_IO_MASK & 0xFFFF);
+ len = len & ~(len - 1);
dbg("BAR[%d] %08x - %08x (IO)\n", count, (u32)base, (u32)base + len - 1);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)