diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2011-07-21 02:03:46 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-07-27 12:54:03 +0200 |
commit | 45c5dc1d3f42d4f54a5ab5f45ee55f0ffe1099f1 (patch) | |
tree | d0a5f76929e47c6876f6db5b9a03a1d60c2d9b62 /drivers/scsi/bfa/bfa_ioc.h | |
parent | [SCSI] bfa: Add support to collect / reset fabric stats. (diff) | |
download | linux-45c5dc1d3f42d4f54a5ab5f45ee55f0ffe1099f1.tar.xz linux-45c5dc1d3f42d4f54a5ab5f45ee55f0ffe1099f1.zip |
[SCSI] bfa: Add support to store driver configuration in flash.
- Added dconf (Driver Config) BFA sub-module.
- The dconf sub-module provides interfaces and manages flash writes
to the flash DRV parition.
- dconf sub-module also ensures that the whole 64K DRV partition is updated
on a flash write.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioc.h')
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.h b/drivers/scsi/bfa/bfa_ioc.h index a7463c955117..546d46b37101 100644 --- a/drivers/scsi/bfa/bfa_ioc.h +++ b/drivers/scsi/bfa/bfa_ioc.h @@ -661,7 +661,6 @@ struct bfa_phy_s { struct bfa_ioc_notify_s ioc_notify; /* ioc event notify */ struct bfa_mem_dma_s phy_dma; }; - #define BFA_PHY(__bfa) (&(__bfa)->modules.phy) #define BFA_MEM_PHY_DMA(__bfa) (&(BFA_PHY(__bfa)->phy_dma)) @@ -687,6 +686,49 @@ void bfa_phy_memclaim(struct bfa_phy_s *phy, void bfa_phy_intr(void *phyarg, struct bfi_mbmsg_s *msg); /* + * Driver Config( dconf) specific + */ +#define BFI_DCONF_SIGNATURE 0xabcdabcd +#define BFI_DCONF_VERSION 1 + +#pragma pack(1) +struct bfa_dconf_hdr_s { + u32 signature; + u32 version; +}; + +struct bfa_dconf_s { + struct bfa_dconf_hdr_s hdr; + struct bfa_lunmask_cfg_s lun_mask; +}; +#pragma pack() + +struct bfa_dconf_mod_s { + bfa_sm_t sm; + u8 instance; + bfa_boolean_t flashdone; + bfa_boolean_t read_data_valid; + bfa_boolean_t min_cfg; + struct bfa_timer_s timer; + struct bfa_s *bfa; + void *bfad; + void *trcmod; + struct bfa_dconf_s *dconf; + struct bfa_mem_kva_s kva_seg; +}; + +#define BFA_DCONF_MOD(__bfa) \ + (&(__bfa)->modules.dconf_mod) +#define BFA_MEM_DCONF_KVA(__bfa) (&(BFA_DCONF_MOD(__bfa)->kva_seg)) +#define bfa_dconf_read_data_valid(__bfa) \ + (BFA_DCONF_MOD(__bfa)->read_data_valid) +#define BFA_DCONF_UPDATE_TOV 5000 /* memtest timeout in msec */ + +void bfa_dconf_modinit(struct bfa_s *bfa); +void bfa_dconf_modexit(struct bfa_s *bfa); +bfa_status_t bfa_dconf_update(struct bfa_s *bfa); + +/* * IOC specfic macros */ #define bfa_ioc_pcifn(__ioc) ((__ioc)->pcidev.pci_func) |