Avoid assigning PCI resources from zero ad [...]
PATCH 1/1 Avoid assigning PCI resources from zero ad [...]
Hello list,
inside the automatic U-Boot patch tracking system a new ticket [DNX#2007011742000232] was created:
<snip>
Quoted 29 lines
If a PCI IDE card happens to get a zero address assigned to it, the Linux IDE
core complains and IDE drivers fails to work. Also, assigning zero to a BAR
was illegal according to PCI 2.1 (the later revisions seem to have excluded the
sentence about "0" being considered an invalid address) -- so, use a reasonable
starting value of0x1000(that's what the most Linux archs are using).Alternatively, one might have fixed the calls to
pci_set_region()individually
(some code even seems to have taken care of this issue) but that would have
been a lot more work. :-)Signed-off-by Sergei Shtylyov <[email protected]>drivers/pci_auto.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-)Index:
u-boot/drivers/pci_auto.c
===================================================================drivers/pci_auto.c +0
-0@@ -34,7 +34,12 @@void pciauto_region_init (struct pci_region * res) {
drivers/pci_auto.c line 45
Quoted 10 lines
drivers/pci_auto.c +6
-1- res->bus_lower = res->bus_start; +/* +* Avoid allocating PCI resources from address 0 -- this is illegal +* according to PCI 2.1 and moreover, this is known to cause Linux IDE +* drivers to fail. Use a reasonable starting value of 0x1000 instead. +*/ + res->bus_lower = res->bus_start ? res->bus_start :0x1000 ; }void pciauto_region_align (struct pci_region *res,unsigned long size)
</snip>
Your U-Boot support team
PATCH 1/1 Avoid assigning PCI resources from zero ad [...]
Hello.
Quoted 43 lines · OTRS Notification Master
inside the automatic U-Boot patch tracking system a new ticket [DNX#2007011742000232] was created:
<snip>
Quoted 38 lines
If a PCI IDE card happens to get a zero address assigned to it, the Linux IDE
core complains and IDE drivers fails to work. Also, assigning zero to a BAR
was illegal according to PCI 2.1 (the later revisions seem to have excluded the
sentence about "0" being considered an invalid address) -- so, use a reasonable
starting value of0x1000(that's what the most Linux archs are using).Alternatively, one might have fixed the calls to
pci_set_region()individually
(some code even seems to have taken care of this issue) but that would have
been a lot more work. :-)Signed-off-by Sergei Shtylyov <[email protected]>
drivers/pci_auto.c| 7 ++++++-1 files changed, 6 insertions(+), 1 deletion(-)Index:
u-boot/drivers/pci_auto.c
===================================================================drivers/pci_auto.c +6
-1@@ -34,7 +34,12 @@void pciauto_region_init (struct pci_region * res) { - res->bus_lower = res->bus_start; +/* +* Avoid allocating PCI resources from address 0 -- this is illegal +* according to PCI 2.1 and moreover, this is known to cause Linux IDE +* drivers to fail. Use a reasonable starting value of 0x1000 instead. +*/ + res->bus_lower = res->bus_start ? res->bus_start :0x1000 ; }
Quoted 1 line
drivers/pci_auto.c line 45
Quoted 1 line
drivers/pci_auto.c +0
-0void pciauto_region_align (struct pci_region *res,unsigned long size)
I wonder if this patch has ever been considered...
WBR, Sergei