Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH] SERIAL: discover PNP ports before PCI, etc
@ 2005-02-09 20:12 Bjorn Helgaas
  2005-02-10  2:16 ` Adam Belay
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2005-02-09 20:12 UTC (permalink / raw)
  To: rmk+serial; +Cc: linux-serial, shaohua.li, ambx1

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.)

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

===== drivers/serial/Makefile 1.42 vs edited =====
--- 1.42/drivers/serial/Makefile	2005-02-03 07:42:40 -07:00
+++ edited/drivers/serial/Makefile	2005-02-09 12:58:23 -07:00
@@ -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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] SERIAL: discover PNP ports before PCI, etc
  2005-02-09 20:12 [PATCH] SERIAL: discover PNP ports before PCI, etc Bjorn Helgaas
@ 2005-02-10  2:16 ` Adam Belay
  2005-02-10 16:43   ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Belay @ 2005-02-10  2:16 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: rmk+serial, linux-serial, shaohua.li

On Wed, Feb 09, 2005 at 01:12:47PM -0700, Bjorn Helgaas wrote:
> 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.)
> 
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
>

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] SERIAL: discover PNP ports before PCI, etc
  2005-02-10  2:16 ` Adam Belay
@ 2005-02-10 16:43   ` Bjorn Helgaas
       [not found]     ` <20050210173725.GA380@neo.rr.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2005-02-10 16:43 UTC (permalink / raw)
  To: Adam Belay; +Cc: rmk+serial, linux-serial, shaohua.li

On Wed, 2005-02-09 at 21:16 -0500, Adam Belay wrote:
> On Wed, Feb 09, 2005 at 01:12:47PM -0700, Bjorn Helgaas wrote:
> > 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.)
> > 
> > Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>>
> 
> 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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] SERIAL: discover PNP ports before PCI, etc
       [not found]     ` <20050210173725.GA380@neo.rr.com>
@ 2005-02-10 17:49       ` Bjorn Helgaas
  2005-02-10 18:39         ` Russell King
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2005-02-10 17:49 UTC (permalink / raw)
  To: Adam Belay; +Cc: rmk+serial, linux-serial, shaohua.li

On Thu, 2005-02-10 at 12:37 -0500, Adam Belay wrote:
> > 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 reserved
> 
> The "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).

> > 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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] SERIAL: discover PNP ports before PCI, etc
  2005-02-10 17:49       ` Bjorn Helgaas
@ 2005-02-10 18:39         ` Russell King
  0 siblings, 0 replies; 5+ messages in thread
From: Russell King @ 2005-02-10 18:39 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Adam Belay, linux-serial, shaohua.li

On Thu, Feb 10, 2005 at 10:49:22AM -0700, Bjorn Helgaas wrote:
> On Thu, 2005-02-10 at 12:37 -0500, Adam Belay wrote:
> > 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)

-- 
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-02-10 18:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-09 20:12 [PATCH] SERIAL: discover PNP ports before PCI, etc Bjorn Helgaas
2005-02-10  2:16 ` Adam Belay
2005-02-10 16:43   ` Bjorn Helgaas
     [not found]     ` <20050210173725.GA380@neo.rr.com>
2005-02-10 17:49       ` Bjorn Helgaas
2005-02-10 18:39         ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox