diff options
author | James Smart <james.smart@emulex.com> | 2010-02-26 14:15:57 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-03-03 08:40:09 -0500 |
commit | 0c9ab6f5cb28199ef5de84874d135ed44f64d92b (patch) | |
tree | 51140c5edce1250e0c06b5a38b540b533b092247 /drivers/scsi/lpfc/lpfc_sli4.h | |
parent | fc2b989be9190f3311a5ae41289828e24897a20e (diff) |
[SCSI] lpfc 8.3.10: Added round robin FCF failover
- Added round robin FCF failover on initial or FCF rediscovery FLOGI failure.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli4.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli4.h | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h index 2169cd24d90c..4a35e7b9bc5b 100644 --- a/drivers/scsi/lpfc/lpfc_sli4.h +++ b/drivers/scsi/lpfc/lpfc_sli4.h | |||
@@ -153,17 +153,27 @@ struct lpfc_fcf { | |||
153 | #define FCF_REGISTERED 0x02 /* FCF registered with FW */ | 153 | #define FCF_REGISTERED 0x02 /* FCF registered with FW */ |
154 | #define FCF_SCAN_DONE 0x04 /* FCF table scan done */ | 154 | #define FCF_SCAN_DONE 0x04 /* FCF table scan done */ |
155 | #define FCF_IN_USE 0x08 /* Atleast one discovery completed */ | 155 | #define FCF_IN_USE 0x08 /* Atleast one discovery completed */ |
156 | #define FCF_DEAD_FOVER 0x10 /* FCF DEAD triggered fast FCF failover */ | 156 | #define FCF_INIT_DISC 0x10 /* Initial FCF discovery */ |
157 | #define FCF_CVL_FOVER 0x20 /* CVL triggered fast FCF failover */ | 157 | #define FCF_DEAD_DISC 0x20 /* FCF DEAD fast FCF failover discovery */ |
158 | #define FCF_REDISC_PEND 0x40 /* FCF rediscovery pending */ | 158 | #define FCF_ACVL_DISC 0x40 /* All CVL fast FCF failover discovery */ |
159 | #define FCF_REDISC_EVT 0x80 /* FCF rediscovery event to worker thread */ | 159 | #define FCF_DISCOVERY (FCF_INIT_DISC | FCF_DEAD_DISC | FCF_ACVL_DISC) |
160 | #define FCF_REDISC_FOV 0x100 /* Post FCF rediscovery fast failover */ | 160 | #define FCF_REDISC_PEND 0x80 /* FCF rediscovery pending */ |
161 | #define FCF_REDISC_EVT 0x100 /* FCF rediscovery event to worker thread */ | ||
162 | #define FCF_REDISC_FOV 0x200 /* Post FCF rediscovery fast failover */ | ||
161 | uint32_t addr_mode; | 163 | uint32_t addr_mode; |
164 | uint16_t fcf_rr_init_indx; | ||
162 | struct lpfc_fcf_rec current_rec; | 165 | struct lpfc_fcf_rec current_rec; |
163 | struct lpfc_fcf_rec failover_rec; | 166 | struct lpfc_fcf_rec failover_rec; |
164 | struct timer_list redisc_wait; | 167 | struct timer_list redisc_wait; |
168 | unsigned long *fcf_rr_bmask; /* Eligible FCF indexes for RR failover */ | ||
165 | }; | 169 | }; |
166 | 170 | ||
171 | /* | ||
172 | * Maximum FCF table index, it is for driver internal book keeping, it | ||
173 | * just needs to be no less than the supported HBA's FCF table size. | ||
174 | */ | ||
175 | #define LPFC_SLI4_FCF_TBL_INDX_MAX 32 | ||
176 | |||
167 | #define LPFC_REGION23_SIGNATURE "RG23" | 177 | #define LPFC_REGION23_SIGNATURE "RG23" |
168 | #define LPFC_REGION23_VERSION 1 | 178 | #define LPFC_REGION23_VERSION 1 |
169 | #define LPFC_REGION23_LAST_REC 0xff | 179 | #define LPFC_REGION23_LAST_REC 0xff |
@@ -472,8 +482,8 @@ void lpfc_sli4_mbox_cmd_free(struct lpfc_hba *, struct lpfcMboxq *); | |||
472 | void lpfc_sli4_mbx_sge_set(struct lpfcMboxq *, uint32_t, dma_addr_t, uint32_t); | 482 | void lpfc_sli4_mbx_sge_set(struct lpfcMboxq *, uint32_t, dma_addr_t, uint32_t); |
473 | void lpfc_sli4_mbx_sge_get(struct lpfcMboxq *, uint32_t, | 483 | void lpfc_sli4_mbx_sge_get(struct lpfcMboxq *, uint32_t, |
474 | struct lpfc_mbx_sge *); | 484 | struct lpfc_mbx_sge *); |
475 | int lpfc_sli4_mbx_read_fcf_record(struct lpfc_hba *, struct lpfcMboxq *, | 485 | int lpfc_sli4_mbx_read_fcf_rec(struct lpfc_hba *, struct lpfcMboxq *, |
476 | uint16_t); | 486 | uint16_t); |
477 | 487 | ||
478 | void lpfc_sli4_hba_reset(struct lpfc_hba *); | 488 | void lpfc_sli4_hba_reset(struct lpfc_hba *); |
479 | struct lpfc_queue *lpfc_sli4_queue_alloc(struct lpfc_hba *, uint32_t, | 489 | struct lpfc_queue *lpfc_sli4_queue_alloc(struct lpfc_hba *, uint32_t, |
@@ -532,8 +542,13 @@ int lpfc_sli4_init_vpi(struct lpfc_hba *, uint16_t); | |||
532 | uint32_t lpfc_sli4_cq_release(struct lpfc_queue *, bool); | 542 | uint32_t lpfc_sli4_cq_release(struct lpfc_queue *, bool); |
533 | uint32_t lpfc_sli4_eq_release(struct lpfc_queue *, bool); | 543 | uint32_t lpfc_sli4_eq_release(struct lpfc_queue *, bool); |
534 | void lpfc_sli4_fcfi_unreg(struct lpfc_hba *, uint16_t); | 544 | void lpfc_sli4_fcfi_unreg(struct lpfc_hba *, uint16_t); |
535 | int lpfc_sli4_read_fcf_record(struct lpfc_hba *, uint16_t); | 545 | int lpfc_sli4_fcf_scan_read_fcf_rec(struct lpfc_hba *, uint16_t); |
536 | void lpfc_mbx_cmpl_read_fcf_record(struct lpfc_hba *, LPFC_MBOXQ_t *); | 546 | int lpfc_sli4_fcf_rr_read_fcf_rec(struct lpfc_hba *, uint16_t); |
547 | int lpfc_sli4_read_fcf_rec(struct lpfc_hba *, uint16_t); | ||
548 | void lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *, LPFC_MBOXQ_t *); | ||
549 | void lpfc_mbx_cmpl_fcf_rr_read_fcf_rec(struct lpfc_hba *, LPFC_MBOXQ_t *); | ||
550 | void lpfc_mbx_cmpl_read_fcf_rec(struct lpfc_hba *, LPFC_MBOXQ_t *); | ||
551 | int lpfc_sli4_unregister_fcf(struct lpfc_hba *); | ||
537 | int lpfc_sli4_post_status_check(struct lpfc_hba *); | 552 | int lpfc_sli4_post_status_check(struct lpfc_hba *); |
538 | uint8_t lpfc_sli4_mbox_opcode_get(struct lpfc_hba *, struct lpfcMboxq *); | 553 | uint8_t lpfc_sli4_mbox_opcode_get(struct lpfc_hba *, struct lpfcMboxq *); |
539 | 554 | ||