mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
PCI: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ca99eb8c2d
commit
66bef8c059
@@ -36,7 +36,7 @@
|
||||
|
||||
#define MY_NAME "acpi_pcihp"
|
||||
|
||||
#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __FUNCTION__ , ## arg); } while (0)
|
||||
#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0)
|
||||
#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
|
||||
#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
|
||||
#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
|
||||
@@ -71,7 +71,7 @@ decode_type0_hpx_record(union acpi_object *record, struct hotplug_params *hpx)
|
||||
default:
|
||||
printk(KERN_WARNING
|
||||
"%s: Type 0 Revision %d record not supported\n",
|
||||
__FUNCTION__, revision);
|
||||
__func__, revision);
|
||||
return AE_ERROR;
|
||||
}
|
||||
return AE_OK;
|
||||
@@ -100,7 +100,7 @@ decode_type1_hpx_record(union acpi_object *record, struct hotplug_params *hpx)
|
||||
default:
|
||||
printk(KERN_WARNING
|
||||
"%s: Type 1 Revision %d record not supported\n",
|
||||
__FUNCTION__, revision);
|
||||
__func__, revision);
|
||||
return AE_ERROR;
|
||||
}
|
||||
return AE_OK;
|
||||
@@ -142,7 +142,7 @@ decode_type2_hpx_record(union acpi_object *record, struct hotplug_params *hpx)
|
||||
default:
|
||||
printk(KERN_WARNING
|
||||
"%s: Type 2 Revision %d record not supported\n",
|
||||
__FUNCTION__, revision);
|
||||
__func__, revision);
|
||||
return AE_ERROR;
|
||||
}
|
||||
return AE_OK;
|
||||
@@ -203,7 +203,7 @@ acpi_run_hpx(acpi_handle handle, struct hotplug_params *hpx)
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "%s: Type %d record not supported\n",
|
||||
__FUNCTION__, type);
|
||||
__func__, type);
|
||||
status = AE_ERROR;
|
||||
goto exit;
|
||||
}
|
||||
@@ -235,7 +235,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
|
||||
ret_buf.pointer = kmalloc (ret_buf.length, GFP_KERNEL);
|
||||
if (!ret_buf.pointer) {
|
||||
printk(KERN_ERR "%s:%s alloc for _HPP fail\n",
|
||||
__FUNCTION__, (char *)string.pointer);
|
||||
__func__, (char *)string.pointer);
|
||||
kfree(string.pointer);
|
||||
return AE_NO_MEMORY;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
|
||||
break;
|
||||
default:
|
||||
if (ACPI_FAILURE(status)) {
|
||||
pr_debug("%s:%s _HPP fail=0x%x\n", __FUNCTION__,
|
||||
pr_debug("%s:%s _HPP fail=0x%x\n", __func__,
|
||||
(char *)string.pointer, status);
|
||||
kfree(string.pointer);
|
||||
return status;
|
||||
@@ -254,7 +254,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
|
||||
|
||||
ext_obj = (union acpi_object *) ret_buf.pointer;
|
||||
if (ext_obj->type != ACPI_TYPE_PACKAGE) {
|
||||
printk(KERN_ERR "%s:%s _HPP obj not a package\n", __FUNCTION__,
|
||||
printk(KERN_ERR "%s:%s _HPP obj not a package\n", __func__,
|
||||
(char *)string.pointer);
|
||||
status = AE_ERROR;
|
||||
goto free_and_return;
|
||||
@@ -270,7 +270,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "%s:%s _HPP obj type incorrect\n",
|
||||
__FUNCTION__, (char *)string.pointer);
|
||||
__func__, (char *)string.pointer);
|
||||
status = AE_ERROR;
|
||||
goto free_and_return;
|
||||
}
|
||||
@@ -311,12 +311,12 @@ acpi_status acpi_run_oshp(acpi_handle handle)
|
||||
if (ACPI_FAILURE(status))
|
||||
if (status != AE_NOT_FOUND)
|
||||
printk(KERN_ERR "%s:%s OSHP fails=0x%x\n",
|
||||
__FUNCTION__, (char *)string.pointer, status);
|
||||
__func__, (char *)string.pointer, status);
|
||||
else
|
||||
dbg("%s:%s OSHP not found\n",
|
||||
__FUNCTION__, (char *)string.pointer);
|
||||
__func__, (char *)string.pointer);
|
||||
else
|
||||
pr_debug("%s:%s OSHP passes\n", __FUNCTION__,
|
||||
pr_debug("%s:%s OSHP passes\n", __func__,
|
||||
(char *)string.pointer);
|
||||
|
||||
kfree(string.pointer);
|
||||
|
||||
@@ -138,7 +138,7 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
/* enable the specified slot */
|
||||
return acpiphp_enable_slot(slot->acpi_slot);
|
||||
@@ -156,7 +156,7 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
int retval;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
/* disable the specified slot */
|
||||
retval = acpiphp_disable_slot(slot->acpi_slot);
|
||||
@@ -179,7 +179,7 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
|
||||
{
|
||||
int retval = -ENODEV;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
if (attention_info && try_module_get(attention_info->owner)) {
|
||||
retval = attention_info->set_attn(hotplug_slot, status);
|
||||
@@ -202,7 +202,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = acpiphp_get_power_status(slot->acpi_slot);
|
||||
|
||||
@@ -224,7 +224,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
{
|
||||
int retval = -EINVAL;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
if (attention_info && try_module_get(attention_info->owner)) {
|
||||
retval = attention_info->get_attn(hotplug_slot, value);
|
||||
@@ -247,7 +247,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = acpiphp_get_latch_status(slot->acpi_slot);
|
||||
|
||||
@@ -267,7 +267,7 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = acpiphp_get_adapter_status(slot->acpi_slot);
|
||||
|
||||
@@ -284,7 +284,7 @@ static int get_address(struct hotplug_slot *hotplug_slot, u32 *value)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = acpiphp_get_address(slot->acpi_slot);
|
||||
|
||||
@@ -318,7 +318,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
kfree(slot->hotplug_slot);
|
||||
kfree(slot);
|
||||
|
||||
@@ -352,7 +352,7 @@ static void decode_hpp(struct acpiphp_bridge *bridge)
|
||||
/* use default numbers */
|
||||
printk(KERN_WARNING
|
||||
"%s: Could not get hotplug parameters. Use defaults\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
bridge->hpp.t0 = &bridge->hpp.type0_data;
|
||||
bridge->hpp.t0->revision = 0;
|
||||
bridge->hpp.t0->cache_line_size = 0x10;
|
||||
@@ -534,7 +534,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
|
||||
|
||||
status = acpi_evaluate_integer(handle, "_ADR", NULL, &tmp);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
dbg("%s: _ADR evaluation failure\n", __FUNCTION__);
|
||||
dbg("%s: _ADR evaluation failure\n", __func__);
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
@@ -578,7 +578,7 @@ static int add_bridge(acpi_handle handle)
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
status = acpi_evaluate_integer(handle, "_STA", NULL, &tmp);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
dbg("%s: _STA evaluation failure\n", __FUNCTION__);
|
||||
dbg("%s: _STA evaluation failure\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
if ((tmp & ACPI_STA_FUNCTIONING) == 0)
|
||||
@@ -928,10 +928,10 @@ static int power_on_slot(struct acpiphp_slot *slot)
|
||||
func = list_entry(l, struct acpiphp_func, sibling);
|
||||
|
||||
if (func->flags & FUNC_HAS_PS0) {
|
||||
dbg("%s: executing _PS0\n", __FUNCTION__);
|
||||
dbg("%s: executing _PS0\n", __func__);
|
||||
status = acpi_evaluate_object(func->handle, "_PS0", NULL, NULL);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
warn("%s: _PS0 failed\n", __FUNCTION__);
|
||||
warn("%s: _PS0 failed\n", __func__);
|
||||
retval = -1;
|
||||
goto err_exit;
|
||||
} else
|
||||
@@ -966,7 +966,7 @@ static int power_off_slot(struct acpiphp_slot *slot)
|
||||
if (func->flags & FUNC_HAS_PS3) {
|
||||
status = acpi_evaluate_object(func->handle, "_PS3", NULL, NULL);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
warn("%s: _PS3 failed\n", __FUNCTION__);
|
||||
warn("%s: _PS3 failed\n", __func__);
|
||||
retval = -1;
|
||||
goto err_exit;
|
||||
} else
|
||||
@@ -1300,7 +1300,7 @@ int acpiphp_eject_slot(struct acpiphp_slot *slot)
|
||||
|
||||
status = acpi_evaluate_object(func->handle, "_EJ0", &arg_list, NULL);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
warn("%s: _EJ0 failed\n", __FUNCTION__);
|
||||
warn("%s: _EJ0 failed\n", __func__);
|
||||
return -1;
|
||||
} else
|
||||
break;
|
||||
@@ -1349,7 +1349,7 @@ static int acpiphp_check_bridge(struct acpiphp_bridge *bridge)
|
||||
}
|
||||
}
|
||||
|
||||
dbg("%s: %d enabled, %d disabled\n", __FUNCTION__, enabled, disabled);
|
||||
dbg("%s: %d enabled, %d disabled\n", __func__, enabled, disabled);
|
||||
|
||||
err_exit:
|
||||
return retval;
|
||||
@@ -1527,7 +1527,7 @@ check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
|
||||
if (bridge) {
|
||||
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
|
||||
dbg("%s: re-enumerating slots under %s\n",
|
||||
__FUNCTION__, objname);
|
||||
__func__, objname);
|
||||
acpiphp_check_bridge(bridge);
|
||||
}
|
||||
return AE_OK ;
|
||||
@@ -1572,10 +1572,10 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *cont
|
||||
switch (type) {
|
||||
case ACPI_NOTIFY_BUS_CHECK:
|
||||
/* bus re-enumerate */
|
||||
dbg("%s: Bus check notify on %s\n", __FUNCTION__, objname);
|
||||
dbg("%s: Bus check notify on %s\n", __func__, objname);
|
||||
if (bridge) {
|
||||
dbg("%s: re-enumerating slots under %s\n",
|
||||
__FUNCTION__, objname);
|
||||
__func__, objname);
|
||||
acpiphp_check_bridge(bridge);
|
||||
}
|
||||
if (num_sub_bridges)
|
||||
@@ -1585,18 +1585,18 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *cont
|
||||
|
||||
case ACPI_NOTIFY_DEVICE_CHECK:
|
||||
/* device check */
|
||||
dbg("%s: Device check notify on %s\n", __FUNCTION__, objname);
|
||||
dbg("%s: Device check notify on %s\n", __func__, objname);
|
||||
acpiphp_check_bridge(bridge);
|
||||
break;
|
||||
|
||||
case ACPI_NOTIFY_DEVICE_WAKE:
|
||||
/* wake event */
|
||||
dbg("%s: Device wake notify on %s\n", __FUNCTION__, objname);
|
||||
dbg("%s: Device wake notify on %s\n", __func__, objname);
|
||||
break;
|
||||
|
||||
case ACPI_NOTIFY_EJECT_REQUEST:
|
||||
/* request device eject */
|
||||
dbg("%s: Device eject notify on %s\n", __FUNCTION__, objname);
|
||||
dbg("%s: Device eject notify on %s\n", __func__, objname);
|
||||
if ((bridge->type != BRIDGE_TYPE_HOST) &&
|
||||
(bridge->flags & BRIDGE_HAS_EJ0)) {
|
||||
struct acpiphp_slot *slot;
|
||||
@@ -1649,24 +1649,24 @@ static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *contex
|
||||
switch (type) {
|
||||
case ACPI_NOTIFY_BUS_CHECK:
|
||||
/* bus re-enumerate */
|
||||
dbg("%s: Bus check notify on %s\n", __FUNCTION__, objname);
|
||||
dbg("%s: Bus check notify on %s\n", __func__, objname);
|
||||
acpiphp_enable_slot(func->slot);
|
||||
break;
|
||||
|
||||
case ACPI_NOTIFY_DEVICE_CHECK:
|
||||
/* device check : re-enumerate from parent bus */
|
||||
dbg("%s: Device check notify on %s\n", __FUNCTION__, objname);
|
||||
dbg("%s: Device check notify on %s\n", __func__, objname);
|
||||
acpiphp_check_bridge(func->slot->bridge);
|
||||
break;
|
||||
|
||||
case ACPI_NOTIFY_DEVICE_WAKE:
|
||||
/* wake event */
|
||||
dbg("%s: Device wake notify on %s\n", __FUNCTION__, objname);
|
||||
dbg("%s: Device wake notify on %s\n", __func__, objname);
|
||||
break;
|
||||
|
||||
case ACPI_NOTIFY_EJECT_REQUEST:
|
||||
/* request device eject */
|
||||
dbg("%s: Device eject notify on %s\n", __FUNCTION__, objname);
|
||||
dbg("%s: Device eject notify on %s\n", __func__, objname);
|
||||
if (!(acpiphp_disable_slot(func->slot)))
|
||||
acpiphp_eject_slot(func->slot);
|
||||
break;
|
||||
@@ -1796,7 +1796,7 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot)
|
||||
if (retval)
|
||||
power_off_slot(slot);
|
||||
} else {
|
||||
dbg("%s: Slot status is not ACPI_STA_ALL\n", __FUNCTION__);
|
||||
dbg("%s: Slot status is not ACPI_STA_ALL\n", __func__);
|
||||
power_off_slot(slot);
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status)
|
||||
|
||||
ibm_slot = ibm_slot_from_id(hpslot_to_sun(slot));
|
||||
|
||||
dbg("%s: set slot %d (%d) attention status to %d\n", __FUNCTION__,
|
||||
dbg("%s: set slot %d (%d) attention status to %d\n", __func__,
|
||||
ibm_slot->slot.slot_num, ibm_slot->slot.slot_id,
|
||||
(status ? 1 : 0));
|
||||
|
||||
@@ -231,7 +231,7 @@ static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status)
|
||||
else
|
||||
*status = 0;
|
||||
|
||||
dbg("%s: get slot %d (%d) attention status is %d\n", __FUNCTION__,
|
||||
dbg("%s: get slot %d (%d) attention status is %d\n", __func__,
|
||||
ibm_slot->slot.slot_num, ibm_slot->slot.slot_id,
|
||||
*status);
|
||||
|
||||
@@ -263,10 +263,10 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
|
||||
u8 subevent = event & 0xf0;
|
||||
struct notification *note = context;
|
||||
|
||||
dbg("%s: Received notification %02x\n", __FUNCTION__, event);
|
||||
dbg("%s: Received notification %02x\n", __func__, event);
|
||||
|
||||
if (subevent == 0x80) {
|
||||
dbg("%s: generationg bus event\n", __FUNCTION__);
|
||||
dbg("%s: generationg bus event\n", __func__);
|
||||
acpi_bus_generate_proc_event(note->device, note->event, detail);
|
||||
acpi_bus_generate_netlink_event(note->device->pnp.device_class,
|
||||
note->device->dev.bus_id,
|
||||
@@ -299,7 +299,7 @@ static int ibm_get_table_from_acpi(char **bufp)
|
||||
|
||||
status = acpi_evaluate_object(ibm_acpi_handle, "APCI", NULL, &buffer);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
err("%s: APCI evaluation failed\n", __FUNCTION__);
|
||||
err("%s: APCI evaluation failed\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -307,13 +307,13 @@ static int ibm_get_table_from_acpi(char **bufp)
|
||||
if (!(package) ||
|
||||
(package->type != ACPI_TYPE_PACKAGE) ||
|
||||
!(package->package.elements)) {
|
||||
err("%s: Invalid APCI object\n", __FUNCTION__);
|
||||
err("%s: Invalid APCI object\n", __func__);
|
||||
goto read_table_done;
|
||||
}
|
||||
|
||||
for(size = 0, i = 0; i < package->package.count; i++) {
|
||||
if (package->package.elements[i].type != ACPI_TYPE_BUFFER) {
|
||||
err("%s: Invalid APCI element %d\n", __FUNCTION__, i);
|
||||
err("%s: Invalid APCI element %d\n", __func__, i);
|
||||
goto read_table_done;
|
||||
}
|
||||
size += package->package.elements[i].buffer.length;
|
||||
@@ -324,7 +324,7 @@ static int ibm_get_table_from_acpi(char **bufp)
|
||||
|
||||
lbuf = kzalloc(size, GFP_KERNEL);
|
||||
dbg("%s: element count: %i, ASL table size: %i, &table = 0x%p\n",
|
||||
__FUNCTION__, package->package.count, size, lbuf);
|
||||
__func__, package->package.count, size, lbuf);
|
||||
|
||||
if (lbuf) {
|
||||
*bufp = lbuf;
|
||||
@@ -368,7 +368,7 @@ static ssize_t ibm_read_apci_table(struct kobject *kobj,
|
||||
int bytes_read = -EINVAL;
|
||||
char *table = NULL;
|
||||
|
||||
dbg("%s: pos = %d, size = %zd\n", __FUNCTION__, (int)pos, size);
|
||||
dbg("%s: pos = %d, size = %zd\n", __func__, (int)pos, size);
|
||||
|
||||
if (pos == 0) {
|
||||
bytes_read = ibm_get_table_from_acpi(&table);
|
||||
@@ -402,7 +402,7 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
|
||||
status = acpi_get_object_info(handle, &info_buffer);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
err("%s: Failed to get device information status=0x%x\n",
|
||||
__FUNCTION__, status);
|
||||
__func__, status);
|
||||
return retval;
|
||||
}
|
||||
info = info_buffer.pointer;
|
||||
@@ -432,18 +432,18 @@ static int __init ibm_acpiphp_init(void)
|
||||
struct acpi_device *device;
|
||||
struct kobject *sysdir = &pci_hotplug_slots_kset->kobj;
|
||||
|
||||
dbg("%s\n", __FUNCTION__);
|
||||
dbg("%s\n", __func__);
|
||||
|
||||
if (acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
|
||||
ACPI_UINT32_MAX, ibm_find_acpi_device,
|
||||
&ibm_acpi_handle, NULL) != FOUND_APCI) {
|
||||
err("%s: acpi_walk_namespace failed\n", __FUNCTION__);
|
||||
err("%s: acpi_walk_namespace failed\n", __func__);
|
||||
retval = -ENODEV;
|
||||
goto init_return;
|
||||
}
|
||||
dbg("%s: found IBM aPCI device\n", __FUNCTION__);
|
||||
dbg("%s: found IBM aPCI device\n", __func__);
|
||||
if (acpi_bus_get_device(ibm_acpi_handle, &device)) {
|
||||
err("%s: acpi_bus_get_device failed\n", __FUNCTION__);
|
||||
err("%s: acpi_bus_get_device failed\n", __func__);
|
||||
retval = -ENODEV;
|
||||
goto init_return;
|
||||
}
|
||||
@@ -458,7 +458,7 @@ static int __init ibm_acpiphp_init(void)
|
||||
&ibm_note);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
err("%s: Failed to register notification handler\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
retval = -EBUSY;
|
||||
goto init_cleanup;
|
||||
}
|
||||
@@ -479,17 +479,17 @@ static void __exit ibm_acpiphp_exit(void)
|
||||
acpi_status status;
|
||||
struct kobject *sysdir = &pci_hotplug_slots_kset->kobj;
|
||||
|
||||
dbg("%s\n", __FUNCTION__);
|
||||
dbg("%s\n", __func__);
|
||||
|
||||
if (acpiphp_unregister_attention(&ibm_attention_info))
|
||||
err("%s: attention info deregistration failed", __FUNCTION__);
|
||||
err("%s: attention info deregistration failed", __func__);
|
||||
|
||||
status = acpi_remove_notify_handler(
|
||||
ibm_acpi_handle,
|
||||
ACPI_DEVICE_NOTIFY,
|
||||
ibm_handle_events);
|
||||
if (ACPI_FAILURE(status))
|
||||
err("%s: Notification handler removal failed\n", __FUNCTION__);
|
||||
err("%s: Notification handler removal failed\n", __func__);
|
||||
/* remove the /sys entries */
|
||||
sysfs_remove_bin_file(sysdir, &ibm_apci_table_attr);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ enable_slot(struct hotplug_slot *hotplug_slot)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
int retval = 0;
|
||||
|
||||
dbg("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s", __func__, hotplug_slot->name);
|
||||
|
||||
if (controller->ops->set_power)
|
||||
retval = controller->ops->set_power(slot, 1);
|
||||
@@ -121,25 +121,25 @@ disable_slot(struct hotplug_slot *hotplug_slot)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
int retval = 0;
|
||||
|
||||
dbg("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s", __func__, hotplug_slot->name);
|
||||
|
||||
down_write(&list_rwsem);
|
||||
|
||||
/* Unconfigure device */
|
||||
dbg("%s - unconfiguring slot %s",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
if ((retval = cpci_unconfigure_slot(slot))) {
|
||||
err("%s - could not unconfigure slot %s",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
goto disable_error;
|
||||
}
|
||||
dbg("%s - finished unconfiguring slot %s",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
|
||||
/* Clear EXT (by setting it) */
|
||||
if (cpci_clear_ext(slot)) {
|
||||
err("%s - could not clear EXT for slot %s",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
retval = -ENODEV;
|
||||
goto disable_error;
|
||||
}
|
||||
@@ -372,7 +372,7 @@ init_slots(int clear_ins)
|
||||
struct slot *slot;
|
||||
struct pci_dev* dev;
|
||||
|
||||
dbg("%s - enter", __FUNCTION__);
|
||||
dbg("%s - enter", __func__);
|
||||
down_read(&list_rwsem);
|
||||
if (!slots) {
|
||||
up_read(&list_rwsem);
|
||||
@@ -380,10 +380,10 @@ init_slots(int clear_ins)
|
||||
}
|
||||
list_for_each_entry(slot, &slot_list, slot_list) {
|
||||
dbg("%s - looking at slot %s",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
if (clear_ins && cpci_check_and_clear_ins(slot))
|
||||
dbg("%s - cleared INS for slot %s",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
dev = pci_get_slot(slot->bus, PCI_DEVFN(slot->number, 0));
|
||||
if (dev) {
|
||||
if (update_adapter_status(slot->hotplug_slot, 1))
|
||||
@@ -394,7 +394,7 @@ init_slots(int clear_ins)
|
||||
}
|
||||
}
|
||||
up_read(&list_rwsem);
|
||||
dbg("%s - exit", __FUNCTION__);
|
||||
dbg("%s - exit", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -415,7 +415,7 @@ check_slots(void)
|
||||
extracted = inserted = 0;
|
||||
list_for_each_entry(slot, &slot_list, slot_list) {
|
||||
dbg("%s - looking at slot %s",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
if (cpci_check_and_clear_ins(slot)) {
|
||||
/*
|
||||
* Some broken hardware (e.g. PLX 9054AB) asserts
|
||||
@@ -430,28 +430,28 @@ check_slots(void)
|
||||
|
||||
/* Process insertion */
|
||||
dbg("%s - slot %s inserted",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
|
||||
/* GSM, debug */
|
||||
hs_csr = cpci_get_hs_csr(slot);
|
||||
dbg("%s - slot %s HS_CSR (1) = %04x",
|
||||
__FUNCTION__, slot->hotplug_slot->name, hs_csr);
|
||||
__func__, slot->hotplug_slot->name, hs_csr);
|
||||
|
||||
/* Configure device */
|
||||
dbg("%s - configuring slot %s",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
if (cpci_configure_slot(slot)) {
|
||||
err("%s - could not configure slot %s",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
continue;
|
||||
}
|
||||
dbg("%s - finished configuring slot %s",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
|
||||
/* GSM, debug */
|
||||
hs_csr = cpci_get_hs_csr(slot);
|
||||
dbg("%s - slot %s HS_CSR (2) = %04x",
|
||||
__FUNCTION__, slot->hotplug_slot->name, hs_csr);
|
||||
__func__, slot->hotplug_slot->name, hs_csr);
|
||||
|
||||
if (update_latch_status(slot->hotplug_slot, 1))
|
||||
warn("failure to update latch file");
|
||||
@@ -464,18 +464,18 @@ check_slots(void)
|
||||
/* GSM, debug */
|
||||
hs_csr = cpci_get_hs_csr(slot);
|
||||
dbg("%s - slot %s HS_CSR (3) = %04x",
|
||||
__FUNCTION__, slot->hotplug_slot->name, hs_csr);
|
||||
__func__, slot->hotplug_slot->name, hs_csr);
|
||||
|
||||
inserted++;
|
||||
} else if (cpci_check_ext(slot)) {
|
||||
/* Process extraction request */
|
||||
dbg("%s - slot %s extracted",
|
||||
__FUNCTION__, slot->hotplug_slot->name);
|
||||
__func__, slot->hotplug_slot->name);
|
||||
|
||||
/* GSM, debug */
|
||||
hs_csr = cpci_get_hs_csr(slot);
|
||||
dbg("%s - slot %s HS_CSR = %04x",
|
||||
__FUNCTION__, slot->hotplug_slot->name, hs_csr);
|
||||
__func__, slot->hotplug_slot->name, hs_csr);
|
||||
|
||||
if (!slot->extracting) {
|
||||
if (update_latch_status(slot->hotplug_slot, 0)) {
|
||||
@@ -519,7 +519,7 @@ event_thread(void *data)
|
||||
{
|
||||
int rc;
|
||||
|
||||
dbg("%s - event thread started", __FUNCTION__);
|
||||
dbg("%s - event thread started", __func__);
|
||||
while (1) {
|
||||
dbg("event thread sleeping");
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
@@ -532,7 +532,7 @@ event_thread(void *data)
|
||||
/* Give userspace a chance to handle extraction */
|
||||
msleep(500);
|
||||
} else if (rc < 0) {
|
||||
dbg("%s - error checking slots", __FUNCTION__);
|
||||
dbg("%s - error checking slots", __func__);
|
||||
thread_finished = 1;
|
||||
goto out;
|
||||
}
|
||||
@@ -541,7 +541,7 @@ event_thread(void *data)
|
||||
break;
|
||||
|
||||
/* Re-enable ENUM# interrupt */
|
||||
dbg("%s - re-enabling irq", __FUNCTION__);
|
||||
dbg("%s - re-enabling irq", __func__);
|
||||
controller->ops->enable_irq();
|
||||
}
|
||||
out:
|
||||
@@ -564,7 +564,7 @@ poll_thread(void *data)
|
||||
/* Give userspace a chance to handle extraction */
|
||||
msleep(500);
|
||||
} else if (rc < 0) {
|
||||
dbg("%s - error checking slots", __FUNCTION__);
|
||||
dbg("%s - error checking slots", __func__);
|
||||
thread_finished = 1;
|
||||
goto out;
|
||||
}
|
||||
@@ -621,7 +621,7 @@ cpci_hp_register_controller(struct cpci_hp_controller *new_controller)
|
||||
status = -ENODEV;
|
||||
}
|
||||
dbg("%s - acquired controller irq %d",
|
||||
__FUNCTION__, new_controller->irq);
|
||||
__func__, new_controller->irq);
|
||||
}
|
||||
if (!status)
|
||||
controller = new_controller;
|
||||
@@ -673,7 +673,7 @@ cpci_hp_start(void)
|
||||
static int first = 1;
|
||||
int status;
|
||||
|
||||
dbg("%s - enter", __FUNCTION__);
|
||||
dbg("%s - enter", __func__);
|
||||
if (!controller)
|
||||
return -ENODEV;
|
||||
|
||||
@@ -693,14 +693,14 @@ cpci_hp_start(void)
|
||||
status = cpci_start_thread();
|
||||
if (status)
|
||||
return status;
|
||||
dbg("%s - thread started", __FUNCTION__);
|
||||
dbg("%s - thread started", __func__);
|
||||
|
||||
if (controller->irq) {
|
||||
/* Start enum interrupt processing */
|
||||
dbg("%s - enabling irq", __FUNCTION__);
|
||||
dbg("%s - enabling irq", __func__);
|
||||
controller->ops->enable_irq();
|
||||
}
|
||||
dbg("%s - exit", __FUNCTION__);
|
||||
dbg("%s - exit", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -711,7 +711,7 @@ cpci_hp_stop(void)
|
||||
return -ENODEV;
|
||||
if (controller->irq) {
|
||||
/* Stop enum interrupt processing */
|
||||
dbg("%s - disabling irq", __FUNCTION__);
|
||||
dbg("%s - disabling irq", __func__);
|
||||
controller->ops->disable_irq();
|
||||
}
|
||||
cpci_stop_thread();
|
||||
|
||||
@@ -255,7 +255,7 @@ int __ref cpci_configure_slot(struct slot *slot)
|
||||
struct pci_bus *parent;
|
||||
int fn;
|
||||
|
||||
dbg("%s - enter", __FUNCTION__);
|
||||
dbg("%s - enter", __func__);
|
||||
|
||||
if (slot->dev == NULL) {
|
||||
dbg("pci_dev null, finding %02x:%02x:%x",
|
||||
@@ -273,7 +273,7 @@ int __ref cpci_configure_slot(struct slot *slot)
|
||||
* we will only call this case when lookup fails.
|
||||
*/
|
||||
n = pci_scan_slot(slot->bus, slot->devfn);
|
||||
dbg("%s: pci_scan_slot returned %d", __FUNCTION__, n);
|
||||
dbg("%s: pci_scan_slot returned %d", __func__, n);
|
||||
slot->dev = pci_get_slot(slot->bus, slot->devfn);
|
||||
if (slot->dev == NULL) {
|
||||
err("Could not find PCI device for slot %02x", slot->number);
|
||||
@@ -322,7 +322,7 @@ int __ref cpci_configure_slot(struct slot *slot)
|
||||
pci_bus_add_devices(parent);
|
||||
pci_enable_bridges(parent);
|
||||
|
||||
dbg("%s - exit", __FUNCTION__);
|
||||
dbg("%s - exit", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ int cpci_unconfigure_slot(struct slot* slot)
|
||||
int i;
|
||||
struct pci_dev *dev;
|
||||
|
||||
dbg("%s - enter", __FUNCTION__);
|
||||
dbg("%s - enter", __func__);
|
||||
if (!slot->dev) {
|
||||
err("No device for slot %02x\n", slot->number);
|
||||
return -ENODEV;
|
||||
@@ -348,6 +348,6 @@ int cpci_unconfigure_slot(struct slot* slot)
|
||||
pci_dev_put(slot->dev);
|
||||
slot->dev = NULL;
|
||||
|
||||
dbg("%s - exit", __FUNCTION__);
|
||||
dbg("%s - exit", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -674,7 +674,7 @@ static inline int cpq_get_latch_status(struct controller *ctrl, struct slot *slo
|
||||
|
||||
hp_slot = slot->device - ctrl->slot_device_offset;
|
||||
dbg("%s: slot->device = %d, ctrl->slot_device_offset = %d \n",
|
||||
__FUNCTION__, slot->device, ctrl->slot_device_offset);
|
||||
__func__, slot->device, ctrl->slot_device_offset);
|
||||
|
||||
status = (readl(ctrl->hpc_reg + INT_INPUT_CLEAR) & (0x01L << hp_slot));
|
||||
|
||||
@@ -709,7 +709,7 @@ static inline int wait_for_ctrl_irq(struct controller *ctrl)
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
int retval = 0;
|
||||
|
||||
dbg("%s - start\n", __FUNCTION__);
|
||||
dbg("%s - start\n", __func__);
|
||||
add_wait_queue(&ctrl->queue, &wait);
|
||||
/* Sleep for up to 1 second to wait for the LED to change. */
|
||||
msleep_interruptible(1000);
|
||||
@@ -717,7 +717,7 @@ static inline int wait_for_ctrl_irq(struct controller *ctrl)
|
||||
if (signal_pending(current))
|
||||
retval = -EINTR;
|
||||
|
||||
dbg("%s - end\n", __FUNCTION__);
|
||||
dbg("%s - end\n", __func__);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
@@ -315,7 +315,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
kfree(slot->hotplug_slot->info);
|
||||
kfree(slot->hotplug_slot->name);
|
||||
@@ -338,7 +338,7 @@ static int ctrl_slot_setup(struct controller *ctrl,
|
||||
void __iomem *slot_entry= NULL;
|
||||
int result = -ENOMEM;
|
||||
|
||||
dbg("%s\n", __FUNCTION__);
|
||||
dbg("%s\n", __func__);
|
||||
|
||||
tempdword = readl(ctrl->hpc_reg + INT_INPUT_CLEAR);
|
||||
|
||||
@@ -513,7 +513,7 @@ get_slot_mapping(struct pci_bus *bus, u8 bus_num, u8 dev_num, u8 *slot)
|
||||
|
||||
u8 tbus, tdevice, tslot, bridgeSlot;
|
||||
|
||||
dbg("%s: %p, %d, %d, %p\n", __FUNCTION__, bus, bus_num, dev_num, slot);
|
||||
dbg("%s: %p, %d, %d, %p\n", __func__, bus, bus_num, dev_num, slot);
|
||||
|
||||
bridgeSlot = 0xFF;
|
||||
|
||||
@@ -636,7 +636,7 @@ static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status)
|
||||
u8 device;
|
||||
u8 function;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1)
|
||||
return -ENODEV;
|
||||
@@ -663,7 +663,7 @@ static int process_SI(struct hotplug_slot *hotplug_slot)
|
||||
u8 device;
|
||||
u8 function;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1)
|
||||
return -ENODEV;
|
||||
@@ -695,7 +695,7 @@ static int process_SS(struct hotplug_slot *hotplug_slot)
|
||||
u8 device;
|
||||
u8 function;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1)
|
||||
return -ENODEV;
|
||||
@@ -708,7 +708,7 @@ static int process_SS(struct hotplug_slot *hotplug_slot)
|
||||
if (!slot_func)
|
||||
return -ENODEV;
|
||||
|
||||
dbg("In %s, slot_func = %p, ctrl = %p\n", __FUNCTION__, slot_func, ctrl);
|
||||
dbg("In %s, slot_func = %p, ctrl = %p\n", __func__, slot_func, ctrl);
|
||||
return cpqhp_process_SS(ctrl, slot_func);
|
||||
}
|
||||
|
||||
@@ -718,7 +718,7 @@ static int hardware_test(struct hotplug_slot *hotplug_slot, u32 value)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
struct controller *ctrl = slot->ctrl;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
return cpqhp_hardware_test(ctrl, value);
|
||||
}
|
||||
@@ -729,7 +729,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
struct controller *ctrl = slot->ctrl;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = get_slot_enabled(ctrl, slot);
|
||||
return 0;
|
||||
@@ -740,7 +740,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
struct controller *ctrl = slot->ctrl;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = cpq_get_attention_status(ctrl, slot);
|
||||
return 0;
|
||||
@@ -751,7 +751,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
struct controller *ctrl = slot->ctrl;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = cpq_get_latch_status(ctrl, slot);
|
||||
|
||||
@@ -763,7 +763,7 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
struct controller *ctrl = slot->ctrl;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = get_presence_status(ctrl, slot);
|
||||
|
||||
@@ -775,7 +775,7 @@ static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_sp
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
struct controller *ctrl = slot->ctrl;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = ctrl->speed_capability;
|
||||
|
||||
@@ -787,7 +787,7 @@ static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_sp
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
struct controller *ctrl = slot->ctrl;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = ctrl->speed;
|
||||
|
||||
@@ -841,7 +841,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
// TODO: This code can be made to support non-Compaq or Intel subsystem IDs
|
||||
rc = pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vid);
|
||||
if (rc) {
|
||||
err("%s : pci_read_config_word failed\n", __FUNCTION__);
|
||||
err("%s : pci_read_config_word failed\n", __func__);
|
||||
goto err_disable_device;
|
||||
}
|
||||
dbg("Subsystem Vendor ID: %x\n", subsystem_vid);
|
||||
@@ -853,14 +853,14 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
ctrl = kzalloc(sizeof(struct controller), GFP_KERNEL);
|
||||
if (!ctrl) {
|
||||
err("%s : out of memory\n", __FUNCTION__);
|
||||
err("%s : out of memory\n", __func__);
|
||||
rc = -ENOMEM;
|
||||
goto err_disable_device;
|
||||
}
|
||||
|
||||
rc = pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &subsystem_deviceid);
|
||||
if (rc) {
|
||||
err("%s : pci_read_config_word failed\n", __FUNCTION__);
|
||||
err("%s : pci_read_config_word failed\n", __func__);
|
||||
goto err_free_ctrl;
|
||||
}
|
||||
|
||||
@@ -1142,7 +1142,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
rc = cpqhp_save_config(ctrl, ctrl->bus, readb(ctrl->hpc_reg + SLOT_MASK));
|
||||
if (rc) {
|
||||
err("%s: unable to save PCI configuration data, error %d\n",
|
||||
__FUNCTION__, rc);
|
||||
__func__, rc);
|
||||
goto err_iounmap;
|
||||
}
|
||||
|
||||
@@ -1180,7 +1180,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
if (rc) {
|
||||
err(msg_initialization_err, 6);
|
||||
err("%s: unable to save PCI configuration data, error %d\n",
|
||||
__FUNCTION__, rc);
|
||||
__func__, rc);
|
||||
goto err_iounmap;
|
||||
}
|
||||
|
||||
|
||||
@@ -737,12 +737,12 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size)
|
||||
|
||||
for (node = *head; node; node = node->next) {
|
||||
dbg("%s: req_size =%x node=%p, base=%x, length=%x\n",
|
||||
__FUNCTION__, size, node, node->base, node->length);
|
||||
__func__, size, node, node->base, node->length);
|
||||
if (node->length < size)
|
||||
continue;
|
||||
|
||||
if (node->base & (size - 1)) {
|
||||
dbg("%s: not aligned\n", __FUNCTION__);
|
||||
dbg("%s: not aligned\n", __func__);
|
||||
/* this one isn't base aligned properly
|
||||
* so we'll make a new entry and split it up */
|
||||
temp_dword = (node->base | (size-1)) + 1;
|
||||
@@ -767,7 +767,7 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size)
|
||||
|
||||
/* Don't need to check if too small since we already did */
|
||||
if (node->length > size) {
|
||||
dbg("%s: too big\n", __FUNCTION__);
|
||||
dbg("%s: too big\n", __func__);
|
||||
/* this one is longer than we need
|
||||
* so we'll make a new entry and split it up */
|
||||
split_node = kmalloc(sizeof(*split_node), GFP_KERNEL);
|
||||
@@ -784,7 +784,7 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size)
|
||||
node->next = split_node;
|
||||
} /* End of too big on top end */
|
||||
|
||||
dbg("%s: got one!!!\n", __FUNCTION__);
|
||||
dbg("%s: got one!!!\n", __func__);
|
||||
/* If we got here, then it is the right size
|
||||
* Now take it out of the list */
|
||||
if (*head == node) {
|
||||
@@ -819,7 +819,7 @@ int cpqhp_resource_sort_and_combine(struct pci_resource **head)
|
||||
struct pci_resource *node2;
|
||||
int out_of_order = 1;
|
||||
|
||||
dbg("%s: head = %p, *head = %p\n", __FUNCTION__, head, *head);
|
||||
dbg("%s: head = %p, *head = %p\n", __func__, head, *head);
|
||||
|
||||
if (!(*head))
|
||||
return 1;
|
||||
@@ -907,7 +907,7 @@ irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data)
|
||||
/* Read to clear posted writes */
|
||||
misc = readw(ctrl->hpc_reg + MISC);
|
||||
|
||||
dbg ("%s - waking up\n", __FUNCTION__);
|
||||
dbg ("%s - waking up\n", __func__);
|
||||
wake_up_interruptible(&ctrl->queue);
|
||||
}
|
||||
|
||||
@@ -1421,7 +1421,7 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
|
||||
|
||||
hp_slot = func->device - ctrl->slot_device_offset;
|
||||
dbg("%s: func->device, slot_offset, hp_slot = %d, %d ,%d\n",
|
||||
__FUNCTION__, func->device, ctrl->slot_device_offset, hp_slot);
|
||||
__func__, func->device, ctrl->slot_device_offset, hp_slot);
|
||||
|
||||
mutex_lock(&ctrl->crit_sect);
|
||||
|
||||
@@ -1466,55 +1466,55 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
|
||||
|
||||
/* turn on board and blink green LED */
|
||||
|
||||
dbg("%s: before down\n", __FUNCTION__);
|
||||
dbg("%s: before down\n", __func__);
|
||||
mutex_lock(&ctrl->crit_sect);
|
||||
dbg("%s: after down\n", __FUNCTION__);
|
||||
dbg("%s: after down\n", __func__);
|
||||
|
||||
dbg("%s: before slot_enable\n", __FUNCTION__);
|
||||
dbg("%s: before slot_enable\n", __func__);
|
||||
slot_enable (ctrl, hp_slot);
|
||||
|
||||
dbg("%s: before green_LED_blink\n", __FUNCTION__);
|
||||
dbg("%s: before green_LED_blink\n", __func__);
|
||||
green_LED_blink (ctrl, hp_slot);
|
||||
|
||||
dbg("%s: before amber_LED_blink\n", __FUNCTION__);
|
||||
dbg("%s: before amber_LED_blink\n", __func__);
|
||||
amber_LED_off (ctrl, hp_slot);
|
||||
|
||||
dbg("%s: before set_SOGO\n", __FUNCTION__);
|
||||
dbg("%s: before set_SOGO\n", __func__);
|
||||
set_SOGO(ctrl);
|
||||
|
||||
/* Wait for SOBS to be unset */
|
||||
dbg("%s: before wait_for_ctrl_irq\n", __FUNCTION__);
|
||||
dbg("%s: before wait_for_ctrl_irq\n", __func__);
|
||||
wait_for_ctrl_irq (ctrl);
|
||||
dbg("%s: after wait_for_ctrl_irq\n", __FUNCTION__);
|
||||
dbg("%s: after wait_for_ctrl_irq\n", __func__);
|
||||
|
||||
dbg("%s: before up\n", __FUNCTION__);
|
||||
dbg("%s: before up\n", __func__);
|
||||
mutex_unlock(&ctrl->crit_sect);
|
||||
dbg("%s: after up\n", __FUNCTION__);
|
||||
dbg("%s: after up\n", __func__);
|
||||
|
||||
/* Wait for ~1 second because of hot plug spec */
|
||||
dbg("%s: before long_delay\n", __FUNCTION__);
|
||||
dbg("%s: before long_delay\n", __func__);
|
||||
long_delay(1*HZ);
|
||||
dbg("%s: after long_delay\n", __FUNCTION__);
|
||||
dbg("%s: after long_delay\n", __func__);
|
||||
|
||||
dbg("%s: func status = %x\n", __FUNCTION__, func->status);
|
||||
dbg("%s: func status = %x\n", __func__, func->status);
|
||||
/* Check for a power fault */
|
||||
if (func->status == 0xFF) {
|
||||
/* power fault occurred, but it was benign */
|
||||
temp_register = 0xFFFFFFFF;
|
||||
dbg("%s: temp register set to %x by power fault\n", __FUNCTION__, temp_register);
|
||||
dbg("%s: temp register set to %x by power fault\n", __func__, temp_register);
|
||||
rc = POWER_FAILURE;
|
||||
func->status = 0;
|
||||
} else {
|
||||
/* Get vendor/device ID u32 */
|
||||
ctrl->pci_bus->number = func->bus;
|
||||
rc = pci_bus_read_config_dword (ctrl->pci_bus, PCI_DEVFN(func->device, func->function), PCI_VENDOR_ID, &temp_register);
|
||||
dbg("%s: pci_read_config_dword returns %d\n", __FUNCTION__, rc);
|
||||
dbg("%s: temp_register is %x\n", __FUNCTION__, temp_register);
|
||||
dbg("%s: pci_read_config_dword returns %d\n", __func__, rc);
|
||||
dbg("%s: temp_register is %x\n", __func__, temp_register);
|
||||
|
||||
if (rc != 0) {
|
||||
/* Something's wrong here */
|
||||
temp_register = 0xFFFFFFFF;
|
||||
dbg("%s: temp register set to %x by error\n", __FUNCTION__, temp_register);
|
||||
dbg("%s: temp register set to %x by error\n", __func__, temp_register);
|
||||
}
|
||||
/* Preset return code. It will be changed later if things go okay. */
|
||||
rc = NO_ADAPTER_PRESENT;
|
||||
@@ -1530,7 +1530,7 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
|
||||
|
||||
rc = configure_new_device(ctrl, func, 0, &res_lists);
|
||||
|
||||
dbg("%s: back from configure_new_device\n", __FUNCTION__);
|
||||
dbg("%s: back from configure_new_device\n", __func__);
|
||||
ctrl->io_head = res_lists.io_head;
|
||||
ctrl->mem_head = res_lists.mem_head;
|
||||
ctrl->p_mem_head = res_lists.p_mem_head;
|
||||
@@ -1566,7 +1566,7 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
|
||||
|
||||
/* next, we will instantiate the linux pci_dev structures (with
|
||||
* appropriate driver notification, if already present) */
|
||||
dbg("%s: configure linux pci_dev structure\n", __FUNCTION__);
|
||||
dbg("%s: configure linux pci_dev structure\n", __func__);
|
||||
index = 0;
|
||||
do {
|
||||
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
|
||||
device = func->device;
|
||||
|
||||
hp_slot = func->device - ctrl->slot_device_offset;
|
||||
dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot);
|
||||
dbg("In %s, hp_slot = %d\n", __func__, hp_slot);
|
||||
|
||||
/* When we get here, it is safe to change base address registers.
|
||||
* We will attempt to save the base address register lengths */
|
||||
@@ -1928,7 +1928,7 @@ void cpqhp_pushbutton_thread(unsigned long slot)
|
||||
func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0);
|
||||
dbg("In power_down_board, func = %p, ctrl = %p\n", func, ctrl);
|
||||
if (!func) {
|
||||
dbg("Error! func NULL in %s\n", __FUNCTION__);
|
||||
dbg("Error! func NULL in %s\n", __func__);
|
||||
return ;
|
||||
}
|
||||
|
||||
@@ -1950,7 +1950,7 @@ void cpqhp_pushbutton_thread(unsigned long slot)
|
||||
func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0);
|
||||
dbg("In add_board, func = %p, ctrl = %p\n", func, ctrl);
|
||||
if (!func) {
|
||||
dbg("Error! func NULL in %s\n", __FUNCTION__);
|
||||
dbg("Error! func NULL in %s\n", __func__);
|
||||
return ;
|
||||
}
|
||||
|
||||
@@ -2058,7 +2058,7 @@ int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func)
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
dbg("%s: rc = %d\n", __FUNCTION__, rc);
|
||||
dbg("%s: rc = %d\n", __func__, rc);
|
||||
}
|
||||
|
||||
if (p_slot)
|
||||
@@ -2269,12 +2269,12 @@ static u32 configure_new_device(struct controller * ctrl, struct pci_func * func
|
||||
|
||||
new_slot = func;
|
||||
|
||||
dbg("%s\n", __FUNCTION__);
|
||||
dbg("%s\n", __func__);
|
||||
/* Check for Multi-function device */
|
||||
ctrl->pci_bus->number = func->bus;
|
||||
rc = pci_bus_read_config_byte (ctrl->pci_bus, PCI_DEVFN(func->device, func->function), 0x0E, &temp_byte);
|
||||
if (rc) {
|
||||
dbg("%s: rc = %d\n", __FUNCTION__, rc);
|
||||
dbg("%s: rc = %d\n", __func__, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ static int check_for_compaq_ROM (void __iomem *rom_start)
|
||||
(temp6 == 'Q')) {
|
||||
result = 1;
|
||||
}
|
||||
dbg ("%s - returned %d\n", __FUNCTION__, result);
|
||||
dbg ("%s - returned %d\n", __func__, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ int cpqhp_unconfigure_device(struct pci_func* func)
|
||||
{
|
||||
int j;
|
||||
|
||||
dbg("%s: bus/dev/func = %x/%x/%x\n", __FUNCTION__, func->bus, func->device, func->function);
|
||||
dbg("%s: bus/dev/func = %x/%x/%x\n", __func__, func->bus, func->device, func->function);
|
||||
|
||||
for (j=0; j<8 ; j++) {
|
||||
struct pci_dev* temp = pci_find_slot(func->bus, PCI_DEVFN(func->device, j));
|
||||
@@ -170,11 +170,11 @@ int cpqhp_set_irq (u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num)
|
||||
fakedev->bus = fakebus;
|
||||
fakebus->number = bus_num;
|
||||
dbg("%s: dev %d, bus %d, pin %d, num %d\n",
|
||||
__FUNCTION__, dev_num, bus_num, int_pin, irq_num);
|
||||
__func__, dev_num, bus_num, int_pin, irq_num);
|
||||
rc = pcibios_set_irq_routing(fakedev, int_pin - 0x0a, irq_num);
|
||||
kfree(fakedev);
|
||||
kfree(fakebus);
|
||||
dbg("%s: rc %d\n", __FUNCTION__, rc);
|
||||
dbg("%s: rc %d\n", __func__, rc);
|
||||
if (!rc)
|
||||
return !rc;
|
||||
|
||||
@@ -1423,7 +1423,7 @@ int cpqhp_return_board_resources(struct pci_func * func, struct resource_lists *
|
||||
int rc = 0;
|
||||
struct pci_resource *node;
|
||||
struct pci_resource *t_node;
|
||||
dbg("%s\n", __FUNCTION__);
|
||||
dbg("%s\n", __func__);
|
||||
|
||||
if (!func)
|
||||
return 1;
|
||||
|
||||
@@ -320,7 +320,7 @@ static int disable_slot(struct hotplug_slot *slot)
|
||||
return -ENODEV;
|
||||
dslot = slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, slot->name);
|
||||
|
||||
/* don't disable bridged devices just yet, we can't handle them easily... */
|
||||
if (dslot->dev->subordinate) {
|
||||
|
||||
@@ -399,7 +399,7 @@ static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe
|
||||
struct slot *pslot;
|
||||
u8 mode = 0;
|
||||
|
||||
debug("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __FUNCTION__,
|
||||
debug("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __func__,
|
||||
hotplug_slot, value);
|
||||
|
||||
ibmphp_lock_operations();
|
||||
@@ -429,7 +429,7 @@ static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe
|
||||
}
|
||||
|
||||
ibmphp_unlock_operations();
|
||||
debug("%s - Exit rc[%d] value[%x]\n", __FUNCTION__, rc, *value);
|
||||
debug("%s - Exit rc[%d] value[%x]\n", __func__, rc, *value);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ static int get_cur_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe
|
||||
struct slot *pslot;
|
||||
u8 mode = 0;
|
||||
|
||||
debug("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __FUNCTION__,
|
||||
debug("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __func__,
|
||||
hotplug_slot, value);
|
||||
|
||||
ibmphp_lock_operations();
|
||||
@@ -475,7 +475,7 @@ static int get_cur_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe
|
||||
}
|
||||
|
||||
ibmphp_unlock_operations();
|
||||
debug("%s - Exit rc[%d] value[%x]\n", __FUNCTION__, rc, *value);
|
||||
debug("%s - Exit rc[%d] value[%x]\n", __func__, rc, *value);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -745,13 +745,13 @@ static void free_slots(void)
|
||||
struct list_head * tmp;
|
||||
struct list_head * next;
|
||||
|
||||
debug("%s -- enter\n", __FUNCTION__);
|
||||
debug("%s -- enter\n", __func__);
|
||||
|
||||
list_for_each_safe(tmp, next, &ibmphp_slot_head) {
|
||||
slot_cur = list_entry(tmp, struct slot, ibm_slot_list);
|
||||
pci_hp_deregister(slot_cur->hotplug_slot);
|
||||
}
|
||||
debug("%s -- exit\n", __FUNCTION__);
|
||||
debug("%s -- exit\n", __func__);
|
||||
}
|
||||
|
||||
static void ibm_unconfigure_device(struct pci_func *func)
|
||||
@@ -759,7 +759,7 @@ static void ibm_unconfigure_device(struct pci_func *func)
|
||||
struct pci_dev *temp;
|
||||
u8 j;
|
||||
|
||||
debug("inside %s\n", __FUNCTION__);
|
||||
debug("inside %s\n", __func__);
|
||||
debug("func->device = %x, func->function = %x\n",
|
||||
func->device, func->function);
|
||||
debug("func->device << 3 | 0x0 = %x\n", func->device << 3 | 0x0);
|
||||
@@ -790,13 +790,13 @@ static u8 bus_structure_fixup(u8 busno)
|
||||
|
||||
bus = kmalloc(sizeof(*bus), GFP_KERNEL);
|
||||
if (!bus) {
|
||||
err("%s - out of memory\n", __FUNCTION__);
|
||||
err("%s - out of memory\n", __func__);
|
||||
return 1;
|
||||
}
|
||||
dev = kmalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev) {
|
||||
kfree(bus);
|
||||
err("%s - out of memory\n", __FUNCTION__);
|
||||
err("%s - out of memory\n", __func__);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -807,7 +807,7 @@ static u8 bus_structure_fixup(u8 busno)
|
||||
if (!pci_read_config_word(dev, PCI_VENDOR_ID, &l) &&
|
||||
(l != 0x0000) && (l != 0xffff)) {
|
||||
debug("%s - Inside bus_struture_fixup()\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
pci_scan_bus(busno, ibmphp_pci_bus->ops, NULL);
|
||||
break;
|
||||
}
|
||||
@@ -904,7 +904,7 @@ static int set_bus(struct slot * slot_cur)
|
||||
{ },
|
||||
};
|
||||
|
||||
debug("%s - entry slot # %d\n", __FUNCTION__, slot_cur->number);
|
||||
debug("%s - entry slot # %d\n", __func__, slot_cur->number);
|
||||
if (SET_BUS_STATUS(slot_cur->ctrl) && is_bus_empty(slot_cur)) {
|
||||
rc = slot_update(&slot_cur);
|
||||
if (rc)
|
||||
@@ -979,7 +979,7 @@ static int set_bus(struct slot * slot_cur)
|
||||
/* This is for x440, once Brandon fixes the firmware,
|
||||
will not need this delay */
|
||||
msleep(1000);
|
||||
debug("%s -Exit\n", __FUNCTION__);
|
||||
debug("%s -Exit\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -127,18 +127,18 @@ static void __init print_bus_info (void)
|
||||
|
||||
list_for_each (ptr1, &bus_info_head) {
|
||||
ptr = list_entry (ptr1, struct bus_info, bus_info_list);
|
||||
debug ("%s - slot_min = %x\n", __FUNCTION__, ptr->slot_min);
|
||||
debug ("%s - slot_max = %x\n", __FUNCTION__, ptr->slot_max);
|
||||
debug ("%s - slot_count = %x\n", __FUNCTION__, ptr->slot_count);
|
||||
debug ("%s - bus# = %x\n", __FUNCTION__, ptr->busno);
|
||||
debug ("%s - current_speed = %x\n", __FUNCTION__, ptr->current_speed);
|
||||
debug ("%s - controller_id = %x\n", __FUNCTION__, ptr->controller_id);
|
||||
debug ("%s - slot_min = %x\n", __func__, ptr->slot_min);
|
||||
debug ("%s - slot_max = %x\n", __func__, ptr->slot_max);
|
||||
debug ("%s - slot_count = %x\n", __func__, ptr->slot_count);
|
||||
debug ("%s - bus# = %x\n", __func__, ptr->busno);
|
||||
debug ("%s - current_speed = %x\n", __func__, ptr->current_speed);
|
||||
debug ("%s - controller_id = %x\n", __func__, ptr->controller_id);
|
||||
|
||||
debug ("%s - slots_at_33_conv = %x\n", __FUNCTION__, ptr->slots_at_33_conv);
|
||||
debug ("%s - slots_at_66_conv = %x\n", __FUNCTION__, ptr->slots_at_66_conv);
|
||||
debug ("%s - slots_at_66_pcix = %x\n", __FUNCTION__, ptr->slots_at_66_pcix);
|
||||
debug ("%s - slots_at_100_pcix = %x\n", __FUNCTION__, ptr->slots_at_100_pcix);
|
||||
debug ("%s - slots_at_133_pcix = %x\n", __FUNCTION__, ptr->slots_at_133_pcix);
|
||||
debug ("%s - slots_at_33_conv = %x\n", __func__, ptr->slots_at_33_conv);
|
||||
debug ("%s - slots_at_66_conv = %x\n", __func__, ptr->slots_at_66_conv);
|
||||
debug ("%s - slots_at_66_pcix = %x\n", __func__, ptr->slots_at_66_pcix);
|
||||
debug ("%s - slots_at_100_pcix = %x\n", __func__, ptr->slots_at_100_pcix);
|
||||
debug ("%s - slots_at_133_pcix = %x\n", __func__, ptr->slots_at_133_pcix);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -150,12 +150,12 @@ static void print_lo_info (void)
|
||||
debug ("print_lo_info ----\n");
|
||||
list_for_each (ptr1, &rio_lo_head) {
|
||||
ptr = list_entry (ptr1, struct rio_detail, rio_detail_list);
|
||||
debug ("%s - rio_node_id = %x\n", __FUNCTION__, ptr->rio_node_id);
|
||||
debug ("%s - rio_type = %x\n", __FUNCTION__, ptr->rio_type);
|
||||
debug ("%s - owner_id = %x\n", __FUNCTION__, ptr->owner_id);
|
||||
debug ("%s - first_slot_num = %x\n", __FUNCTION__, ptr->first_slot_num);
|
||||
debug ("%s - wpindex = %x\n", __FUNCTION__, ptr->wpindex);
|
||||
debug ("%s - chassis_num = %x\n", __FUNCTION__, ptr->chassis_num);
|
||||
debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id);
|
||||
debug ("%s - rio_type = %x\n", __func__, ptr->rio_type);
|
||||
debug ("%s - owner_id = %x\n", __func__, ptr->owner_id);
|
||||
debug ("%s - first_slot_num = %x\n", __func__, ptr->first_slot_num);
|
||||
debug ("%s - wpindex = %x\n", __func__, ptr->wpindex);
|
||||
debug ("%s - chassis_num = %x\n", __func__, ptr->chassis_num);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -164,15 +164,15 @@ static void print_vg_info (void)
|
||||
{
|
||||
struct rio_detail *ptr;
|
||||
struct list_head *ptr1;
|
||||
debug ("%s ---\n", __FUNCTION__);
|
||||
debug ("%s ---\n", __func__);
|
||||
list_for_each (ptr1, &rio_vg_head) {
|
||||
ptr = list_entry (ptr1, struct rio_detail, rio_detail_list);
|
||||
debug ("%s - rio_node_id = %x\n", __FUNCTION__, ptr->rio_node_id);
|
||||
debug ("%s - rio_type = %x\n", __FUNCTION__, ptr->rio_type);
|
||||
debug ("%s - owner_id = %x\n", __FUNCTION__, ptr->owner_id);
|
||||
debug ("%s - first_slot_num = %x\n", __FUNCTION__, ptr->first_slot_num);
|
||||
debug ("%s - wpindex = %x\n", __FUNCTION__, ptr->wpindex);
|
||||
debug ("%s - chassis_num = %x\n", __FUNCTION__, ptr->chassis_num);
|
||||
debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id);
|
||||
debug ("%s - rio_type = %x\n", __func__, ptr->rio_type);
|
||||
debug ("%s - owner_id = %x\n", __func__, ptr->owner_id);
|
||||
debug ("%s - first_slot_num = %x\n", __func__, ptr->first_slot_num);
|
||||
debug ("%s - wpindex = %x\n", __func__, ptr->wpindex);
|
||||
debug ("%s - chassis_num = %x\n", __func__, ptr->chassis_num);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -185,7 +185,7 @@ static void __init print_ebda_pci_rsrc (void)
|
||||
list_for_each (ptr1, &ibmphp_ebda_pci_rsrc_head) {
|
||||
ptr = list_entry (ptr1, struct ebda_pci_rsrc, ebda_pci_rsrc_list);
|
||||
debug ("%s - rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n",
|
||||
__FUNCTION__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
|
||||
__func__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ static void __init print_ibm_slot (void)
|
||||
|
||||
list_for_each (ptr1, &ibmphp_slot_head) {
|
||||
ptr = list_entry (ptr1, struct slot, ibm_slot_list);
|
||||
debug ("%s - slot_number: %x\n", __FUNCTION__, ptr->number);
|
||||
debug ("%s - slot_number: %x\n", __func__, ptr->number);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,13 +204,13 @@ static void __init print_opt_vg (void)
|
||||
{
|
||||
struct opt_rio *ptr;
|
||||
struct list_head *ptr1;
|
||||
debug ("%s ---\n", __FUNCTION__);
|
||||
debug ("%s ---\n", __func__);
|
||||
list_for_each (ptr1, &opt_vg_head) {
|
||||
ptr = list_entry (ptr1, struct opt_rio, opt_rio_list);
|
||||
debug ("%s - rio_type %x\n", __FUNCTION__, ptr->rio_type);
|
||||
debug ("%s - chassis_num: %x\n", __FUNCTION__, ptr->chassis_num);
|
||||
debug ("%s - first_slot_num: %x\n", __FUNCTION__, ptr->first_slot_num);
|
||||
debug ("%s - middle_num: %x\n", __FUNCTION__, ptr->middle_num);
|
||||
debug ("%s - rio_type %x\n", __func__, ptr->rio_type);
|
||||
debug ("%s - chassis_num: %x\n", __func__, ptr->chassis_num);
|
||||
debug ("%s - first_slot_num: %x\n", __func__, ptr->first_slot_num);
|
||||
debug ("%s - middle_num: %x\n", __func__, ptr->middle_num);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,35 +225,35 @@ static void __init print_ebda_hpc (void)
|
||||
hpc_ptr = list_entry (ptr1, struct controller, ebda_hpc_list);
|
||||
|
||||
for (index = 0; index < hpc_ptr->slot_count; index++) {
|
||||
debug ("%s - physical slot#: %x\n", __FUNCTION__, hpc_ptr->slots[index].slot_num);
|
||||
debug ("%s - pci bus# of the slot: %x\n", __FUNCTION__, hpc_ptr->slots[index].slot_bus_num);
|
||||
debug ("%s - index into ctlr addr: %x\n", __FUNCTION__, hpc_ptr->slots[index].ctl_index);
|
||||
debug ("%s - cap of the slot: %x\n", __FUNCTION__, hpc_ptr->slots[index].slot_cap);
|
||||
debug ("%s - physical slot#: %x\n", __func__, hpc_ptr->slots[index].slot_num);
|
||||
debug ("%s - pci bus# of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_bus_num);
|
||||
debug ("%s - index into ctlr addr: %x\n", __func__, hpc_ptr->slots[index].ctl_index);
|
||||
debug ("%s - cap of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_cap);
|
||||
}
|
||||
|
||||
for (index = 0; index < hpc_ptr->bus_count; index++) {
|
||||
debug ("%s - bus# of each bus controlled by this ctlr: %x\n", __FUNCTION__, hpc_ptr->buses[index].bus_num);
|
||||
debug ("%s - bus# of each bus controlled by this ctlr: %x\n", __func__, hpc_ptr->buses[index].bus_num);
|
||||
}
|
||||
|
||||
debug ("%s - type of hpc: %x\n", __FUNCTION__, hpc_ptr->ctlr_type);
|
||||
debug ("%s - type of hpc: %x\n", __func__, hpc_ptr->ctlr_type);
|
||||
switch (hpc_ptr->ctlr_type) {
|
||||
case 1:
|
||||
debug ("%s - bus: %x\n", __FUNCTION__, hpc_ptr->u.pci_ctlr.bus);
|
||||
debug ("%s - dev_fun: %x\n", __FUNCTION__, hpc_ptr->u.pci_ctlr.dev_fun);
|
||||
debug ("%s - irq: %x\n", __FUNCTION__, hpc_ptr->irq);
|
||||
debug ("%s - bus: %x\n", __func__, hpc_ptr->u.pci_ctlr.bus);
|
||||
debug ("%s - dev_fun: %x\n", __func__, hpc_ptr->u.pci_ctlr.dev_fun);
|
||||
debug ("%s - irq: %x\n", __func__, hpc_ptr->irq);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
debug ("%s - io_start: %x\n", __FUNCTION__, hpc_ptr->u.isa_ctlr.io_start);
|
||||
debug ("%s - io_end: %x\n", __FUNCTION__, hpc_ptr->u.isa_ctlr.io_end);
|
||||
debug ("%s - irq: %x\n", __FUNCTION__, hpc_ptr->irq);
|
||||
debug ("%s - io_start: %x\n", __func__, hpc_ptr->u.isa_ctlr.io_start);
|
||||
debug ("%s - io_end: %x\n", __func__, hpc_ptr->u.isa_ctlr.io_end);
|
||||
debug ("%s - irq: %x\n", __func__, hpc_ptr->irq);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 4:
|
||||
debug ("%s - wpegbbar: %lx\n", __FUNCTION__, hpc_ptr->u.wpeg_ctlr.wpegbbar);
|
||||
debug ("%s - i2c_addr: %x\n", __FUNCTION__, hpc_ptr->u.wpeg_ctlr.i2c_addr);
|
||||
debug ("%s - irq: %x\n", __FUNCTION__, hpc_ptr->irq);
|
||||
debug ("%s - wpegbbar: %lx\n", __func__, hpc_ptr->u.wpeg_ctlr.wpegbbar);
|
||||
debug ("%s - i2c_addr: %x\n", __func__, hpc_ptr->u.wpeg_ctlr.i2c_addr);
|
||||
debug ("%s - irq: %x\n", __func__, hpc_ptr->irq);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,14 +129,14 @@ static int hpc_wait_ctlr_notworking (int, struct controller *, void __iomem *, u
|
||||
*---------------------------------------------------------------------*/
|
||||
void __init ibmphp_hpc_initvars (void)
|
||||
{
|
||||
debug ("%s - Entry\n", __FUNCTION__);
|
||||
debug ("%s - Entry\n", __func__);
|
||||
|
||||
mutex_init(&sem_hpcaccess);
|
||||
init_MUTEX (&semOperations);
|
||||
init_MUTEX_LOCKED (&sem_exit);
|
||||
to_debug = 0;
|
||||
|
||||
debug ("%s - Exit\n", __FUNCTION__);
|
||||
debug ("%s - Exit\n", __func__);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
@@ -154,7 +154,7 @@ static u8 i2c_ctrl_read (struct controller *ctlr_ptr, void __iomem *WPGBbar, u8
|
||||
unsigned long ultemp;
|
||||
unsigned long data; // actual data HILO format
|
||||
|
||||
debug_polling ("%s - Entry WPGBbar[%p] index[%x] \n", __FUNCTION__, WPGBbar, index);
|
||||
debug_polling ("%s - Entry WPGBbar[%p] index[%x] \n", __func__, WPGBbar, index);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// READ - step 1
|
||||
@@ -213,7 +213,7 @@ static u8 i2c_ctrl_read (struct controller *ctlr_ptr, void __iomem *WPGBbar, u8
|
||||
i--;
|
||||
}
|
||||
if (i == 0) {
|
||||
debug ("%s - Error : WPG timeout\n", __FUNCTION__);
|
||||
debug ("%s - Error : WPG timeout\n", __func__);
|
||||
return HPC_ERROR;
|
||||
}
|
||||
//--------------------------------------------------------------------
|
||||
@@ -241,7 +241,7 @@ static u8 i2c_ctrl_read (struct controller *ctlr_ptr, void __iomem *WPGBbar, u8
|
||||
|
||||
status = (u8) data;
|
||||
|
||||
debug_polling ("%s - Exit index[%x] status[%x]\n", __FUNCTION__, index, status);
|
||||
debug_polling ("%s - Exit index[%x] status[%x]\n", __func__, index, status);
|
||||
|
||||
return (status);
|
||||
}
|
||||
@@ -262,7 +262,7 @@ static u8 i2c_ctrl_write (struct controller *ctlr_ptr, void __iomem *WPGBbar, u8
|
||||
unsigned long data; // actual data HILO format
|
||||
int i;
|
||||
|
||||
debug_polling ("%s - Entry WPGBbar[%p] index[%x] cmd[%x]\n", __FUNCTION__, WPGBbar, index, cmd);
|
||||
debug_polling ("%s - Entry WPGBbar[%p] index[%x] cmd[%x]\n", __func__, WPGBbar, index, cmd);
|
||||
|
||||
rc = 0;
|
||||
//--------------------------------------------------------------------
|
||||
@@ -324,7 +324,7 @@ static u8 i2c_ctrl_write (struct controller *ctlr_ptr, void __iomem *WPGBbar, u8
|
||||
i--;
|
||||
}
|
||||
if (i == 0) {
|
||||
debug ("%s - Exit Error:WPG timeout\n", __FUNCTION__);
|
||||
debug ("%s - Exit Error:WPG timeout\n", __func__);
|
||||
rc = HPC_ERROR;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ static u8 i2c_ctrl_write (struct controller *ctlr_ptr, void __iomem *WPGBbar, u8
|
||||
rc = HPC_ERROR;
|
||||
}
|
||||
|
||||
debug_polling ("%s Exit rc[%x]\n", __FUNCTION__, rc);
|
||||
debug_polling ("%s Exit rc[%x]\n", __func__, rc);
|
||||
return (rc);
|
||||
}
|
||||
|
||||
@@ -541,12 +541,12 @@ int ibmphp_hpc_readslot (struct slot * pslot, u8 cmd, u8 * pstatus)
|
||||
int rc = 0;
|
||||
int busindex;
|
||||
|
||||
debug_polling ("%s - Entry pslot[%p] cmd[%x] pstatus[%p]\n", __FUNCTION__, pslot, cmd, pstatus);
|
||||
debug_polling ("%s - Entry pslot[%p] cmd[%x] pstatus[%p]\n", __func__, pslot, cmd, pstatus);
|
||||
|
||||
if ((pslot == NULL)
|
||||
|| ((pstatus == NULL) && (cmd != READ_ALLSTAT) && (cmd != READ_BUSSTATUS))) {
|
||||
rc = -EINVAL;
|
||||
err ("%s - Error invalid pointer, rc[%d]\n", __FUNCTION__, rc);
|
||||
err ("%s - Error invalid pointer, rc[%d]\n", __func__, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -554,7 +554,7 @@ int ibmphp_hpc_readslot (struct slot * pslot, u8 cmd, u8 * pstatus)
|
||||
busindex = ibmphp_get_bus_index (pslot->bus);
|
||||
if (busindex < 0) {
|
||||
rc = -EINVAL;
|
||||
err ("%s - Exit Error:invalid bus, rc[%d]\n", __FUNCTION__, rc);
|
||||
err ("%s - Exit Error:invalid bus, rc[%d]\n", __func__, rc);
|
||||
return rc;
|
||||
} else
|
||||
index = (u8) busindex;
|
||||
@@ -565,7 +565,7 @@ int ibmphp_hpc_readslot (struct slot * pslot, u8 cmd, u8 * pstatus)
|
||||
|
||||
if (index == HPC_ERROR) {
|
||||
rc = -EINVAL;
|
||||
err ("%s - Exit Error:invalid index, rc[%d]\n", __FUNCTION__, rc);
|
||||
err ("%s - Exit Error:invalid index, rc[%d]\n", __func__, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ int ibmphp_hpc_readslot (struct slot * pslot, u8 cmd, u8 * pstatus)
|
||||
ctrl_read (ctlr_ptr, wpg_bbar,
|
||||
index + WPG_1ST_EXTSLOT_INDEX);
|
||||
} else {
|
||||
err ("%s - Error ctrl_read failed\n", __FUNCTION__);
|
||||
err ("%s - Error ctrl_read failed\n", __func__);
|
||||
rc = -EINVAL;
|
||||
break;
|
||||
}
|
||||
@@ -662,7 +662,7 @@ int ibmphp_hpc_readslot (struct slot * pslot, u8 cmd, u8 * pstatus)
|
||||
|
||||
free_hpc_access ();
|
||||
|
||||
debug_polling ("%s - Exit rc[%d]\n", __FUNCTION__, rc);
|
||||
debug_polling ("%s - Exit rc[%d]\n", __func__, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -681,10 +681,10 @@ int ibmphp_hpc_writeslot (struct slot * pslot, u8 cmd)
|
||||
int rc = 0;
|
||||
int timeout;
|
||||
|
||||
debug_polling ("%s - Entry pslot[%p] cmd[%x]\n", __FUNCTION__, pslot, cmd);
|
||||
debug_polling ("%s - Entry pslot[%p] cmd[%x]\n", __func__, pslot, cmd);
|
||||
if (pslot == NULL) {
|
||||
rc = -EINVAL;
|
||||
err ("%s - Error Exit rc[%d]\n", __FUNCTION__, rc);
|
||||
err ("%s - Error Exit rc[%d]\n", __func__, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -694,7 +694,7 @@ int ibmphp_hpc_writeslot (struct slot * pslot, u8 cmd)
|
||||
busindex = ibmphp_get_bus_index (pslot->bus);
|
||||
if (busindex < 0) {
|
||||
rc = -EINVAL;
|
||||
err ("%s - Exit Error:invalid bus, rc[%d]\n", __FUNCTION__, rc);
|
||||
err ("%s - Exit Error:invalid bus, rc[%d]\n", __func__, rc);
|
||||
return rc;
|
||||
} else
|
||||
index = (u8) busindex;
|
||||
@@ -705,7 +705,7 @@ int ibmphp_hpc_writeslot (struct slot * pslot, u8 cmd)
|
||||
|
||||
if (index == HPC_ERROR) {
|
||||
rc = -EINVAL;
|
||||
err ("%s - Error Exit rc[%d]\n", __FUNCTION__, rc);
|
||||
err ("%s - Error Exit rc[%d]\n", __func__, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -719,7 +719,7 @@ int ibmphp_hpc_writeslot (struct slot * pslot, u8 cmd)
|
||||
if ((ctlr_ptr->ctlr_type == 2) || (ctlr_ptr->ctlr_type == 4)) {
|
||||
wpg_bbar = ioremap (ctlr_ptr->u.wpeg_ctlr.wpegbbar, WPG_I2C_IOREMAP_SIZE);
|
||||
|
||||
debug ("%s - ctlr id[%x] physical[%lx] logical[%lx] i2c[%x]\n", __FUNCTION__,
|
||||
debug ("%s - ctlr id[%x] physical[%lx] logical[%lx] i2c[%x]\n", __func__,
|
||||
ctlr_ptr->ctlr_id, (ulong) (ctlr_ptr->u.wpeg_ctlr.wpegbbar), (ulong) wpg_bbar,
|
||||
ctlr_ptr->u.wpeg_ctlr.i2c_addr);
|
||||
}
|
||||
@@ -750,7 +750,7 @@ int ibmphp_hpc_writeslot (struct slot * pslot, u8 cmd)
|
||||
msleep(1000);
|
||||
if (timeout < 1) {
|
||||
done = 1;
|
||||
err ("%s - Error command complete timeout\n", __FUNCTION__);
|
||||
err ("%s - Error command complete timeout\n", __func__);
|
||||
rc = -EFAULT;
|
||||
} else
|
||||
timeout--;
|
||||
@@ -765,7 +765,7 @@ int ibmphp_hpc_writeslot (struct slot * pslot, u8 cmd)
|
||||
iounmap (wpg_bbar);
|
||||
free_hpc_access ();
|
||||
|
||||
debug_polling ("%s - Exit rc[%d]\n", __FUNCTION__, rc);
|
||||
debug_polling ("%s - Exit rc[%d]\n", __func__, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -803,10 +803,10 @@ void ibmphp_lock_operations (void)
|
||||
*---------------------------------------------------------------------*/
|
||||
void ibmphp_unlock_operations (void)
|
||||
{
|
||||
debug ("%s - Entry\n", __FUNCTION__);
|
||||
debug ("%s - Entry\n", __func__);
|
||||
up (&semOperations);
|
||||
to_debug = 0;
|
||||
debug ("%s - Exit\n", __FUNCTION__);
|
||||
debug ("%s - Exit\n", __func__);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
@@ -827,7 +827,7 @@ static int poll_hpc(void *data)
|
||||
int poll_count = 0;
|
||||
u8 ctrl_count = 0x00;
|
||||
|
||||
debug ("%s - Entry\n", __FUNCTION__);
|
||||
debug ("%s - Entry\n", __func__);
|
||||
|
||||
while (!kthread_should_stop()) {
|
||||
/* try to get the lock to do some kind of hardware access */
|
||||
@@ -907,7 +907,7 @@ static int poll_hpc(void *data)
|
||||
msleep(100);
|
||||
}
|
||||
up (&sem_exit);
|
||||
debug ("%s - Exit\n", __FUNCTION__);
|
||||
debug ("%s - Exit\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -999,7 +999,7 @@ static int process_changeinstatus (struct slot *pslot, struct slot *poldslot)
|
||||
ibmphp_update_slot_info (pslot);
|
||||
}
|
||||
|
||||
debug ("%s - Exit rc[%d] disable[%x] update[%x]\n", __FUNCTION__, rc, disable, update);
|
||||
debug ("%s - Exit rc[%d] disable[%x] update[%x]\n", __func__, rc, disable, update);
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -1021,7 +1021,7 @@ static int process_changeinlatch (u8 old, u8 new, struct controller *ctrl)
|
||||
u8 mask;
|
||||
int rc = 0;
|
||||
|
||||
debug ("%s - Entry old[%x], new[%x]\n", __FUNCTION__, old, new);
|
||||
debug ("%s - Entry old[%x], new[%x]\n", __func__, old, new);
|
||||
// bit 0 reserved, 0 is LSB, check bit 1-6 for 6 slots
|
||||
|
||||
for (i = ctrl->starting_slot_num; i <= ctrl->ending_slot_num; i++) {
|
||||
@@ -1031,15 +1031,15 @@ static int process_changeinlatch (u8 old, u8 new, struct controller *ctrl)
|
||||
if (pslot) {
|
||||
memcpy ((void *) &myslot, (void *) pslot, sizeof (struct slot));
|
||||
rc = ibmphp_hpc_readslot (pslot, READ_ALLSTAT, NULL);
|
||||
debug ("%s - call process_changeinstatus for slot[%d]\n", __FUNCTION__, i);
|
||||
debug ("%s - call process_changeinstatus for slot[%d]\n", __func__, i);
|
||||
process_changeinstatus (pslot, &myslot);
|
||||
} else {
|
||||
rc = -EINVAL;
|
||||
err ("%s - Error bad pointer for slot[%d]\n", __FUNCTION__, i);
|
||||
err ("%s - Error bad pointer for slot[%d]\n", __func__, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
debug ("%s - Exit rc[%d]\n", __FUNCTION__, rc);
|
||||
debug ("%s - Exit rc[%d]\n", __func__, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1050,11 +1050,11 @@ static int process_changeinlatch (u8 old, u8 new, struct controller *ctrl)
|
||||
*---------------------------------------------------------------------*/
|
||||
int __init ibmphp_hpc_start_poll_thread (void)
|
||||
{
|
||||
debug ("%s - Entry\n", __FUNCTION__);
|
||||
debug ("%s - Entry\n", __func__);
|
||||
|
||||
ibmphp_poll_thread = kthread_run(poll_hpc, NULL, "hpc_poll");
|
||||
if (IS_ERR(ibmphp_poll_thread)) {
|
||||
err ("%s - Error, thread not started\n", __FUNCTION__);
|
||||
err ("%s - Error, thread not started\n", __func__);
|
||||
return PTR_ERR(ibmphp_poll_thread);
|
||||
}
|
||||
return 0;
|
||||
@@ -1067,7 +1067,7 @@ int __init ibmphp_hpc_start_poll_thread (void)
|
||||
*---------------------------------------------------------------------*/
|
||||
void __exit ibmphp_hpc_stop_poll_thread (void)
|
||||
{
|
||||
debug ("%s - Entry\n", __FUNCTION__);
|
||||
debug ("%s - Entry\n", __func__);
|
||||
|
||||
kthread_stop(ibmphp_poll_thread);
|
||||
debug ("before locking operations \n");
|
||||
@@ -1088,7 +1088,7 @@ void __exit ibmphp_hpc_stop_poll_thread (void)
|
||||
up (&sem_exit);
|
||||
debug ("after sem exit up\n");
|
||||
|
||||
debug ("%s - Exit\n", __FUNCTION__);
|
||||
debug ("%s - Exit\n", __func__);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
||||
@@ -364,7 +364,7 @@ static int configure_device (struct pci_func *func)
|
||||
struct resource_node *pfmem[6];
|
||||
unsigned int devfn;
|
||||
|
||||
debug ("%s - inside\n", __FUNCTION__);
|
||||
debug ("%s - inside\n", __func__);
|
||||
|
||||
devfn = PCI_DEVFN(func->device, func->function);
|
||||
ibmphp_pci_bus->number = func->busno;
|
||||
@@ -595,7 +595,7 @@ static int configure_bridge (struct pci_func **func_passed, u8 slotno)
|
||||
u8 irq;
|
||||
int retval;
|
||||
|
||||
debug ("%s - enter\n", __FUNCTION__);
|
||||
debug ("%s - enter\n", __func__);
|
||||
|
||||
devfn = PCI_DEVFN(func->function, func->device);
|
||||
ibmphp_pci_bus->number = func->busno;
|
||||
@@ -1234,7 +1234,7 @@ static int unconfigure_boot_device (u8 busno, u8 device, u8 function)
|
||||
u32 tmp_address;
|
||||
unsigned int devfn;
|
||||
|
||||
debug ("%s - enter\n", __FUNCTION__);
|
||||
debug ("%s - enter\n", __func__);
|
||||
|
||||
bus = ibmphp_find_res_bus (busno);
|
||||
if (!bus) {
|
||||
@@ -1351,7 +1351,7 @@ static int unconfigure_boot_bridge (u8 busno, u8 device, u8 function)
|
||||
bus_no = (int) busno;
|
||||
debug ("busno is %x\n", busno);
|
||||
pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_PRIMARY_BUS, &pri_number);
|
||||
debug ("%s - busno = %x, primary_number = %x\n", __FUNCTION__, busno, pri_number);
|
||||
debug ("%s - busno = %x, primary_number = %x\n", __func__, busno, pri_number);
|
||||
|
||||
pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number);
|
||||
debug ("sec_number is %x\n", sec_number);
|
||||
@@ -1437,7 +1437,7 @@ static int unconfigure_boot_bridge (u8 busno, u8 device, u8 function)
|
||||
}
|
||||
} /* end of mem */
|
||||
} /* end of for */
|
||||
debug ("%s - exiting, returning success\n", __FUNCTION__);
|
||||
debug ("%s - exiting, returning success\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1453,7 +1453,7 @@ static int unconfigure_boot_card (struct slot *slot_cur)
|
||||
unsigned int devfn;
|
||||
u8 valid_device = 0x00; /* To see if we are ever able to find valid device and read it */
|
||||
|
||||
debug ("%s - enter\n", __FUNCTION__);
|
||||
debug ("%s - enter\n", __func__);
|
||||
|
||||
device = slot_cur->device;
|
||||
busno = slot_cur->bus;
|
||||
@@ -1470,7 +1470,7 @@ static int unconfigure_boot_card (struct slot *slot_cur)
|
||||
/* found correct device!!! */
|
||||
++valid_device;
|
||||
|
||||
debug ("%s - found correct device\n", __FUNCTION__);
|
||||
debug ("%s - found correct device\n", __func__);
|
||||
|
||||
/* header: x x x x x x x x
|
||||
* | |___________|=> 1=PPB bridge, 0=normal device, 2=CardBus Bridge
|
||||
@@ -1573,7 +1573,7 @@ int ibmphp_unconfigure_card (struct slot **slot_cur, int the_end)
|
||||
struct pci_func *cur_func = NULL;
|
||||
struct pci_func *temp_func;
|
||||
|
||||
debug ("%s - enter\n", __FUNCTION__);
|
||||
debug ("%s - enter\n", __func__);
|
||||
|
||||
if (!the_end) {
|
||||
/* Need to unconfigure the card */
|
||||
@@ -1624,7 +1624,7 @@ int ibmphp_unconfigure_card (struct slot **slot_cur, int the_end)
|
||||
|
||||
sl->func = NULL;
|
||||
*slot_cur = sl;
|
||||
debug ("%s - exit\n", __FUNCTION__);
|
||||
debug ("%s - exit\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ static void fix_resources (struct bus_node *bus_cur)
|
||||
struct range_node *range;
|
||||
struct resource_node *res;
|
||||
|
||||
debug ("%s - bus_cur->busno = %d\n", __FUNCTION__, bus_cur->busno);
|
||||
debug ("%s - bus_cur->busno = %d\n", __func__, bus_cur->busno);
|
||||
|
||||
if (bus_cur->needIOUpdate) {
|
||||
res = bus_cur->firstIO;
|
||||
@@ -599,7 +599,7 @@ int ibmphp_add_resource (struct resource_node *res)
|
||||
struct range_node *range_cur = NULL;
|
||||
struct resource_node *res_start = NULL;
|
||||
|
||||
debug ("%s - enter\n", __FUNCTION__);
|
||||
debug ("%s - enter\n", __func__);
|
||||
|
||||
if (!res) {
|
||||
err ("NULL passed to add\n");
|
||||
@@ -762,7 +762,7 @@ int ibmphp_add_resource (struct resource_node *res)
|
||||
}
|
||||
}
|
||||
|
||||
debug ("%s - exit\n", __FUNCTION__);
|
||||
debug ("%s - exit\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1001,7 +1001,7 @@ int ibmphp_check_resource (struct resource_node *res, u8 bridge)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
debug ("%s - enter\n", __FUNCTION__);
|
||||
debug ("%s - enter\n", __func__);
|
||||
debug ("bus_cur->busno is %d\n", bus_cur->busno);
|
||||
|
||||
/* This is a quick fix to not mess up with the code very much. i.e.,
|
||||
@@ -1029,7 +1029,7 @@ int ibmphp_check_resource (struct resource_node *res, u8 bridge)
|
||||
|
||||
while (res_cur) {
|
||||
range = find_range (bus_cur, res_cur);
|
||||
debug ("%s - rangeno = %d\n", __FUNCTION__, res_cur->rangeno);
|
||||
debug ("%s - rangeno = %d\n", __func__, res_cur->rangeno);
|
||||
|
||||
if (!range) {
|
||||
err ("no range for the device exists... bailing out...\n");
|
||||
@@ -1942,7 +1942,7 @@ static int __init update_bridge_ranges (struct bus_node **bus)
|
||||
return -ENODEV;
|
||||
ibmphp_pci_bus->number = bus_cur->busno;
|
||||
|
||||
debug ("inside %s\n", __FUNCTION__);
|
||||
debug ("inside %s\n", __func__);
|
||||
debug ("bus_cur->busno = %x\n", bus_cur->busno);
|
||||
|
||||
for (device = 0; device < 32; device++) {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#define MY_NAME "pci_hotplug"
|
||||
|
||||
#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __FUNCTION__ , ## arg); } while (0)
|
||||
#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0)
|
||||
#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
|
||||
#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
|
||||
#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
|
||||
|
||||
@@ -168,7 +168,7 @@ static inline struct slot *pciehp_find_slot(struct controller *ctrl, u8 device)
|
||||
return slot;
|
||||
}
|
||||
|
||||
err("%s: slot (device=0x%x) not found\n", __FUNCTION__, device);
|
||||
err("%s: slot (device=0x%x) not found\n", __func__, device);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
kfree(slot->hotplug_slot->info);
|
||||
kfree(slot->hotplug_slot);
|
||||
@@ -301,7 +301,7 @@ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 status)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
hotplug_slot->info->attention_status = status;
|
||||
|
||||
@@ -316,7 +316,7 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
return pciehp_sysfs_enable_slot(slot);
|
||||
}
|
||||
@@ -326,7 +326,7 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
return pciehp_sysfs_disable_slot(slot);
|
||||
}
|
||||
@@ -336,7 +336,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
int retval;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
retval = slot->hpc_ops->get_power_status(slot, value);
|
||||
if (retval < 0)
|
||||
@@ -350,7 +350,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
int retval;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
retval = slot->hpc_ops->get_attention_status(slot, value);
|
||||
if (retval < 0)
|
||||
@@ -364,7 +364,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
int retval;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
retval = slot->hpc_ops->get_latch_status(slot, value);
|
||||
if (retval < 0)
|
||||
@@ -378,7 +378,7 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
int retval;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
retval = slot->hpc_ops->get_adapter_status(slot, value);
|
||||
if (retval < 0)
|
||||
@@ -392,7 +392,7 @@ static int get_address(struct hotplug_slot *hotplug_slot, u32 *value)
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
struct pci_bus *bus = slot->ctrl->pci_dev->subordinate;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
*value = (pci_domain_nr(bus) << 16) | (slot->bus << 8) | slot->device;
|
||||
|
||||
@@ -404,7 +404,7 @@ static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
int retval;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
retval = slot->hpc_ops->get_max_bus_speed(slot, value);
|
||||
if (retval < 0)
|
||||
@@ -418,7 +418,7 @@ static int get_cur_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
int retval;
|
||||
|
||||
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
|
||||
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
|
||||
|
||||
retval = slot->hpc_ops->get_cur_bus_speed(slot, value);
|
||||
if (retval < 0)
|
||||
@@ -437,7 +437,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
|
||||
|
||||
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
|
||||
if (!ctrl) {
|
||||
err("%s : out of memory\n", __FUNCTION__);
|
||||
err("%s : out of memory\n", __func__);
|
||||
goto err_out_none;
|
||||
}
|
||||
INIT_LIST_HEAD(&ctrl->slot_list);
|
||||
@@ -454,7 +454,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
|
||||
pci_set_drvdata(pdev, ctrl);
|
||||
|
||||
dbg("%s: ctrl bus=0x%x, device=%x, function=%x, irq=%x\n",
|
||||
__FUNCTION__, pdev->bus->number, PCI_SLOT(pdev->devfn),
|
||||
__func__, pdev->bus->number, PCI_SLOT(pdev->devfn),
|
||||
PCI_FUNC(pdev->devfn), pdev->irq);
|
||||
|
||||
/* Setup the slot information structures */
|
||||
@@ -503,13 +503,13 @@ static void pciehp_remove (struct pcie_device *dev)
|
||||
#ifdef CONFIG_PM
|
||||
static int pciehp_suspend (struct pcie_device *dev, pm_message_t state)
|
||||
{
|
||||
printk("%s ENTRY\n", __FUNCTION__);
|
||||
printk("%s ENTRY\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pciehp_resume (struct pcie_device *dev)
|
||||
{
|
||||
printk("%s ENTRY\n", __FUNCTION__);
|
||||
printk("%s ENTRY\n", __func__);
|
||||
if (pciehp_force) {
|
||||
struct pci_dev *pdev = dev->port;
|
||||
struct controller *ctrl = pci_get_drvdata(pdev);
|
||||
@@ -563,7 +563,7 @@ static int __init pcied_init(void)
|
||||
dbg("pcie_port_service_register = %d\n", retval);
|
||||
info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
|
||||
if (retval)
|
||||
dbg("%s: Failure to register service\n", __FUNCTION__);
|
||||
dbg("%s: Failure to register service\n", __func__);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user