[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>
This commit is contained in:
parent
630ad8317f
commit
eebe9b96dd
|
@ -182,6 +182,12 @@ struct rdac_dh_data {
|
||||||
struct rdac_controller *ctlr;
|
struct rdac_controller *ctlr;
|
||||||
#define UNINITIALIZED_LUN (1 << 8)
|
#define UNINITIALIZED_LUN (1 << 8)
|
||||||
unsigned lun;
|
unsigned lun;
|
||||||
|
|
||||||
|
#define RDAC_MODE 0
|
||||||
|
#define RDAC_MODE_AVT 1
|
||||||
|
#define RDAC_MODE_IOSHIP 2
|
||||||
|
unsigned char mode;
|
||||||
|
|
||||||
#define RDAC_STATE_ACTIVE 0
|
#define RDAC_STATE_ACTIVE 0
|
||||||
#define RDAC_STATE_PASSIVE 1
|
#define RDAC_STATE_PASSIVE 1
|
||||||
unsigned char state;
|
unsigned char state;
|
||||||
|
@ -190,6 +196,11 @@ struct rdac_dh_data {
|
||||||
#define RDAC_LUN_OWNED 1
|
#define RDAC_LUN_OWNED 1
|
||||||
#define RDAC_LUN_AVT 2
|
#define RDAC_LUN_AVT 2
|
||||||
char lun_state;
|
char lun_state;
|
||||||
|
|
||||||
|
#define RDAC_PREFERRED 0
|
||||||
|
#define RDAC_NON_PREFERRED 1
|
||||||
|
char preferred;
|
||||||
|
|
||||||
unsigned char sense[SCSI_SENSE_BUFFERSIZE];
|
unsigned char sense[SCSI_SENSE_BUFFERSIZE];
|
||||||
union {
|
union {
|
||||||
struct c2_inquiry c2;
|
struct c2_inquiry c2;
|
||||||
|
@ -199,11 +210,15 @@ struct rdac_dh_data {
|
||||||
} inq;
|
} inq;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char *mode[] = {
|
||||||
|
"RDAC",
|
||||||
|
"AVT",
|
||||||
|
"IOSHIP",
|
||||||
|
};
|
||||||
static const char *lun_state[] =
|
static const char *lun_state[] =
|
||||||
{
|
{
|
||||||
"unowned",
|
"unowned",
|
||||||
"owned",
|
"owned",
|
||||||
"owned (AVT mode)",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rdac_queue_data {
|
struct rdac_queue_data {
|
||||||
|
@ -836,8 +851,9 @@ static int rdac_bus_attach(struct scsi_device *sdev)
|
||||||
spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags);
|
spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags);
|
||||||
|
|
||||||
sdev_printk(KERN_NOTICE, sdev,
|
sdev_printk(KERN_NOTICE, sdev,
|
||||||
"%s: LUN %d (%s)\n",
|
"%s: LUN %d (%s) (%s)\n",
|
||||||
RDAC_NAME, h->lun, lun_state[(int)h->lun_state]);
|
RDAC_NAME, h->lun, mode[(int)h->mode],
|
||||||
|
lun_state[(int)h->lun_state]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue