@@ -42,6 +42,7 @@
/*
* Controller modes definitions
*/
+#define RDAC_MODE_TRANSFER_ALL_VISIBLE_LUNS 0x01
#define RDAC_MODE_TRANSFER_SPECIFIED_LUNS 0x02
/*
@@ -129,6 +130,7 @@ struct rdac_controller {
u8 subsys_id[SUBSYS_ID_LEN];
u8 slot_id[SLOT_ID_LEN];
int use_ms10;
+ int transfer_all_luns;
struct kref kref;
struct list_head node; /* list of all controllers */
union {
@@ -253,7 +255,8 @@ static struct request *rdac_failover_get(struct scsi_device *sdev,
rdac_pg->subpage_code = 0x1;
rdac_pg->page_len[0] = 0x01;
rdac_pg->page_len[1] = 0x28;
- rdac_pg->lun_table[h->lun] = 0x81;
+ if (!h->ctlr->transfer_all_luns)
+ rdac_pg->lun_table[h->lun] = 0x81;
} else {
struct rdac_pg_legacy *rdac_pg;
@@ -263,9 +266,13 @@ static struct request *rdac_failover_get(struct scsi_device *sdev,
common = &rdac_pg->common;
rdac_pg->page_code = RDAC_PAGE_CODE_REDUNDANT_CONTROLLER;
rdac_pg->page_len = 0x68;
- rdac_pg->lun_table[h->lun] = 0x81;
+ if (!h->ctlr->transfer_all_luns)
+ rdac_pg->lun_table[h->lun] = 0x81;
}
- common->rdac_mode[1] = RDAC_MODE_TRANSFER_SPECIFIED_LUNS;
+ if (h->ctlr->transfer_all_luns)
+ common->rdac_mode[1] = RDAC_MODE_TRANSFER_ALL_VISIBLE_LUNS;
+ else
+ common->rdac_mode[1] = RDAC_MODE_TRANSFER_SPECIFIED_LUNS;
common->quiescence_timeout = RDAC_QUIESCENCE_TIME;
common->rdac_options = RDAC_FORCED_QUIESENCE;
@@ -326,6 +333,7 @@ static struct rdac_controller *get_controller(u8 *subsys_id, u8 *slot_id)
memcpy(ctlr->slot_id, slot_id, SLOT_ID_LEN);
kref_init(&ctlr->kref);
ctlr->use_ms10 = -1;
+ ctlr->transfer_all_luns = 1;
list_add(&ctlr->node, &ctlr_list);
done:
spin_unlock(&list_lock);