Skip to content

Commit 46154a0

Browse files
Mahesh RajashekharaJames Bottomley
authored andcommitted
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>
1 parent 29854a4 commit 46154a0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

drivers/scsi/aacraid/aacraid.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,8 @@ extern struct aac_common aac_config;
19511951
#define AifEnEnclosureManagement 13 /* EM_DRIVE_* */
19521952
#define EM_DRIVE_INSERTION 31
19531953
#define EM_DRIVE_REMOVAL 32
1954+
#define EM_SES_DRIVE_INSERTION 33
1955+
#define EM_SES_DRIVE_REMOVAL 26
19541956
#define AifEnBatteryEvent 14 /* Change in Battery State */
19551957
#define AifEnAddContainer 15 /* A new array was created */
19561958
#define AifEnDeleteContainer 16 /* A container was deleted */

drivers/scsi/aacraid/commsup.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,8 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
10441044
switch (le32_to_cpu(((__le32 *)aifcmd->data)[3])) {
10451045
case EM_DRIVE_INSERTION:
10461046
case EM_DRIVE_REMOVAL:
1047+
case EM_SES_DRIVE_INSERTION:
1048+
case EM_SES_DRIVE_REMOVAL:
10471049
container = le32_to_cpu(
10481050
((__le32 *)aifcmd->data)[2]);
10491051
if ((container >> 28)) {
@@ -1069,8 +1071,10 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
10691071
}
10701072
channel = aac_phys_to_logical(channel);
10711073
device_config_needed =
1072-
(((__le32 *)aifcmd->data)[3]
1073-
== cpu_to_le32(EM_DRIVE_INSERTION)) ?
1074+
((((__le32 *)aifcmd->data)[3]
1075+
== cpu_to_le32(EM_DRIVE_INSERTION)) ||
1076+
(((__le32 *)aifcmd->data)[3]
1077+
== cpu_to_le32(EM_SES_DRIVE_INSERTION))) ?
10741078
ADD : DELETE;
10751079
break;
10761080
}

0 commit comments

Comments
 (0)