Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6578
b: refs/heads/master
c: 81d4af1
h: refs/heads/master
v: v3
  • Loading branch information
Ivan Kokshaysky authored and Linus Torvalds committed Aug 30, 2005
1 parent d9fa5dd commit 915bccc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 36 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae11be6f37dfa140b6c2d1a53b307ef57da69a04
refs/heads/master: 81d4af1340badcd2100c84fbd1bfd13156de41aa
1 change: 0 additions & 1 deletion trunk/arch/i386/pci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ static int __init pcibios_init(void)
if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT))
pcibios_sort();
#endif
pci_assign_unassigned_resources();
return 0;
}

Expand Down
49 changes: 16 additions & 33 deletions trunk/arch/i386/pci/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,43 +170,26 @@ static void __init pcibios_allocate_resources(int pass)
static int __init pcibios_assign_resources(void)
{
struct pci_dev *dev = NULL;
int idx;
struct resource *r;

for_each_pci_dev(dev) {
int class = dev->class >> 8;

/* Don't touch classless devices and host bridges */
if (!class || class == PCI_CLASS_BRIDGE_HOST)
continue;

for(idx=0; idx<6; idx++) {
r = &dev->resource[idx];

/*
* Don't touch IDE controllers and I/O ports of video cards!
*/
if ((class == PCI_CLASS_STORAGE_IDE && idx < 4) ||
(class == PCI_CLASS_DISPLAY_VGA && (r->flags & IORESOURCE_IO)))
continue;

/*
* We shall assign a new address to this resource, either because
* the BIOS forgot to do so or because we have decided the old
* address was unusable for some reason.
*/
if (!r->start && r->end)
pci_assign_resource(dev, idx);
}
struct resource *r, *pr;

if (pci_probe & PCI_ASSIGN_ROMS) {
if (!(pci_probe & PCI_ASSIGN_ROMS)) {
/* Try to use BIOS settings for ROMs, otherwise let
pci_assign_unassigned_resources() allocate the new
addresses. */
for_each_pci_dev(dev) {
r = &dev->resource[PCI_ROM_RESOURCE];
r->end -= r->start;
r->start = 0;
if (r->end)
pci_assign_resource(dev, PCI_ROM_RESOURCE);
if (!r->flags || !r->start)
continue;
pr = pci_find_parent_resource(dev, r);
if (!pr || request_resource(pr, r) < 0) {
r->end -= r->start;
r->start = 0;
}
}
}

pci_assign_unassigned_resources();

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* FIXME: IO should be max 256 bytes. However, since we may
* have a P2P bridge below a cardbus bridge, we need 4K.
*/
#define CARDBUS_IO_SIZE (256)
#define CARDBUS_IO_SIZE (4*1024)
#define CARDBUS_MEM_SIZE (32*1024*1024)

static void __devinit
Expand Down

0 comments on commit 915bccc

Please sign in to comment.