diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2010-12-13 19:17:11 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 13:37:15 -0500 |
commit | f1d584d70f31f54e0a559049906f42db89e2746d (patch) | |
tree | 7bfa223d53221c5930802b988a8bb6c0aed201d6 /drivers/scsi/bfa/bfa_ioc.h | |
parent | f3a060ca57903daaf2f1a88c6c25832619b2a74f (diff) |
[SCSI] bfa: IOC auto recovery fix.
- Made IOC auto_recovery synchronized and not timer based.
- Only one PCI function will attempt to recover and reinitialize
the ASIC on a failure, after all the active PCI fns
acknowledge the IOC failure.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioc.h')
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.h b/drivers/scsi/bfa/bfa_ioc.h index 62153f283216..5d2f34290e9d 100644 --- a/drivers/scsi/bfa/bfa_ioc.h +++ b/drivers/scsi/bfa/bfa_ioc.h | |||
@@ -149,8 +149,11 @@ struct bfa_ioc_regs_s { | |||
149 | void __iomem *host_page_num_fn; | 149 | void __iomem *host_page_num_fn; |
150 | void __iomem *heartbeat; | 150 | void __iomem *heartbeat; |
151 | void __iomem *ioc_fwstate; | 151 | void __iomem *ioc_fwstate; |
152 | void __iomem *alt_ioc_fwstate; | ||
152 | void __iomem *ll_halt; | 153 | void __iomem *ll_halt; |
154 | void __iomem *alt_ll_halt; | ||
153 | void __iomem *err_set; | 155 | void __iomem *err_set; |
156 | void __iomem *ioc_fail_sync; | ||
154 | void __iomem *shirq_isr_next; | 157 | void __iomem *shirq_isr_next; |
155 | void __iomem *shirq_msk_next; | 158 | void __iomem *shirq_msk_next; |
156 | void __iomem *smem_page_start; | 159 | void __iomem *smem_page_start; |
@@ -258,8 +261,12 @@ struct bfa_ioc_hwif_s { | |||
258 | void (*ioc_map_port) (struct bfa_ioc_s *ioc); | 261 | void (*ioc_map_port) (struct bfa_ioc_s *ioc); |
259 | void (*ioc_isr_mode_set) (struct bfa_ioc_s *ioc, | 262 | void (*ioc_isr_mode_set) (struct bfa_ioc_s *ioc, |
260 | bfa_boolean_t msix); | 263 | bfa_boolean_t msix); |
261 | void (*ioc_notify_hbfail) (struct bfa_ioc_s *ioc); | 264 | void (*ioc_notify_fail) (struct bfa_ioc_s *ioc); |
262 | void (*ioc_ownership_reset) (struct bfa_ioc_s *ioc); | 265 | void (*ioc_ownership_reset) (struct bfa_ioc_s *ioc); |
266 | void (*ioc_sync_join) (struct bfa_ioc_s *ioc); | ||
267 | void (*ioc_sync_leave) (struct bfa_ioc_s *ioc); | ||
268 | void (*ioc_sync_ack) (struct bfa_ioc_s *ioc); | ||
269 | bfa_boolean_t (*ioc_sync_complete) (struct bfa_ioc_s *ioc); | ||
263 | }; | 270 | }; |
264 | 271 | ||
265 | #define bfa_ioc_pcifn(__ioc) ((__ioc)->pcidev.pci_func) | 272 | #define bfa_ioc_pcifn(__ioc) ((__ioc)->pcidev.pci_func) |
@@ -289,6 +296,15 @@ struct bfa_ioc_hwif_s { | |||
289 | #define BFA_IOC_FLASH_OFFSET_IN_CHUNK(off) (off % BFI_FLASH_CHUNK_SZ_WORDS) | 296 | #define BFA_IOC_FLASH_OFFSET_IN_CHUNK(off) (off % BFI_FLASH_CHUNK_SZ_WORDS) |
290 | #define BFA_IOC_FLASH_CHUNK_ADDR(chunkno) (chunkno * BFI_FLASH_CHUNK_SZ_WORDS) | 297 | #define BFA_IOC_FLASH_CHUNK_ADDR(chunkno) (chunkno * BFI_FLASH_CHUNK_SZ_WORDS) |
291 | 298 | ||
299 | #ifdef BFA_IOC_IS_UEFI | ||
300 | #define bfa_ioc_is_bios_optrom(__ioc) (0) | ||
301 | #define bfa_ioc_is_uefi(__ioc) BFA_IOC_IS_UEFI | ||
302 | #else | ||
303 | #define bfa_ioc_is_bios_optrom(__ioc) \ | ||
304 | (bfa_cb_image_get_size(BFA_IOC_FWIMG_TYPE(__ioc)) < BFA_IOC_FWIMG_MINSZ) | ||
305 | #define bfa_ioc_is_uefi(__ioc) (0) | ||
306 | #endif | ||
307 | |||
292 | /* | 308 | /* |
293 | * IOC mailbox interface | 309 | * IOC mailbox interface |
294 | */ | 310 | */ |
@@ -343,6 +359,7 @@ bfa_boolean_t bfa_ioc_is_initialized(struct bfa_ioc_s *ioc); | |||
343 | bfa_boolean_t bfa_ioc_is_disabled(struct bfa_ioc_s *ioc); | 359 | bfa_boolean_t bfa_ioc_is_disabled(struct bfa_ioc_s *ioc); |
344 | bfa_boolean_t bfa_ioc_fw_mismatch(struct bfa_ioc_s *ioc); | 360 | bfa_boolean_t bfa_ioc_fw_mismatch(struct bfa_ioc_s *ioc); |
345 | bfa_boolean_t bfa_ioc_adapter_is_disabled(struct bfa_ioc_s *ioc); | 361 | bfa_boolean_t bfa_ioc_adapter_is_disabled(struct bfa_ioc_s *ioc); |
362 | void bfa_ioc_reset_fwstate(struct bfa_ioc_s *ioc); | ||
346 | enum bfa_ioc_type_e bfa_ioc_get_type(struct bfa_ioc_s *ioc); | 363 | enum bfa_ioc_type_e bfa_ioc_get_type(struct bfa_ioc_s *ioc); |
347 | void bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num); | 364 | void bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num); |
348 | void bfa_ioc_get_adapter_fw_ver(struct bfa_ioc_s *ioc, char *fw_ver); | 365 | void bfa_ioc_get_adapter_fw_ver(struct bfa_ioc_s *ioc, char *fw_ver); |