Lines Matching refs:slot

561 static int get_##name (struct hotplug_slot *slot, type *value)		\
563 struct hotplug_slot_ops *ops = slot->ops; \
568 retval = ops->get_##name (slot, value); \
570 *value = slot->info->name; \
586 struct hotplug_slot *slot = file->private_data; in GET_STATUS() local
601 if (slot == NULL) { in GET_STATUS()
610 retval = get_power_status (slot, &value); in GET_STATUS()
629 struct hotplug_slot *slot = file->private_data; in power_write_file() local
642 if (slot == NULL) { in power_write_file()
663 if (!slot->ops->disable_slot) in power_write_file()
665 if (slot->ops->owner) in power_write_file()
666 __MOD_INC_USE_COUNT(slot->ops->owner); in power_write_file()
667 retval = slot->ops->disable_slot(slot); in power_write_file()
668 if (slot->ops->owner) in power_write_file()
669 __MOD_DEC_USE_COUNT(slot->ops->owner); in power_write_file()
673 if (!slot->ops->enable_slot) in power_write_file()
675 if (slot->ops->owner) in power_write_file()
676 __MOD_INC_USE_COUNT(slot->ops->owner); in power_write_file()
677 retval = slot->ops->enable_slot(slot); in power_write_file()
678 if (slot->ops->owner) in power_write_file()
679 __MOD_DEC_USE_COUNT(slot->ops->owner); in power_write_file()
697 struct hotplug_slot *slot = file->private_data; in attention_read_file() local
712 if (slot == NULL) { in attention_read_file()
721 retval = get_attention_status (slot, &value); in attention_read_file()
740 struct hotplug_slot *slot = file->private_data; in attention_write_file() local
753 if (slot == NULL) { in attention_write_file()
772 if (slot->ops->set_attention_status) { in attention_write_file()
773 if (slot->ops->owner) in attention_write_file()
774 __MOD_INC_USE_COUNT(slot->ops->owner); in attention_write_file()
775 retval = slot->ops->set_attention_status(slot, attention); in attention_write_file()
776 if (slot->ops->owner) in attention_write_file()
777 __MOD_DEC_USE_COUNT(slot->ops->owner); in attention_write_file()
790 struct hotplug_slot *slot = file->private_data; in latch_read_file() local
806 if (slot == NULL) { in latch_read_file()
815 retval = get_latch_status (slot, &value); in latch_read_file()
834 struct hotplug_slot *slot = file->private_data; in presence_read_file() local
850 if (slot == NULL) { in presence_read_file()
859 retval = get_adapter_status (slot, &value); in presence_read_file()
878 struct hotplug_slot *slot = file->private_data; in address_read_file() local
894 if (slot == NULL) { in address_read_file()
903 retval = get_address (slot, &address); in address_read_file()
927 struct hotplug_slot *slot = file->private_data; in max_bus_speed_read_file() local
944 if (slot == NULL) { in max_bus_speed_read_file()
953 retval = get_max_bus_speed (slot, &value); in max_bus_speed_read_file()
978 struct hotplug_slot *slot = file->private_data; in cur_bus_speed_read_file() local
995 if (slot == NULL) { in cur_bus_speed_read_file()
1004 retval = get_cur_bus_speed (slot, &value); in cur_bus_speed_read_file()
1029 struct hotplug_slot *slot = file->private_data; in test_write_file() local
1042 if (slot == NULL) { in test_write_file()
1061 if (slot->ops->hardware_test) { in test_write_file()
1062 if (slot->ops->owner) in test_write_file()
1063 __MOD_INC_USE_COUNT(slot->ops->owner); in test_write_file()
1064 retval = slot->ops->hardware_test(slot, test); in test_write_file()
1065 if (slot->ops->owner) in test_write_file()
1066 __MOD_DEC_USE_COUNT(slot->ops->owner); in test_write_file()
1077 static int fs_add_slot (struct hotplug_slot *slot) in fs_add_slot() argument
1079 struct hotplug_slot_core *core = slot->core_priv; in fs_add_slot()
1086 core->dir_dentry = fs_create_file (slot->name, in fs_add_slot()
1090 if ((slot->ops->enable_slot) || in fs_add_slot()
1091 (slot->ops->disable_slot) || in fs_add_slot()
1092 (slot->ops->get_power_status)) in fs_add_slot()
1096 core->dir_dentry, slot, in fs_add_slot()
1099 if ((slot->ops->set_attention_status) || in fs_add_slot()
1100 (slot->ops->get_attention_status)) in fs_add_slot()
1104 core->dir_dentry, slot, in fs_add_slot()
1107 if (slot->ops->get_latch_status) in fs_add_slot()
1111 core->dir_dentry, slot, in fs_add_slot()
1114 if (slot->ops->get_adapter_status) in fs_add_slot()
1118 core->dir_dentry, slot, in fs_add_slot()
1121 if (slot->ops->get_address) in fs_add_slot()
1125 core->dir_dentry, slot, in fs_add_slot()
1128 if (slot->ops->get_max_bus_speed) in fs_add_slot()
1132 core->dir_dentry, slot, in fs_add_slot()
1135 if (slot->ops->get_cur_bus_speed) in fs_add_slot()
1139 core->dir_dentry, slot, in fs_add_slot()
1142 if (slot->ops->hardware_test) in fs_add_slot()
1146 core->dir_dentry, slot, in fs_add_slot()
1152 static void fs_remove_slot (struct hotplug_slot *slot) in fs_remove_slot() argument
1154 struct hotplug_slot_core *core = slot->core_priv; in fs_remove_slot()
1181 struct hotplug_slot *slot; in get_slot_from_name() local
1185 slot = list_entry (tmp, struct hotplug_slot, slot_list); in get_slot_from_name()
1186 if (strcmp(slot->name, name) == 0) in get_slot_from_name()
1187 return slot; in get_slot_from_name()
1201 int pci_hp_register (struct hotplug_slot *slot) in pci_hp_register() argument
1206 if (slot == NULL) in pci_hp_register()
1208 if ((slot->info == NULL) || (slot->ops == NULL)) in pci_hp_register()
1217 if (get_slot_from_name (slot->name) != NULL) { in pci_hp_register()
1224 slot->core_priv = core; in pci_hp_register()
1226 list_add (&slot->slot_list, &pci_hotplug_slot_list); in pci_hp_register()
1229 result = fs_add_slot (slot); in pci_hp_register()
1230 dbg ("Added slot %s to the list\n", slot->name); in pci_hp_register()
1243 int pci_hp_deregister (struct hotplug_slot *slot) in pci_hp_deregister() argument
1247 if (slot == NULL) in pci_hp_deregister()
1252 temp = get_slot_from_name (slot->name); in pci_hp_deregister()
1253 if (temp != slot) { in pci_hp_deregister()
1258 list_del (&slot->slot_list); in pci_hp_deregister()
1261 fs_remove_slot (slot); in pci_hp_deregister()
1262 kfree(slot->core_priv); in pci_hp_deregister()
1263 dbg ("Removed slot %s from the list\n", slot->name); in pci_hp_deregister()