Re: [PATCH] [3/3] PCI segment support

Ivan Kokshaysky
2003-04-08T16:27:36Z

On Tue, Apr 08, 2003 at 12:44:11AM +0100, Matthew Wilcox wrote:
> - Add segment to pci_bus.
> - Change the sysfs name of each device to include a 16-bit segment ID.

First of all, the "segment" name is extremely misleading. PCI spec
assumes everywhere that "segment" is a group of devices sitting
on the same wires (ie primary and secondary buses of the PCI-to-PCI
bridge are *different* segments).
Let's call it "configuration space domain" instead.

Second, why not

- strcpy(dev->dev.bus_id,dev->slot_name);
+ sprintf(dev->dev.bus_id, "%04x:%s", pci_controller_num(dev),
+ dev->slot_name);

?

Ivan.