aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/hotplug/ibmphp_pci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
index 2335fac65fb4..8122fe734aa7 100644
--- a/drivers/pci/hotplug/ibmphp_pci.c
+++ b/drivers/pci/hotplug/ibmphp_pci.c
@@ -1308,10 +1308,10 @@ static int unconfigure_boot_device (u8 busno, u8 device, u8 function)
1308 /* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */ 1308 /* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */
1309 } else { 1309 } else {
1310 /* This is Memory */ 1310 /* This is Memory */
1311 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1312 if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) { 1311 if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) {
1313 /* pfmem */ 1312 /* pfmem */
1314 debug ("start address of pfmem is %x\n", start_address); 1313 debug ("start address of pfmem is %x\n", start_address);
1314 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1315 1315
1316 if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) { 1316 if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) {
1317 err ("cannot find corresponding PFMEM resource to remove\n"); 1317 err ("cannot find corresponding PFMEM resource to remove\n");
@@ -1325,6 +1325,8 @@ static int unconfigure_boot_device (u8 busno, u8 device, u8 function)
1325 } else { 1325 } else {
1326 /* regular memory */ 1326 /* regular memory */
1327 debug ("start address of mem is %x\n", start_address); 1327 debug ("start address of mem is %x\n", start_address);
1328 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1329
1328 if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) { 1330 if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) {
1329 err ("cannot find corresponding MEM resource to remove\n"); 1331 err ("cannot find corresponding MEM resource to remove\n");
1330 return -EIO; 1332 return -EIO;
@@ -1422,9 +1424,9 @@ static int unconfigure_boot_bridge (u8 busno, u8 device, u8 function)
1422 /* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */ 1424 /* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */
1423 } else { 1425 } else {
1424 /* This is Memory */ 1426 /* This is Memory */
1425 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1426 if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) { 1427 if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) {
1427 /* pfmem */ 1428 /* pfmem */
1429 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1428 if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) { 1430 if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) {
1429 err ("cannot find corresponding PFMEM resource to remove\n"); 1431 err ("cannot find corresponding PFMEM resource to remove\n");
1430 return -EINVAL; 1432 return -EINVAL;
@@ -1436,6 +1438,7 @@ static int unconfigure_boot_bridge (u8 busno, u8 device, u8 function)
1436 } 1438 }
1437 } else { 1439 } else {
1438 /* regular memory */ 1440 /* regular memory */
1441 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1439 if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) { 1442 if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) {
1440 err ("cannot find corresponding MEM resource to remove\n"); 1443 err ("cannot find corresponding MEM resource to remove\n");
1441 return -EINVAL; 1444 return -EINVAL;