Thread (60 messages) 60 messages, 8 authors, 2007-08-06

Re: [PATCH] mark PCI resource with start 0 as unassigned

From: Sergei Shtylyov <hidden>
Date: 2006-12-04 12:45:38
Also in: linux-ide

Hello.

Olaf Hering wrote:
mark pci resources with start 0 as unassigned
libata calls pci_request_regions to claim bar 0 - 5
bar 5 has base 0.
Tested on a p630 in SMP mode with pata_sl82c105
[...]
quoted hunk ↗ jump to hunk
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -1234,6 +1234,14 @@ static void __devinit fixup_resource(str
 	struct pci_controller *hose = pci_bus_to_host(dev->bus);
 	unsigned long start, end, mask, offset;
 
+	/*
+	 * tell the core code that this ressource is unassigned
+	 * fixes p630 winbond IDE with libata
+	 */
+	if (res->start == 0) {
+		res->flags = 0;
     Wouldn't it be better to set flags to IORESOURCE_UNSET to get it reassigned?
+		return;
+	}
 	if (res->flags & IORESOURCE_IO) {
 		offset = (unsigned long)hose->io_base_virt - pci_io_base;
WBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help