]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/hotplug/pciehp.h
Merge branch 'linus' into x86/threadinfo
[linux-2.6-omap-h63xx.git] / drivers / pci / hotplug / pciehp.h
index f14267e197dd7677ca3d70bc9293f970fa35a3fe..79c9ddaad3fb4e9b7754f951b9845476e0d1c5f3 100644 (file)
@@ -93,11 +93,11 @@ struct controller {
        u8 slot_device_offset;
        u32 first_slot;         /* First physical slot number */  /* PCIE only has 1 slot */
        u8 slot_bus;            /* Bus where the slots handled by this controller sit */
-       u8 ctrlcap;
+       u32 slot_cap;
        u8 cap_base;
        struct timer_list poll_timer;
        volatile int cmd_busy;
-       spinlock_t lock;
+       unsigned int no_cmd_complete:1;
 };
 
 #define INT_BUTTON_IGNORE              0
@@ -136,21 +136,23 @@ struct controller {
 #define PWR_LED_PRSN   0x00000010
 #define HP_SUPR_RM_SUP 0x00000020
 #define EMI_PRSN       0x00020000
+#define NO_CMD_CMPL_SUP        0x00040000
 
-#define ATTN_BUTTN(cap)                (cap & ATTN_BUTTN_PRSN)
-#define POWER_CTRL(cap)                (cap & PWR_CTRL_PRSN)
-#define MRL_SENS(cap)          (cap & MRL_SENS_PRSN)
-#define ATTN_LED(cap)          (cap & ATTN_LED_PRSN)
-#define PWR_LED(cap)           (cap & PWR_LED_PRSN) 
-#define HP_SUPR_RM(cap)                (cap & HP_SUPR_RM_SUP)
-#define EMI(cap)               (cap & EMI_PRSN)
+#define ATTN_BUTTN(ctrl)       ((ctrl)->slot_cap & ATTN_BUTTN_PRSN)
+#define POWER_CTRL(ctrl)       ((ctrl)->slot_cap & PWR_CTRL_PRSN)
+#define MRL_SENS(ctrl)         ((ctrl)->slot_cap & MRL_SENS_PRSN)
+#define ATTN_LED(ctrl)         ((ctrl)->slot_cap & ATTN_LED_PRSN)
+#define PWR_LED(ctrl)          ((ctrl)->slot_cap & PWR_LED_PRSN)
+#define HP_SUPR_RM(ctrl)       ((ctrl)->slot_cap & HP_SUPR_RM_SUP)
+#define EMI(ctrl)              ((ctrl)->slot_cap & EMI_PRSN)
+#define NO_CMD_CMPL(ctrl)      ((ctrl)->slot_cap & NO_CMD_CMPL_SUP)
 
 extern int pciehp_sysfs_enable_slot(struct slot *slot);
 extern int pciehp_sysfs_disable_slot(struct slot *slot);
-extern u8 pciehp_handle_attention_button(u8 hp_slot, struct controller *ctrl);
-extern u8 pciehp_handle_switch_change(u8 hp_slot, struct controller *ctrl);
-extern u8 pciehp_handle_presence_change(u8 hp_slot, struct controller *ctrl);
-extern u8 pciehp_handle_power_fault(u8 hp_slot, struct controller *ctrl);
+extern u8 pciehp_handle_attention_button(struct slot *p_slot);
+  extern u8 pciehp_handle_switch_change(struct slot *p_slot);
+extern u8 pciehp_handle_presence_change(struct slot *p_slot);
+extern u8 pciehp_handle_power_fault(struct slot *p_slot);
 extern int pciehp_configure_device(struct slot *p_slot);
 extern int pciehp_unconfigure_device(struct slot *p_slot);
 extern void pciehp_queue_pushbutton_work(struct work_struct *work);