linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] fix the pci device malfunction if a wrong bus address is assigned by firmware
@ 2013-05-14 13:07 Kevin Hao
  2013-05-14 13:07 ` [PATCH 1/2] PCI: make pcibios_bus_to_resource return either success or failure Kevin Hao
  2013-05-14 13:07 ` [PATCH 2/2] PCI: unset the resource if we can't get the correct CPU address Kevin Hao
  0 siblings, 2 replies; 12+ messages in thread
From: Kevin Hao @ 2013-05-14 13:07 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci

On a fsl p2020rdb-pc board, the onboard pci device is assigned the bus address
0xa0000000 by firmware. But the kernel allocate the cpu address 0xa0000000 ~ 0xbfffffff
to this PCIe controller and use 0xe0000000 ~ 0xdfffffff as its bus address.
In this case the kernel would think that the bus address in this pci device
is correct and leave it unchanged. Then causes this device not work.

Even though this looks like a mismatch of the address space between firmware
and kernel. I think we should detect this kind of error and fix it automatically
if we don't want just to probe only (PCI_PROBE_ONLY is not set).

Kevin Hao (2):
  PCI: make pcibios_bus_to_resource return either success or failure
  PCI: unset the resource if we can't get the correct CPU address

 drivers/pci/host-bridge.c | 5 ++++-
 drivers/pci/probe.c       | 9 ++++++---
 include/linux/pci.h       | 2 +-
 3 files changed, 11 insertions(+), 5 deletions(-)

-- 
1.8.1.4


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

end of thread, other threads:[~2013-05-25 11:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14 13:07 [PATCH 0/2] fix the pci device malfunction if a wrong bus address is assigned by firmware Kevin Hao
2013-05-14 13:07 ` [PATCH 1/2] PCI: make pcibios_bus_to_resource return either success or failure Kevin Hao
2013-05-14 13:07 ` [PATCH 2/2] PCI: unset the resource if we can't get the correct CPU address Kevin Hao
2013-05-16 16:18   ` Liu Jiang
2013-05-17  2:11     ` Kevin Hao
2013-05-17 14:51       ` Liu Jiang
2013-05-19  2:24         ` Kevin Hao
2013-05-20 15:27           ` Liu Jiang
2013-05-23 20:22           ` Bjorn Helgaas
2013-05-24  2:54             ` Kevin Hao
2013-05-24 17:13               ` Bjorn Helgaas
2013-05-25 11:17                 ` Kevin Hao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).