<br>This is mostly the same patch as before, but I separated it into two patches to make the changes easier to follow.<br><br>device/device.c:<br> Remove references to have_resources.<br> Remove read_resources from compute allocate resources.<br>
Split compute_allocate_resources into two<br> 1. compute_resource_needs<br> A. Traverse the tree depth first<br> B. Sum resources<br> C. Adjust limits and bases<br> D. Update bridge resources sizes<br>
2. assign_resource_values<br> A. Traverse the tree breadth first<br> B. Assign resource values<br><br>device/device_util.c:<br> Remove references to have_resources.<br><br>device/pci_device.c:<br> Remove saved values stubs (they're not needed now.)<br>
1. Sizing function restores values<br> Fix 64-bit flag masking.<br> Add an error message for an invalid value.<br> Update pci_record_bridge_resource:<br> 1. remove compute_allocate_resource call<br>
2. remove pci_set_resource call<br> Update pci_bus_read_resources to read children's too.<br> Update pci_set_resource:<br> 1. change logic for setting zero-size resources<br> A. Set range to [limit->limit-2^gran]<br>
(Could have been any range with base > limit)<br> 2. remove compute_allocate_resource calls<br> 3. Change phase4_assign_resources ->phase4_set_resources<br><br>device/pci_ops.c:<br> Change an error message to be more helpful.<br>
<br>device/root_device.c:<br> Remove code for read_resources and set resources.<br> Add a .id to the ops.<br><br>include/device/device.h:<br> Remove have_resources.<br> Comment out assign_resources. I think we could comment out more here.<br>
Add debugging function prototypes.<br> Change phase4_assign_resources to phase4_set_resources.<br><br>include/device/resource.h<br> Add a IORESOURCE_BRIDGE flag.<br><br>device/cardbus_device.c<br> Remove compute_allocate_resource call.<br>
Use probe_resource (doesn't die) instead of find_resource.<br><br>Signed-off-by: Myles Watson <<a href="mailto:mylesgw@gmail.com">mylesgw@gmail.com</a>><br><br>Thanks,<br>Myles<br><br><br>