diff options
author | James Smart <james.smart@emulex.com> | 2010-02-12 14:41:27 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-02-17 18:40:29 -0500 |
commit | ecfd03c6a99ad98fea5cb75ec83cd9945adff8d9 (patch) | |
tree | 9c480ef51f00384e616a68c6a6fc8a8f4b7c8795 /drivers/scsi/lpfc/lpfc_sli4.h | |
parent | 1dfb5a47bc76c700969e41cdc2df6d1bf0adeb62 (diff) |
[SCSI] lpfc 8.3.9: Discovery changes to the lpfc driver.
- Add init_vpi mailbox command before re-registering VPI.
- Add Fast FCF failover support.
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 | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h index 2e5e40576864..0a4f59ea21d0 100644 --- a/drivers/scsi/lpfc/lpfc_sli4.h +++ b/drivers/scsi/lpfc/lpfc_sli4.h | |||
@@ -22,6 +22,10 @@ | |||
22 | #define LPFC_RELEASE_NOTIFICATION_INTERVAL 32 | 22 | #define LPFC_RELEASE_NOTIFICATION_INTERVAL 32 |
23 | #define LPFC_GET_QE_REL_INT 32 | 23 | #define LPFC_GET_QE_REL_INT 32 |
24 | #define LPFC_RPI_LOW_WATER_MARK 10 | 24 | #define LPFC_RPI_LOW_WATER_MARK 10 |
25 | |||
26 | /* Amount of time in seconds for waiting FCF rediscovery to complete */ | ||
27 | #define LPFC_FCF_REDISCOVER_WAIT_TMO 2000 /* msec */ | ||
28 | |||
25 | /* Number of SGL entries can be posted in a 4KB nonembedded mbox command */ | 29 | /* Number of SGL entries can be posted in a 4KB nonembedded mbox command */ |
26 | #define LPFC_NEMBED_MBOX_SGL_CNT 254 | 30 | #define LPFC_NEMBED_MBOX_SGL_CNT 254 |
27 | 31 | ||
@@ -129,22 +133,33 @@ struct lpfc_sli4_link { | |||
129 | uint16_t logical_speed; | 133 | uint16_t logical_speed; |
130 | }; | 134 | }; |
131 | 135 | ||
132 | struct lpfc_fcf { | 136 | struct lpfc_fcf_rec { |
133 | uint8_t fabric_name[8]; | 137 | uint8_t fabric_name[8]; |
134 | uint8_t switch_name[8]; | 138 | uint8_t switch_name[8]; |
135 | uint8_t mac_addr[6]; | 139 | uint8_t mac_addr[6]; |
136 | uint16_t fcf_indx; | 140 | uint16_t fcf_indx; |
141 | uint32_t priority; | ||
142 | uint16_t vlan_id; | ||
143 | uint32_t addr_mode; | ||
144 | uint32_t flag; | ||
145 | #define BOOT_ENABLE 0x01 | ||
146 | #define RECORD_VALID 0x02 | ||
147 | }; | ||
148 | |||
149 | struct lpfc_fcf { | ||
137 | uint16_t fcfi; | 150 | uint16_t fcfi; |
138 | uint32_t fcf_flag; | 151 | uint32_t fcf_flag; |
139 | #define FCF_AVAILABLE 0x01 /* FCF available for discovery */ | 152 | #define FCF_AVAILABLE 0x01 /* FCF available for discovery */ |
140 | #define FCF_REGISTERED 0x02 /* FCF registered with FW */ | 153 | #define FCF_REGISTERED 0x02 /* FCF registered with FW */ |
141 | #define FCF_DISCOVERED 0x04 /* FCF discovery started */ | 154 | #define FCF_SCAN_DONE 0x04 /* FCF table scan done */ |
142 | #define FCF_BOOT_ENABLE 0x08 /* Boot bios use this FCF */ | 155 | #define FCF_IN_USE 0x08 /* Atleast one discovery completed */ |
143 | #define FCF_IN_USE 0x10 /* Atleast one discovery completed */ | 156 | #define FCF_REDISC_PEND 0x10 /* FCF rediscovery pending */ |
144 | #define FCF_VALID_VLAN 0x20 /* Use the vlan id specified */ | 157 | #define FCF_REDISC_EVT 0x20 /* FCF rediscovery event to worker thread */ |
145 | uint32_t priority; | 158 | #define FCF_REDISC_FOV 0x40 /* Post FCF rediscovery fast failover */ |
146 | uint32_t addr_mode; | 159 | uint32_t addr_mode; |
147 | uint16_t vlan_id; | 160 | struct lpfc_fcf_rec current_rec; |
161 | struct lpfc_fcf_rec failover_rec; | ||
162 | struct timer_list redisc_wait; | ||
148 | }; | 163 | }; |
149 | 164 | ||
150 | #define LPFC_REGION23_SIGNATURE "RG23" | 165 | #define LPFC_REGION23_SIGNATURE "RG23" |
@@ -407,6 +422,8 @@ void lpfc_sli4_mbox_cmd_free(struct lpfc_hba *, struct lpfcMboxq *); | |||
407 | void lpfc_sli4_mbx_sge_set(struct lpfcMboxq *, uint32_t, dma_addr_t, uint32_t); | 422 | void lpfc_sli4_mbx_sge_set(struct lpfcMboxq *, uint32_t, dma_addr_t, uint32_t); |
408 | void lpfc_sli4_mbx_sge_get(struct lpfcMboxq *, uint32_t, | 423 | void lpfc_sli4_mbx_sge_get(struct lpfcMboxq *, uint32_t, |
409 | struct lpfc_mbx_sge *); | 424 | struct lpfc_mbx_sge *); |
425 | int lpfc_sli4_mbx_read_fcf_record(struct lpfc_hba *, struct lpfcMboxq *, | ||
426 | uint16_t); | ||
410 | 427 | ||
411 | void lpfc_sli4_hba_reset(struct lpfc_hba *); | 428 | void lpfc_sli4_hba_reset(struct lpfc_hba *); |
412 | struct lpfc_queue *lpfc_sli4_queue_alloc(struct lpfc_hba *, uint32_t, | 429 | struct lpfc_queue *lpfc_sli4_queue_alloc(struct lpfc_hba *, uint32_t, |
@@ -449,6 +466,7 @@ int lpfc_sli4_alloc_rpi(struct lpfc_hba *); | |||
449 | void lpfc_sli4_free_rpi(struct lpfc_hba *, int); | 466 | void lpfc_sli4_free_rpi(struct lpfc_hba *, int); |
450 | void lpfc_sli4_remove_rpis(struct lpfc_hba *); | 467 | void lpfc_sli4_remove_rpis(struct lpfc_hba *); |
451 | void lpfc_sli4_async_event_proc(struct lpfc_hba *); | 468 | void lpfc_sli4_async_event_proc(struct lpfc_hba *); |
469 | void lpfc_sli4_fcf_redisc_event_proc(struct lpfc_hba *); | ||
452 | int lpfc_sli4_resume_rpi(struct lpfc_nodelist *); | 470 | int lpfc_sli4_resume_rpi(struct lpfc_nodelist *); |
453 | void lpfc_sli4_fcp_xri_abort_event_proc(struct lpfc_hba *); | 471 | void lpfc_sli4_fcp_xri_abort_event_proc(struct lpfc_hba *); |
454 | void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *); | 472 | void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *); |