diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2011-07-20 17:04:03 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-07-27 14:55:03 +0400 |
commit | 83763d591b343b07331cebe86715205230c568b1 (patch) | |
tree | 3d81bae3ca6ddcee24415001b1dd8ed2d27e3599 /drivers/scsi/bfa/bfa.h | |
parent | 45c5dc1d3f42d4f54a5ab5f45ee55f0ffe1099f1 (diff) | |
download | linux-3.10-83763d591b343b07331cebe86715205230c568b1.tar.gz linux-3.10-83763d591b343b07331cebe86715205230c568b1.tar.bz2 linux-3.10-83763d591b343b07331cebe86715205230c568b1.zip |
[SCSI] bfa: Introduced initiator based lun masking feature.
- Added support to enable initiator based lun masking.
- Initiator based Lun masking works similar to zoning where
initiator port is allowed to see only those LUNs which are
configured to be seen.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa.h')
-rw-r--r-- | drivers/scsi/bfa/bfa.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfa.h b/drivers/scsi/bfa/bfa.h index 76300befffb..a796de93505 100644 --- a/drivers/scsi/bfa/bfa.h +++ b/drivers/scsi/bfa/bfa.h @@ -382,6 +382,22 @@ int bfa_iocfc_get_pbc_vports(struct bfa_s *bfa, #define bfa_get_fw_clock_res(__bfa) \ ((__bfa)->iocfc.cfgrsp->fwcfg.fw_tick_res) +/* + * lun mask macros return NULL when min cfg is enabled and there is + * no memory allocated for lunmask. + */ +#define bfa_get_lun_mask(__bfa) \ + ((&(__bfa)->modules.dconf_mod)->min_cfg) ? NULL : \ + (&(BFA_DCONF_MOD(__bfa)->dconf->lun_mask)) + +#define bfa_get_lun_mask_list(_bfa) \ + ((&(_bfa)->modules.dconf_mod)->min_cfg) ? NULL : \ + (bfa_get_lun_mask(_bfa)->lun_list) + +#define bfa_get_lun_mask_status(_bfa) \ + (((&(_bfa)->modules.dconf_mod)->min_cfg) \ + ? BFA_LUNMASK_MINCFG : ((bfa_get_lun_mask(_bfa))->status)) + void bfa_get_pciids(struct bfa_pciid_s **pciids, int *npciids); void bfa_cfg_get_default(struct bfa_iocfc_cfg_s *cfg); void bfa_cfg_get_min(struct bfa_iocfc_cfg_s *cfg); |