#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci_hotplug.h>
#include <linux/proc_fs.h>
#include <asm/sn/addrs.h>
#include <asm/sn/module.h>
#include <asm/sn/pcibr_provider.h>
#include <asm/sn/pcibus_provider_defs.h>
#include <asm/sn/pcidev.h>
#include <asm/sn/sn_feature_sets.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/types.h>
MODULE_AUTHOR("SGI (prarit@sgi.com, dickie@sgi.com, habeck@sgi.com)");
MODULE_DESCRIPTION("SGI Altix Hot Plug PCI Controller Driver");
#define PCI_SLOT_ALREADY_UP 2
#define PCI_SLOT_ALREADY_DOWN 3
#define PCI_EMPTY_33MHZ 15
#define PCIIO_ASIC_TYPE_TIOCA 4
#define SN_MAX_HP_SLOTS 32
#define SN_SLOT_NAME_SIZE 33
static struct list_head sn_hp_list;
struct hotplug_slot hotplug_slot;
struct list_head hp_list;
char physical_path[SN_SLOT_NAME_SIZE];
struct pcibr_slot_enable_resp {
char resp_l1_msg[PCI_L1_QSIZE + 1];
struct pcibr_slot_disable_resp {
char resp_l1_msg[PCI_L1_QSIZE + 1];
static int enable_slot(struct hotplug_slot *slot);
static int disable_slot(struct hotplug_slot *slot);
static inline int get_power_status(struct hotplug_slot *slot, u8 *value);
static const struct hotplug_slot_ops sn_hotplug_slot_ops = {
.enable_slot = enable_slot,
.disable_slot = disable_slot,
.get_power_status = get_power_status,
static DEFINE_MUTEX(sn_hotplug_mutex);
static struct slot *to_slot(struct hotplug_slot *bss_hotplug_slot)