/* This is Memory */
if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) {
/* pfmem */
- start_address &= PCI_BASE_ADDRESS_MEM_MASK;
debug ("start address of pfmem is %x\n", start_address);
+ start_address &= PCI_BASE_ADDRESS_MEM_MASK;
if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) {
err ("cannot find corresponding PFMEM resource to remove\n");
return -EIO;
}
- if (pfmem)
+ if (pfmem) {
debug ("pfmem->start = %x\n", pfmem->start);
- ibmphp_remove_resource (pfmem);
-
- if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
- /* takes up another dword */
- count += 1;
+ ibmphp_remove_resource(pfmem);
}
-
} else {
/* regular memory */
- start_address &= PCI_BASE_ADDRESS_MEM_MASK;
debug ("start address of mem is %x\n", start_address);
+ start_address &= PCI_BASE_ADDRESS_MEM_MASK;
+
if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) {
err ("cannot find corresponding MEM resource to remove\n");
return -EIO;
}
- if (mem)
+ if (mem) {
debug ("mem->start = %x\n", mem->start);
- ibmphp_remove_resource (mem);
-
- if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
- /* takes up another dword */
- count += 1;
+ ibmphp_remove_resource(mem);
}
}
+ if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+ /* takes up another dword */
+ count += 1;
+ }
} /* end of mem */
} /* end of for */
return -EINVAL;
}
- pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number);
- sec_no = (int) sec_no;
-
pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SUBORDINATE_BUS, &sub_number);
sub_no = (int) sub_number;
debug ("sub_no is %d, sec_no is %d\n", sub_no, sec_no);
err ("cannot find corresponding PFMEM resource to remove\n");
return -EINVAL;
}
- if (pfmem)
+ if (pfmem) {
debug ("pfmem->start = %x\n", pfmem->start);
- ibmphp_remove_resource (pfmem);
-
- if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
- /* takes up another dword */
- count += 1;
+ ibmphp_remove_resource(pfmem);
}
-
} else {
/* regular memory */
start_address &= PCI_BASE_ADDRESS_MEM_MASK;
err ("cannot find corresponding MEM resource to remove\n");
return -EINVAL;
}
- if (mem)
+ if (mem) {
debug ("mem->start = %x\n", mem->start);
- ibmphp_remove_resource (mem);
-
- if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
- /* takes up another dword */
- count += 1;
+ ibmphp_remove_resource(mem);
}
}
+ if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+ /* takes up another dword */
+ count += 1;
+ }
} /* end of mem */
} /* end of for */
debug ("%s - exiting, returning success\n", __FUNCTION__);