Re: [RFC][PATCH] Add PCI<->PCI bridge driver [4/9]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 14, 2005 at 04:55:19AM -0400, Adam Belay wrote:
> This patch adds a basic PCI<->PCI bridge driver that utilizes the new
> PCI bus class API.

Thanks.  I think this breaks Cardbus.

The whole point of the way PCI is _presently_ organised is that it allows
busses to be configured and setup _before_ the devices are made available
to drivers.  This breaks that completely:

> +/**
> + * ppb_detect_children - detects and registers child devices
> + * @bus: pci bus
> + */
> +static void ppb_detect_children(struct pci_bus *bus)
> +{
> +	unsigned int devfn;
> +
> +	/* Go find them, Rover! */
> +	for (devfn = 0; devfn < 0x100; devfn += 8)
> +		pci_scan_slot(bus, devfn);
> +
> +	pcibios_fixup_bus(bus);
> +	pci_bus_add_devices(bus);
> +}

since we scan the bus, and immediately make all devices available.

This is broken, plain and simple.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux