Re: Ignore disabled ROM resources at setup

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

 



> pci_map_rom "sees" that the resource is unassigned by testing the parent
> pointer, and calls pci_assign_resource() which, with this new patch,
> will do nothing.

Ok, it won't do nothing in fact. It's worse. It will return 0 (success),
will actually assign a completely new address to the resource, will
update the resource structure ... and will _not_ update the PCI resource
BAR for the ROM.

That is very bad and definitely not what you want, wether it's ppc, x86
or anything else. Either fail (don't assign the resource at all) or if
you assign it, keep the BAR in sync with the struct resource.

Also, why do we re-allocate a new address for it ? It's been properly
allocated a non-conflicting address by the firmware ... That's a big
problem I have with our common code as well.
pci_assign_unassigned_resource() doesn't do what it claims: it will
re-assign all resources, not only the unassigned ones, at least as soon
as it spots a brige, and pci_assign_resource() here called by
pci_map_rom() will re-assign even if the address there was already
correct.

At this point, i'm not sure what the proper fix it.

Ben.


-
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