1 Index: linux-2.6.27.y/drivers/pci/bus.c
2 ===================================================================
3 --- linux-2.6.27.y.orig/drivers/pci/bus.c
4 +++ linux-2.6.27.y/drivers/pci/bus.c
5 @@ -41,6 +41,7 @@ pci_bus_alloc_resource(struct pci_bus *b
9 + resource_size_t max = -1;
11 type_mask |= IORESOURCE_IO | IORESOURCE_MEM;
13 @@ -59,10 +60,15 @@ pci_bus_alloc_resource(struct pci_bus *b
14 !(res->flags & IORESOURCE_PREFETCH))
17 + /* Limit address to 32 bits when requested */
18 + if ((res->flags & IORESOURCE_MEM) &&
19 + (res->flags & IORESOURCE_PCI_32BIT))
22 /* Ok, try it out.. */
23 ret = allocate_resource(r, res, size,
30 Index: linux-2.6.27.y/drivers/pci/setup-bus.c
31 ===================================================================
32 --- linux-2.6.27.y.orig/drivers/pci/setup-bus.c
33 +++ linux-2.6.27.y/drivers/pci/setup-bus.c
34 @@ -433,19 +433,23 @@ static void pci_bus_size_cardbus(struct
35 * If we have prefetchable memory support, allocate
36 * two regions. Otherwise, allocate one region of
38 + * Avoid 64bit address space, as cardbus devices can't handle it.
40 if (ctrl & PCI_CB_BRIDGE_CTL_PREFETCH_MEM0) {
42 b_res[2].end = pci_cardbus_mem_size - 1;
43 - b_res[2].flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH | IORESOURCE_SIZEALIGN;
44 + b_res[2].flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH |
45 + IORESOURCE_SIZEALIGN | IORESOURCE_PCI_32BIT;
48 b_res[3].end = pci_cardbus_mem_size - 1;
49 - b_res[3].flags |= IORESOURCE_MEM | IORESOURCE_SIZEALIGN;
50 + b_res[3].flags |= IORESOURCE_MEM | IORESOURCE_SIZEALIGN |
51 + IORESOURCE_PCI_32BIT;
54 b_res[3].end = pci_cardbus_mem_size * 2 - 1;
55 - b_res[3].flags |= IORESOURCE_MEM | IORESOURCE_SIZEALIGN;
56 + b_res[3].flags |= IORESOURCE_MEM | IORESOURCE_SIZEALIGN |
57 + IORESOURCE_PCI_32BIT;
61 Index: linux-2.6.27.y/include/linux/ioport.h
62 ===================================================================
63 --- linux-2.6.27.y.orig/include/linux/ioport.h
64 +++ linux-2.6.27.y/include/linux/ioport.h
65 @@ -101,6 +101,7 @@ struct resource_list {
67 /* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */
68 #define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */
69 +#define IORESOURCE_PCI_32BIT (1<<5) /* Do not use 64bit address space (for cardbus devices) */
71 /* PC/ISA/whatever - the normal PC address spaces: IO and memory */
72 extern struct resource ioport_resource;