aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/cpqphp_ctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/cpqphp_ctrl.c')
-rw-r--r--drivers/pci/hotplug/cpqphp_ctrl.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c
index 4018420c6f95..ef041ca91c27 100644
--- a/drivers/pci/hotplug/cpqphp_ctrl.c
+++ b/drivers/pci/hotplug/cpqphp_ctrl.c
@@ -737,12 +737,12 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size)
737 737
738 for (node = *head; node; node = node->next) { 738 for (node = *head; node; node = node->next) {
739 dbg("%s: req_size =%x node=%p, base=%x, length=%x\n", 739 dbg("%s: req_size =%x node=%p, base=%x, length=%x\n",
740 __FUNCTION__, size, node, node->base, node->length); 740 __func__, size, node, node->base, node->length);
741 if (node->length < size) 741 if (node->length < size)
742 continue; 742 continue;
743 743
744 if (node->base & (size - 1)) { 744 if (node->base & (size - 1)) {
745 dbg("%s: not aligned\n", __FUNCTION__); 745 dbg("%s: not aligned\n", __func__);
746 /* this one isn't base aligned properly 746 /* this one isn't base aligned properly
747 * so we'll make a new entry and split it up */ 747 * so we'll make a new entry and split it up */
748 temp_dword = (node->base | (size-1)) + 1; 748 temp_dword = (node->base | (size-1)) + 1;
@@ -767,7 +767,7 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size)
767 767
768 /* Don't need to check if too small since we already did */ 768 /* Don't need to check if too small since we already did */
769 if (node->length > size) { 769 if (node->length > size) {
770 dbg("%s: too big\n", __FUNCTION__); 770 dbg("%s: too big\n", __func__);
771 /* this one is longer than we need 771 /* this one is longer than we need
772 * so we'll make a new entry and split it up */ 772 * so we'll make a new entry and split it up */
773 split_node = kmalloc(sizeof(*split_node), GFP_KERNEL); 773 split_node = kmalloc(sizeof(*split_node), GFP_KERNEL);
@@ -784,7 +784,7 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size)
784 node->next = split_node; 784 node->next = split_node;
785 } /* End of too big on top end */ 785 } /* End of too big on top end */
786 786
787 dbg("%s: got one!!!\n", __FUNCTION__); 787 dbg("%s: got one!!!\n", __func__);
788 /* If we got here, then it is the right size 788 /* If we got here, then it is the right size
789 * Now take it out of the list */ 789 * Now take it out of the list */
790 if (*head == node) { 790 if (*head == node) {
@@ -819,7 +819,7 @@ int cpqhp_resource_sort_and_combine(struct pci_resource **head)
819 struct pci_resource *node2; 819 struct pci_resource *node2;
820 int out_of_order = 1; 820 int out_of_order = 1;
821 821
822 dbg("%s: head = %p, *head = %p\n", __FUNCTION__, head, *head); 822 dbg("%s: head = %p, *head = %p\n", __func__, head, *head);
823 823
824 if (!(*head)) 824 if (!(*head))
825 return 1; 825 return 1;
@@ -907,7 +907,7 @@ irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data)
907 /* Read to clear posted writes */ 907 /* Read to clear posted writes */
908 misc = readw(ctrl->hpc_reg + MISC); 908 misc = readw(ctrl->hpc_reg + MISC);
909 909
910 dbg ("%s - waking up\n", __FUNCTION__); 910 dbg ("%s - waking up\n", __func__);
911 wake_up_interruptible(&ctrl->queue); 911 wake_up_interruptible(&ctrl->queue);
912 } 912 }
913 913
@@ -1421,7 +1421,7 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
1421 1421
1422 hp_slot = func->device - ctrl->slot_device_offset; 1422 hp_slot = func->device - ctrl->slot_device_offset;
1423 dbg("%s: func->device, slot_offset, hp_slot = %d, %d ,%d\n", 1423 dbg("%s: func->device, slot_offset, hp_slot = %d, %d ,%d\n",
1424 __FUNCTION__, func->device, ctrl->slot_device_offset, hp_slot); 1424 __func__, func->device, ctrl->slot_device_offset, hp_slot);
1425 1425
1426 mutex_lock(&ctrl->crit_sect); 1426 mutex_lock(&ctrl->crit_sect);
1427 1427
@@ -1466,55 +1466,55 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
1466 1466
1467 /* turn on board and blink green LED */ 1467 /* turn on board and blink green LED */
1468 1468
1469 dbg("%s: before down\n", __FUNCTION__); 1469 dbg("%s: before down\n", __func__);
1470 mutex_lock(&ctrl->crit_sect); 1470 mutex_lock(&ctrl->crit_sect);
1471 dbg("%s: after down\n", __FUNCTION__); 1471 dbg("%s: after down\n", __func__);
1472 1472
1473 dbg("%s: before slot_enable\n", __FUNCTION__); 1473 dbg("%s: before slot_enable\n", __func__);
1474 slot_enable (ctrl, hp_slot); 1474 slot_enable (ctrl, hp_slot);
1475 1475
1476 dbg("%s: before green_LED_blink\n", __FUNCTION__); 1476 dbg("%s: before green_LED_blink\n", __func__);
1477 green_LED_blink (ctrl, hp_slot); 1477 green_LED_blink (ctrl, hp_slot);
1478 1478
1479 dbg("%s: before amber_LED_blink\n", __FUNCTION__); 1479 dbg("%s: before amber_LED_blink\n", __func__);
1480 amber_LED_off (ctrl, hp_slot); 1480 amber_LED_off (ctrl, hp_slot);
1481 1481
1482 dbg("%s: before set_SOGO\n", __FUNCTION__); 1482 dbg("%s: before set_SOGO\n", __func__);
1483 set_SOGO(ctrl); 1483 set_SOGO(ctrl);
1484 1484
1485 /* Wait for SOBS to be unset */ 1485 /* Wait for SOBS to be unset */
1486 dbg("%s: before wait_for_ctrl_irq\n", __FUNCTION__); 1486 dbg("%s: before wait_for_ctrl_irq\n", __func__);
1487 wait_for_ctrl_irq (ctrl); 1487 wait_for_ctrl_irq (ctrl);
1488 dbg("%s: after wait_for_ctrl_irq\n", __FUNCTION__); 1488 dbg("%s: after wait_for_ctrl_irq\n", __func__);
1489 1489
1490 dbg("%s: before up\n", __FUNCTION__); 1490 dbg("%s: before up\n", __func__);
1491 mutex_unlock(&ctrl->crit_sect); 1491 mutex_unlock(&ctrl->crit_sect);
1492 dbg("%s: after up\n", __FUNCTION__); 1492 dbg("%s: after up\n", __func__);
1493 1493
1494 /* Wait for ~1 second because of hot plug spec */ 1494 /* Wait for ~1 second because of hot plug spec */
1495 dbg("%s: before long_delay\n", __FUNCTION__); 1495 dbg("%s: before long_delay\n", __func__);
1496 long_delay(1*HZ); 1496 long_delay(1*HZ);
1497 dbg("%s: after long_delay\n", __FUNCTION__); 1497 dbg("%s: after long_delay\n", __func__);
1498 1498
1499 dbg("%s: func status = %x\n", __FUNCTION__, func->status); 1499 dbg("%s: func status = %x\n", __func__, func->status);
1500 /* Check for a power fault */ 1500 /* Check for a power fault */
1501 if (func->status == 0xFF) { 1501 if (func->status == 0xFF) {
1502 /* power fault occurred, but it was benign */ 1502 /* power fault occurred, but it was benign */
1503 temp_register = 0xFFFFFFFF; 1503 temp_register = 0xFFFFFFFF;
1504 dbg("%s: temp register set to %x by power fault\n", __FUNCTION__, temp_register); 1504 dbg("%s: temp register set to %x by power fault\n", __func__, temp_register);
1505 rc = POWER_FAILURE; 1505 rc = POWER_FAILURE;
1506 func->status = 0; 1506 func->status = 0;
1507 } else { 1507 } else {
1508 /* Get vendor/device ID u32 */ 1508 /* Get vendor/device ID u32 */
1509 ctrl->pci_bus->number = func->bus; 1509 ctrl->pci_bus->number = func->bus;
1510 rc = pci_bus_read_config_dword (ctrl->pci_bus, PCI_DEVFN(func->device, func->function), PCI_VENDOR_ID, &temp_register); 1510 rc = pci_bus_read_config_dword (ctrl->pci_bus, PCI_DEVFN(func->device, func->function), PCI_VENDOR_ID, &temp_register);
1511 dbg("%s: pci_read_config_dword returns %d\n", __FUNCTION__, rc); 1511 dbg("%s: pci_read_config_dword returns %d\n", __func__, rc);
1512 dbg("%s: temp_register is %x\n", __FUNCTION__, temp_register); 1512 dbg("%s: temp_register is %x\n", __func__, temp_register);
1513 1513
1514 if (rc != 0) { 1514 if (rc != 0) {
1515 /* Something's wrong here */ 1515 /* Something's wrong here */
1516 temp_register = 0xFFFFFFFF; 1516 temp_register = 0xFFFFFFFF;
1517 dbg("%s: temp register set to %x by error\n", __FUNCTION__, temp_register); 1517 dbg("%s: temp register set to %x by error\n", __func__, temp_register);
1518 } 1518 }
1519 /* Preset return code. It will be changed later if things go okay. */ 1519 /* Preset return code. It will be changed later if things go okay. */
1520 rc = NO_ADAPTER_PRESENT; 1520 rc = NO_ADAPTER_PRESENT;
@@ -1530,7 +1530,7 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
1530 1530
1531 rc = configure_new_device(ctrl, func, 0, &res_lists); 1531 rc = configure_new_device(ctrl, func, 0, &res_lists);
1532 1532
1533 dbg("%s: back from configure_new_device\n", __FUNCTION__); 1533 dbg("%s: back from configure_new_device\n", __func__);
1534 ctrl->io_head = res_lists.io_head; 1534 ctrl->io_head = res_lists.io_head;
1535 ctrl->mem_head = res_lists.mem_head; 1535 ctrl->mem_head = res_lists.mem_head;
1536 ctrl->p_mem_head = res_lists.p_mem_head; 1536 ctrl->p_mem_head = res_lists.p_mem_head;
@@ -1566,7 +1566,7 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
1566 1566
1567 /* next, we will instantiate the linux pci_dev structures (with 1567 /* next, we will instantiate the linux pci_dev structures (with
1568 * appropriate driver notification, if already present) */ 1568 * appropriate driver notification, if already present) */
1569 dbg("%s: configure linux pci_dev structure\n", __FUNCTION__); 1569 dbg("%s: configure linux pci_dev structure\n", __func__);
1570 index = 0; 1570 index = 0;
1571 do { 1571 do {
1572 new_slot = cpqhp_slot_find(ctrl->bus, func->device, index++); 1572 new_slot = cpqhp_slot_find(ctrl->bus, func->device, index++);
@@ -1628,7 +1628,7 @@ static u32 remove_board(struct pci_func * func, u32 replace_flag, struct control
1628 device = func->device; 1628 device = func->device;
1629 1629
1630 hp_slot = func->device - ctrl->slot_device_offset; 1630 hp_slot = func->device - ctrl->slot_device_offset;
1631 dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot); 1631 dbg("In %s, hp_slot = %d\n", __func__, hp_slot);
1632 1632
1633 /* When we get here, it is safe to change base address registers. 1633 /* When we get here, it is safe to change base address registers.
1634 * We will attempt to save the base address register lengths */ 1634 * We will attempt to save the base address register lengths */
@@ -1928,7 +1928,7 @@ void cpqhp_pushbutton_thread(unsigned long slot)
1928 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0); 1928 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0);
1929 dbg("In power_down_board, func = %p, ctrl = %p\n", func, ctrl); 1929 dbg("In power_down_board, func = %p, ctrl = %p\n", func, ctrl);
1930 if (!func) { 1930 if (!func) {
1931 dbg("Error! func NULL in %s\n", __FUNCTION__); 1931 dbg("Error! func NULL in %s\n", __func__);
1932 return ; 1932 return ;
1933 } 1933 }
1934 1934
@@ -1950,7 +1950,7 @@ void cpqhp_pushbutton_thread(unsigned long slot)
1950 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0); 1950 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0);
1951 dbg("In add_board, func = %p, ctrl = %p\n", func, ctrl); 1951 dbg("In add_board, func = %p, ctrl = %p\n", func, ctrl);
1952 if (!func) { 1952 if (!func) {
1953 dbg("Error! func NULL in %s\n", __FUNCTION__); 1953 dbg("Error! func NULL in %s\n", __func__);
1954 return ; 1954 return ;
1955 } 1955 }
1956 1956
@@ -2058,7 +2058,7 @@ int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func)
2058 } 2058 }
2059 2059
2060 if (rc) { 2060 if (rc) {
2061 dbg("%s: rc = %d\n", __FUNCTION__, rc); 2061 dbg("%s: rc = %d\n", __func__, rc);
2062 } 2062 }
2063 2063
2064 if (p_slot) 2064 if (p_slot)
@@ -2269,12 +2269,12 @@ static u32 configure_new_device(struct controller * ctrl, struct pci_func * func
2269 2269
2270 new_slot = func; 2270 new_slot = func;
2271 2271
2272 dbg("%s\n", __FUNCTION__); 2272 dbg("%s\n", __func__);
2273 /* Check for Multi-function device */ 2273 /* Check for Multi-function device */
2274 ctrl->pci_bus->number = func->bus; 2274 ctrl->pci_bus->number = func->bus;
2275 rc = pci_bus_read_config_byte (ctrl->pci_bus, PCI_DEVFN(func->device, func->function), 0x0E, &temp_byte); 2275 rc = pci_bus_read_config_byte (ctrl->pci_bus, PCI_DEVFN(func->device, func->function), 0x0E, &temp_byte);
2276 if (rc) { 2276 if (rc) {
2277 dbg("%s: rc = %d\n", __FUNCTION__, rc); 2277 dbg("%s: rc = %d\n", __func__, rc);
2278 return rc; 2278 return rc;
2279 } 2279 }
2280 2280