patch-2.4.0-test7 linux/drivers/pci/setup-res.c
Next file: linux/drivers/pcmcia/cs.c
Previous file: linux/drivers/pci/proc.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Thu Aug 10 15:19:40 2000
- Orig file:
v2.4.0-test6/linux/drivers/pci/setup-res.c
- Orig date:
Wed Aug 9 19:19:50 2000
diff -u --recursive --new-file v2.4.0-test6/linux/drivers/pci/setup-res.c linux/drivers/pci/setup-res.c
@@ -60,7 +60,8 @@
struct resource *res,
unsigned long size,
unsigned long min,
- unsigned int type_mask)
+ unsigned int type_mask,
+ int resno)
{
int i;
@@ -83,7 +84,7 @@
continue;
/* Update PCI config space. */
- pcibios_update_resource(dev, r, res, i);
+ pcibios_update_resource(dev, r, res, resno);
return 0;
}
return -EBUSY;
@@ -100,14 +101,14 @@
min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
/* First, try exact prefetching match.. */
- if (pci_assign_bus_resource(bus, dev, res, size, min, IORESOURCE_PREFETCH) < 0) {
+ if (pci_assign_bus_resource(bus, dev, res, size, min, IORESOURCE_PREFETCH, i) < 0) {
/*
* That failed.
*
* But a prefetching area can handle a non-prefetching
* window (it will just not perform as well).
*/
- if (!(res->flags & IORESOURCE_PREFETCH) || pci_assign_bus_resource(bus, dev, res, size, min, 0) < 0) {
+ if (!(res->flags & IORESOURCE_PREFETCH) || pci_assign_bus_resource(bus, dev, res, size, min, 0, i) < 0) {
printk(KERN_ERR "PCI: Failed to allocate resource %d for %s\n", i, dev->name);
return -EBUSY;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)