lkml.org 
[lkml]   [2015]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 16/49] PCI: Check if resource is allocated before pci_assign
Date
Skip allocated resource in the list, as pci_assign_resource()
only can handle not assigned resource. And we could have
assigned resource already in the list before alt_size trying.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/setup-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 1b5fbca..1622ad2 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -386,7 +386,7 @@ static void assign_requested_resources_sorted(struct list_head *head,
list_for_each_entry(dev_res, head, list) {
res = dev_res->res;
idx = res - &dev_res->dev->resource[0];
- if (resource_size(res) &&
+ if (!res->parent && resource_size(res) &&
pci_assign_resource(dev_res->dev, idx)) {
if (fail_head)
add_to_list(fail_head, dev_res->dev, res);
--
1.8.4.5


\
 
 \ /
  Last update: 2015-07-15 01:01    [W:0.226 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site