summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_sas.h
diff options
context:
space:
mode:
authorYang, Bo <Bo.Yang@lsi.com>2009-10-06 14:50:17 -0600
committerJames Bottomley <James.Bottomley@suse.de>2009-10-29 13:03:21 -0400
commit7e8a75f4dfbff173977b2f58799c3eceb7b09afd (patch)
tree3ef74557eaa6cf0ceb6a68e71b0dfb068bb52cb4 /drivers/scsi/megaraid/megaraid_sas.h
parent0c79e681eef10810a5ed41a2eb1dce244ab1c37d (diff)
[SCSI] megaraid_sas: Add the support for updating the OS after adding/removing the devices from FW
Driver will update the OS devices after adding and deleting the device from FW. When driver receive add or delete AEN from FW, driver will send the DCMD cmd to get the System PD list from FW. Then driver will check if this device already in the OS: If add event and OS don't have the device (but it is in the list), driver add the device to OS, otherwise driver will not add. If remove event, driver will check the list, if is not in the list, but OS have the device, driver will remove the device. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas.h')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 13ac37e8007..cd1c008f9ab 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -285,6 +285,17 @@ enum MR_PD_QUERY_TYPE {
MR_PD_QUERY_TYPE_EXPOSED_TO_HOST = 5,
};
+#define MR_EVT_CFG_CLEARED 0x0004
+#define MR_EVT_LD_STATE_CHANGE 0x0051
+#define MR_EVT_PD_INSERTED 0x005b
+#define MR_EVT_PD_REMOVED 0x0070
+#define MR_EVT_LD_CREATED 0x008a
+#define MR_EVT_LD_DELETED 0x008b
+#define MR_EVT_FOREIGN_CFG_IMPORTED 0x00db
+#define MR_EVT_LD_OFFLINE 0x00fc
+#define MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED 0x0152
+#define MAX_LOGICAL_DRIVES 64
+
enum MR_PD_STATE {
MR_PD_STATE_UNCONFIGURED_GOOD = 0x00,
MR_PD_STATE_UNCONFIGURED_BAD = 0x01,
@@ -1157,6 +1168,11 @@ struct megasas_evt_detail {
} __attribute__ ((packed));
+struct megasas_aen_event {
+ struct work_struct hotplug_work;
+ struct megasas_instance *instance;
+};
+
struct megasas_instance {
u32 *producer;
@@ -1176,6 +1192,7 @@ struct megasas_instance {
u16 max_num_sge;
u16 max_fw_cmds;
u32 max_sectors_per_req;
+ struct megasas_aen_event *ev;
struct megasas_cmd **cmd_list;
struct list_head cmd_pool;