SERIAL: discover PNP ports before PCI, etc
PATCH 1/1 SERIAL: discover PNP ports before PCI, etc
PNP ports tend to be built-in, and discovering them after PCI ports means the names of the built-in ports can change if you add or remove PCI ports.
(And yes, we should look at getting rid of 8250_acpi.c now that we have PNPACPI, but that's for another patch.)
===== drivers/serial/Makefile 1.42 vs edited =====
drivers/serial/Makefile +1 -1
@@ -6,9 +6,9 @@ serial-8250-y := serial-8250-$(CONFIG_SERIAL_8250_ACPI) += 8250_acpi.o +serial-8250-$(CONFIG_PNP) += 8250_pnp.o serial-8250-$(CONFIG_GSC) += 8250_gsc.o serial-8250-$(CONFIG_PCI) += 8250_pci.o -serial-8250-$(CONFIG_PNP) += 8250_pnp.o serial-8250-$(CONFIG_HP300) += 8250_hp300.o obj-$(CONFIG_SERIAL_CORE) += serial_core.o
Quoted 9 lines · Bjorn Helgaas
PNP ports tend to be built-in, and discovering them after PCI ports means the names of the built-in ports can change if you add or remove PCI ports.
(And yes, we should look at getting rid of
8250_acpi.cnow that we have PNPACPI, but that's for another patch.)Signed-off-by Bjorn Helgaas <[email protected]>
I think this used to be the old behavior. It was changed because some of the resources reserved by pnp would also be reserved by pci, causing pci to fail. We should see if this is still the case.
Thanks,
Adam
Quoted 5 lines · Adam Belay
Quoted 4 lines · Bjorn Helgaas
PNP ports tend to be built-in, and discovering them after PCI ports means the names of the built-in ports can change if you add or remove PCI ports.
Quoted 8 lines
Quoted 4 lines
(And yes, we should look at getting rid of
8250_acpi.cnow that we have PNPACPI, but that's for another patch.)Signed-off-by Bjorn Helgaas <[email protected]>>I think this used to be the old behavior. It was changed because some of the resources reserved by pnp would also be reserved by pci, causing pci to fail. We should see if this is still the case.
That must be before the 2.5 series ... Everything in the BK history (which admittedly only goes back to 7/21/2002) has PCI before PNP.
Wouldn't it be a bug if PNP described a resource that can be discovered by standard PCI discovery?
I think we should move PNP before PCI and fix whatever resource problems crop up.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Adam Belay
Quoted 2 lines
Wouldn't it be a bug if PNP described a resource that can be discovered by standard PCI discovery?
Maybe. It's usually one of these:
pnp: 00:09: ioport range 0x4d0-0x4d1 has been reserved
pnp: 00:09: ioport range 0xcf8-0xcff could not be reserved
pnp: 00:0b: ioport range 0x800-0x87f has been reservedThe "could not be reserved" was touched by pci. From memory, I think it's the pci configuration range.
Right. 0xcf8-0xcff is reserved in pci_direct_init(), which is part of the arch PCI core, not part of a driver. So I don't think the 8250 PCI/PNP order should make a difference for this particular range (the arch PCI init happens long before either 8250 PCI or PNP claim).
Quoted 5 lines
Quoted 2 lines
I think we should move PNP before PCI and fix whatever resource problems crop up.
We could always add this change to -mm and see what effect it has. Let me know if you still think this makes sense.
Yeah, I think that's Russell's plan, which I think is the right one.
Quoted 5 lines · Bjorn Helgaas
Quoted 2 lines · Adam Belay
We could always add this change to -mm and see what effect it has. Let me know if you still think this makes sense.
Yeah, I think that's Russell's plan, which I think is the right one.
And I notice that Andrew released a new -mm with the change in. Let the testing commence! 8)
Signature · 4 lines
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core