#define KMSG_COMPONENT "zpci"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
#include <linux/kernel.h>
#include <linux/pci_hotplug.h>
#include <asm/pci_debug.h>
#define SLOT_NAME_SIZE 10
static LIST_HEAD(s390_hotplug_slot_list);
static int zpci_fn_configured(enum zpci_state state)
return state == ZPCI_FN_STATE_CONFIGURED ||
state == ZPCI_FN_STATE_ONLINE;
struct list_head slot_list;
struct hotplug_slot hotplug_slot;
static inline struct slot *to_slot(struct hotplug_slot *hotplug_slot)
return container_of(hotplug_slot, struct slot, hotplug_slot);
static inline int slot_configure(struct slot *slot)
int ret = sclp_pci_configure(slot->zdev->fid);
zpci_dbg(3, "conf fid:%x, rc:%d\n", slot->zdev->fid, ret);
slot->zdev->state = ZPCI_FN_STATE_CONFIGURED;
static inline int slot_deconfigure(struct slot *slot)
int ret = sclp_pci_deconfigure(slot->zdev->fid);
zpci_dbg(3, "deconf fid:%x, rc:%d\n", slot->zdev->fid, ret);
slot->zdev->state = ZPCI_FN_STATE_STANDBY;