* Re: linux pnp bug - report [not found] ` <1272655284.3607.6.camel@goldenfish.development.local> @ 2010-05-01 4:03 ` Bjorn Helgaas 2010-05-02 17:51 ` Pavel Kysilka 0 siblings, 1 reply; 3+ messages in thread From: Bjorn Helgaas @ 2010-05-01 4:03 UTC (permalink / raw) To: Pavel Kysilka; +Cc: linux-acpi Pavel wrote: > i am playing with old PIII computer (HP Vectra VE) and ISA soundcards. > Soundcars are PNP(yamaha,opti,ess,...) and no PNP (multisound). > Machine > is old, but ACPI compilant - old BIOS. > > Computer booting OK. PNP0 devices allocate resources OK, but PNP1 > devices (one ISA slot) not. PNP soundcard driver is not correctly > loaded > - soundcard device not created. I think this is a regression, i.e., 2.6.33 worked, but 2.6.34-rc6 does not. Right? Even worse, I think it's my fault :-( If this is a regression, we should open a bugzilla at http://bugzilla.kernel.org and assign it to me. Here's the problem (I think): pnp 00:01: parse allocated resources pnp 00:01: add [bus 00-ff flags 0x1000] pnp 00:01: add [io 0x0000-0x0cf7 flags 0x200101] pnp 00:01: Plug and Play ACPI device, IDs PNP0a03 (active) This PNP0a03 PCI host bridge has a window [io 0x0000-0x0cf7] that is forwarded to the PCI bridge. This is perfectly normal, but in 2.6.33, PNPACPI ignored that window, so it didn't appear as a PNP resource of the bridge. cmi8330 01:01.00: pnp_assign_resources, try dependent set 0 cmi8330 01:01.00: trying to assign [??? 0x00000530-0x00000537 flags 0x40000001] cmi8330 01:01.00: check whether [??? 0x00000530-0x00000537 flags 0x40000001] is available cmi8330 01:01.00: conflict with 00:01 resource 1 [io 0x0000-0x0cf7 flags 0x200101] cmi8330 01:01.00: couldn't assign io 0 (min 0x530 max 0x530) Now we come along and try to assign [io 0x0530-0x0537] to the cmi8330 device. The last piece of pnp_check_port() checks it against all resources of other PNP devices, including the PNP0a03 host bridge window. We should ignore windows, because the bridge doesn't *consume* that range, it only *forwards* it, so it's still available for devices to use. I'd like to rework PNP resource management to make it more similar to PCI's, or even integrate them somehow. But we only have time for the most minimal fix for 2.6.34. Can you try the patch below, please? Bjorn diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 2e54e6a..e3446ab 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c @@ -211,6 +211,8 @@ int pnp_check_port(struct pnp_dev *dev, struct resource *res) if (tres->flags & IORESOURCE_IO) { if (cannot_compare(tres->flags)) continue; + if (tres->flags & IORESOURCE_WINDOW) + continue; tport = &tres->start; tend = &tres->end; if (ranged_conflict(port, end, tport, tend)) @@ -271,6 +273,8 @@ int pnp_check_mem(struct pnp_dev *dev, struct resource *res) if (tres->flags & IORESOURCE_MEM) { if (cannot_compare(tres->flags)) continue; + if (tres->flags & IORESOURCE_WINDOW) + continue; taddr = &tres->start; tend = &tres->end; if (ranged_conflict(addr, end, taddr, tend)) ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: linux pnp bug - report 2010-05-01 4:03 ` linux pnp bug - report Bjorn Helgaas @ 2010-05-02 17:51 ` Pavel Kysilka 2010-05-03 16:08 ` Bjorn Helgaas 0 siblings, 1 reply; 3+ messages in thread From: Pavel Kysilka @ 2010-05-02 17:51 UTC (permalink / raw) To: Bjorn Helgaas; +Cc: linux-acpi [-- Attachment #1: Type: text/plain, Size: 3161 bytes --] On Fri, 2010-04-30 at 22:03 -0600, Bjorn Helgaas wrote: > Pavel wrote: > > i am playing with old PIII computer (HP Vectra VE) and ISA soundcards. > > Soundcars are PNP(yamaha,opti,ess,...) and no PNP (multisound). > > Machine > > is old, but ACPI compilant - old BIOS. > > > > Computer booting OK. PNP0 devices allocate resources OK, but PNP1 > > devices (one ISA slot) not. PNP soundcard driver is not correctly > > loaded > > - soundcard device not created. > > I think this is a regression, i.e., 2.6.33 worked, but 2.6.34-rc6 does > not. Right? Even worse, I think it's my fault :-( If this is a > regression, we should open a bugzilla at http://bugzilla.kernel.org and > assign it to me. 2.6.33 kernel working without problem. > > Here's the problem (I think): > > pnp 00:01: parse allocated resources > pnp 00:01: add [bus 00-ff flags 0x1000] > pnp 00:01: add [io 0x0000-0x0cf7 flags 0x200101] > pnp 00:01: Plug and Play ACPI device, IDs PNP0a03 (active) > > This PNP0a03 PCI host bridge has a window [io 0x0000-0x0cf7] that is > forwarded to the PCI bridge. This is perfectly normal, but in 2.6.33, > PNPACPI ignored that window, so it didn't appear as a PNP resource of > the bridge. > > cmi8330 01:01.00: pnp_assign_resources, try dependent set 0 > cmi8330 01:01.00: trying to assign [??? 0x00000530-0x00000537 flags 0x40000001] > cmi8330 01:01.00: check whether [??? 0x00000530-0x00000537 flags 0x40000001] is available > cmi8330 01:01.00: conflict with 00:01 resource 1 [io 0x0000-0x0cf7 flags 0x200101] > cmi8330 01:01.00: couldn't assign io 0 (min 0x530 max 0x530) > > Now we come along and try to assign [io 0x0530-0x0537] to the cmi8330 > device. The last piece of pnp_check_port() checks it against all > resources of other PNP devices, including the PNP0a03 host bridge > window. We should ignore windows, because the bridge doesn't *consume* > that range, it only *forwards* it, so it's still available for devices > to use. > > I'd like to rework PNP resource management to make it more similar to > PCI's, or even integrate them somehow. But we only have time for the > most minimal fix for 2.6.34. Can you try the patch below, please? Yes, with your patch is soundcard working. More in attachment. > > Bjorn Pavel > > > diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c > index 2e54e6a..e3446ab 100644 > --- a/drivers/pnp/resource.c > +++ b/drivers/pnp/resource.c > @@ -211,6 +211,8 @@ int pnp_check_port(struct pnp_dev *dev, struct resource *res) > if (tres->flags & IORESOURCE_IO) { > if (cannot_compare(tres->flags)) > continue; > + if (tres->flags & IORESOURCE_WINDOW) > + continue; > tport = &tres->start; > tend = &tres->end; > if (ranged_conflict(port, end, tport, tend)) > @@ -271,6 +273,8 @@ int pnp_check_mem(struct pnp_dev *dev, struct resource *res) > if (tres->flags & IORESOURCE_MEM) { > if (cannot_compare(tres->flags)) > continue; > + if (tres->flags & IORESOURCE_WINDOW) > + continue; > taddr = &tres->start; > tend = &tres->end; > if (ranged_conflict(addr, end, taddr, tend)) > > [-- Attachment #2: dmesg.gz --] [-- Type: application/x-gzip, Size: 10136 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux pnp bug - report 2010-05-02 17:51 ` Pavel Kysilka @ 2010-05-03 16:08 ` Bjorn Helgaas 0 siblings, 0 replies; 3+ messages in thread From: Bjorn Helgaas @ 2010-05-03 16:08 UTC (permalink / raw) To: goldenfish; +Cc: linux-acpi On Sunday 02 May 2010 11:51:05 am Pavel Kysilka wrote: > On Fri, 2010-04-30 at 22:03 -0600, Bjorn Helgaas wrote: > > Pavel wrote: > > > i am playing with old PIII computer (HP Vectra VE) and ISA soundcards. > > > Soundcars are PNP(yamaha,opti,ess,...) and no PNP (multisound). > > > Machine > > > is old, but ACPI compilant - old BIOS. > > > > > > Computer booting OK. PNP0 devices allocate resources OK, but PNP1 > > > devices (one ISA slot) not. PNP soundcard driver is not correctly > > > loaded > > > - soundcard device not created. > > > > I think this is a regression, i.e., 2.6.33 worked, but 2.6.34-rc6 does > > not. Right? Even worse, I think it's my fault :-( If this is a > > regression, we should open a bugzilla at http://bugzilla.kernel.org and > > assign it to me. > 2.6.33 kernel working without problem. Thanks a lot for testing that patch! I will try to push that upstream before 2.6.34. Can you please collect the output of "lspci -vv"? I'd like to get a better idea of how we should handle PCI and PNP resources. Bjorn ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-03 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1269373637.3113.12.camel@goldenfish.development.local>
[not found] ` <201003251611.41000.bjorn.helgaas@hp.com>
[not found] ` <1269716956.2355.5.camel@goldenfish.development.local>
[not found] ` <201004281457.59128.bjorn.helgaas@hp.com>
[not found] ` <1272655284.3607.6.camel@goldenfish.development.local>
2010-05-01 4:03 ` linux pnp bug - report Bjorn Helgaas
2010-05-02 17:51 ` Pavel Kysilka
2010-05-03 16:08 ` Bjorn Helgaas
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.