aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid
diff options
context:
space:
mode:
authorMahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>2015-03-26 10:41:22 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-04-09 19:44:24 -0400
commit46154a0224cfb82a14405e7d7ce486b6e6af63e0 (patch)
tree848077e77f0ab2b388c0d52e4c35bd97ba286422 /drivers/scsi/aacraid
parent29854a4f7b035204c821a67e4e7a60c6d216b794 (diff)
aacraid: AIF support for SES device add/remove
Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Murthy Bhat <Murthy.Bhat@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r--drivers/scsi/aacraid/aacraid.h2
-rw-r--r--drivers/scsi/aacraid/commsup.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index eaaf8705a5f4..284db3937a82 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -1951,6 +1951,8 @@ extern struct aac_common aac_config;
1951#define AifEnEnclosureManagement 13 /* EM_DRIVE_* */ 1951#define AifEnEnclosureManagement 13 /* EM_DRIVE_* */
1952#define EM_DRIVE_INSERTION 31 1952#define EM_DRIVE_INSERTION 31
1953#define EM_DRIVE_REMOVAL 32 1953#define EM_DRIVE_REMOVAL 32
1954#define EM_SES_DRIVE_INSERTION 33
1955#define EM_SES_DRIVE_REMOVAL 26
1954#define AifEnBatteryEvent 14 /* Change in Battery State */ 1956#define AifEnBatteryEvent 14 /* Change in Battery State */
1955#define AifEnAddContainer 15 /* A new array was created */ 1957#define AifEnAddContainer 15 /* A new array was created */
1956#define AifEnDeleteContainer 16 /* A container was deleted */ 1958#define AifEnDeleteContainer 16 /* A container was deleted */
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index cab190af6345..090ba681ff36 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1044,6 +1044,8 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
1044 switch (le32_to_cpu(((__le32 *)aifcmd->data)[3])) { 1044 switch (le32_to_cpu(((__le32 *)aifcmd->data)[3])) {
1045 case EM_DRIVE_INSERTION: 1045 case EM_DRIVE_INSERTION:
1046 case EM_DRIVE_REMOVAL: 1046 case EM_DRIVE_REMOVAL:
1047 case EM_SES_DRIVE_INSERTION:
1048 case EM_SES_DRIVE_REMOVAL:
1047 container = le32_to_cpu( 1049 container = le32_to_cpu(
1048 ((__le32 *)aifcmd->data)[2]); 1050 ((__le32 *)aifcmd->data)[2]);
1049 if ((container >> 28)) { 1051 if ((container >> 28)) {
@@ -1069,8 +1071,10 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
1069 } 1071 }
1070 channel = aac_phys_to_logical(channel); 1072 channel = aac_phys_to_logical(channel);
1071 device_config_needed = 1073 device_config_needed =
1072 (((__le32 *)aifcmd->data)[3] 1074 ((((__le32 *)aifcmd->data)[3]
1073 == cpu_to_le32(EM_DRIVE_INSERTION)) ? 1075 == cpu_to_le32(EM_DRIVE_INSERTION)) ||
1076 (((__le32 *)aifcmd->data)[3]
1077 == cpu_to_le32(EM_SES_DRIVE_INSERTION))) ?
1074 ADD : DELETE; 1078 ADD : DELETE;
1075 break; 1079 break;
1076 } 1080 }