diff options
author | Yang, Bo <Bo.Yang@lsi.com> | 2009-10-06 16:50:17 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-10-29 13:03:21 -0400 |
commit | 7e8a75f4dfbff173977b2f58799c3eceb7b09afd (patch) | |
tree | 3ef74557eaa6cf0ceb6a68e71b0dfb068bb52cb4 /drivers/scsi/megaraid/megaraid_sas.h | |
parent | 0c79e681eef10810a5ed41a2eb1dce244ab1c37d (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.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 13ac37e80075..cd1c008f9ab8 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h | |||
@@ -285,6 +285,17 @@ enum MR_PD_QUERY_TYPE { | |||
285 | MR_PD_QUERY_TYPE_EXPOSED_TO_HOST = 5, | 285 | MR_PD_QUERY_TYPE_EXPOSED_TO_HOST = 5, |
286 | }; | 286 | }; |
287 | 287 | ||
288 | #define MR_EVT_CFG_CLEARED 0x0004 | ||
289 | #define MR_EVT_LD_STATE_CHANGE 0x0051 | ||
290 | #define MR_EVT_PD_INSERTED 0x005b | ||
291 | #define MR_EVT_PD_REMOVED 0x0070 | ||
292 | #define MR_EVT_LD_CREATED 0x008a | ||
293 | #define MR_EVT_LD_DELETED 0x008b | ||
294 | #define MR_EVT_FOREIGN_CFG_IMPORTED 0x00db | ||
295 | #define MR_EVT_LD_OFFLINE 0x00fc | ||
296 | #define MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED 0x0152 | ||
297 | #define MAX_LOGICAL_DRIVES 64 | ||
298 | |||
288 | enum MR_PD_STATE { | 299 | enum MR_PD_STATE { |
289 | MR_PD_STATE_UNCONFIGURED_GOOD = 0x00, | 300 | MR_PD_STATE_UNCONFIGURED_GOOD = 0x00, |
290 | MR_PD_STATE_UNCONFIGURED_BAD = 0x01, | 301 | MR_PD_STATE_UNCONFIGURED_BAD = 0x01, |
@@ -1157,6 +1168,11 @@ struct megasas_evt_detail { | |||
1157 | 1168 | ||
1158 | } __attribute__ ((packed)); | 1169 | } __attribute__ ((packed)); |
1159 | 1170 | ||
1171 | struct megasas_aen_event { | ||
1172 | struct work_struct hotplug_work; | ||
1173 | struct megasas_instance *instance; | ||
1174 | }; | ||
1175 | |||
1160 | struct megasas_instance { | 1176 | struct megasas_instance { |
1161 | 1177 | ||
1162 | u32 *producer; | 1178 | u32 *producer; |
@@ -1176,6 +1192,7 @@ struct megasas_instance { | |||
1176 | u16 max_num_sge; | 1192 | u16 max_num_sge; |
1177 | u16 max_fw_cmds; | 1193 | u16 max_fw_cmds; |
1178 | u32 max_sectors_per_req; | 1194 | u32 max_sectors_per_req; |
1195 | struct megasas_aen_event *ev; | ||
1179 | 1196 | ||
1180 | struct megasas_cmd **cmd_list; | 1197 | struct megasas_cmd **cmd_list; |
1181 | struct list_head cmd_pool; | 1198 | struct list_head cmd_pool; |