Lines 156-161
static int __pci_assign_resource(struct pci_bus *bus, struct pci_dev *dev,
Link Here
|
156 |
pcibios_align_resource, dev); |
156 |
pcibios_align_resource, dev); |
157 |
} |
157 |
} |
158 |
|
158 |
|
|
|
159 |
if (ret < 0 && dev->bios_addr[resno]) { |
160 |
struct resource *root, *conflict; |
161 |
resource_size_t start, end; |
162 |
|
163 |
if (res->flags & IORESOURCE_IO) |
164 |
root = &ioport_resource; |
165 |
else |
166 |
root = &iomem_resource; |
167 |
|
168 |
start = res->start; |
169 |
end = res->end; |
170 |
res->start = dev->bios_addr[resno]; |
171 |
res->end = res->start + size; |
172 |
conflict = request_resource_conflict(root, res); |
173 |
if (conflict) { |
174 |
dev_info(&dev->dev, |
175 |
"BAR %d: firmware assignment %pR conflicts " |
176 |
"with %s %pR\n", resno, res, |
177 |
conflict->name, conflict); |
178 |
res->start = start; |
179 |
res->end = end; |
180 |
} else { |
181 |
dev_info(&dev->dev, |
182 |
"BAR %d: trying firmware assignment %pR\n", |
183 |
resno, res); |
184 |
ret = 0; |
185 |
} |
186 |
} |
187 |
|
159 |
if (!ret) { |
188 |
if (!ret) { |
160 |
res->flags &= ~IORESOURCE_STARTALIGN; |
189 |
res->flags &= ~IORESOURCE_STARTALIGN; |
161 |
dev_info(&dev->dev, "BAR %d: assigned %pR\n", resno, res); |
190 |
dev_info(&dev->dev, "BAR %d: assigned %pR\n", resno, res); |