aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMoger, Babu <Babu.Moger@lsi.com>2011-04-08 13:37:40 -0400
committerJames Bottomley <James.Bottomley@suse.de>2011-05-01 11:45:22 -0400
commiteebe9b96dda9018cc68a2855ca506ec26a1e449e (patch)
treeb588959290f07ab41834c8c811994b7f3afd2a72 /drivers
parent630ad8317feed51c55fa5c1c701e67430923aad8 (diff)
[SCSI] scsi_dh_rdac : Add definitions for different RDAC operating modes
This patch adds definitions to support for different operating modes for LSI rdac storage. Currently, rdac support 3 operation modes. 1. RDAC mode(legacy) 2. AVT mode 3. IOSHIP mode These definitions are used while activating the path(rdac_activate). Signed-off-by: Babu Moger <babu.moger@lsi.com> Reviewed-by: Yanling Qi <yanling.qi@lsi.com> Reviewed-by: Sudhir Dachepalli <Sudhir.Dachepalli@lis.com> Reviewed-by: Somasundaram Krishnasamy <Somasundaram.Krishnasamy@lsi.com> Reviewed-by: Bob Stankey <Robert.Stankey@lsi.com> Reviewed-by: Vijay Chauhan <Vijay.Chauhan@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/device_handler/scsi_dh_rdac.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index 293c183dfe6d..afb2fb1a5186 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -182,6 +182,12 @@ struct rdac_dh_data {
182 struct rdac_controller *ctlr; 182 struct rdac_controller *ctlr;
183#define UNINITIALIZED_LUN (1 << 8) 183#define UNINITIALIZED_LUN (1 << 8)
184 unsigned lun; 184 unsigned lun;
185
186#define RDAC_MODE 0
187#define RDAC_MODE_AVT 1
188#define RDAC_MODE_IOSHIP 2
189 unsigned char mode;
190
185#define RDAC_STATE_ACTIVE 0 191#define RDAC_STATE_ACTIVE 0
186#define RDAC_STATE_PASSIVE 1 192#define RDAC_STATE_PASSIVE 1
187 unsigned char state; 193 unsigned char state;
@@ -190,6 +196,11 @@ struct rdac_dh_data {
190#define RDAC_LUN_OWNED 1 196#define RDAC_LUN_OWNED 1
191#define RDAC_LUN_AVT 2 197#define RDAC_LUN_AVT 2
192 char lun_state; 198 char lun_state;
199
200#define RDAC_PREFERRED 0
201#define RDAC_NON_PREFERRED 1
202 char preferred;
203
193 unsigned char sense[SCSI_SENSE_BUFFERSIZE]; 204 unsigned char sense[SCSI_SENSE_BUFFERSIZE];
194 union { 205 union {
195 struct c2_inquiry c2; 206 struct c2_inquiry c2;
@@ -199,11 +210,15 @@ struct rdac_dh_data {
199 } inq; 210 } inq;
200}; 211};
201 212
213static const char *mode[] = {
214 "RDAC",
215 "AVT",
216 "IOSHIP",
217};
202static const char *lun_state[] = 218static const char *lun_state[] =
203{ 219{
204 "unowned", 220 "unowned",
205 "owned", 221 "owned",
206 "owned (AVT mode)",
207}; 222};
208 223
209struct rdac_queue_data { 224struct rdac_queue_data {
@@ -836,8 +851,9 @@ static int rdac_bus_attach(struct scsi_device *sdev)
836 spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags); 851 spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags);
837 852
838 sdev_printk(KERN_NOTICE, sdev, 853 sdev_printk(KERN_NOTICE, sdev,
839 "%s: LUN %d (%s)\n", 854 "%s: LUN %d (%s) (%s)\n",
840 RDAC_NAME, h->lun, lun_state[(int)h->lun_state]); 855 RDAC_NAME, h->lun, mode[(int)h->mode],
856 lun_state[(int)h->lun_state]);
841 857
842 return 0; 858 return 0;
843 859