diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2012-08-22 19:52:58 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-24 12:10:57 +0400 |
commit | 61ba43947e61dcda4af0993135a7268e4c0465b9 (patch) | |
tree | 36a176d07d0e23a51f94f03b2b1c505ca66df3c0 /drivers/scsi/bfa/bfa_fcpim.c | |
parent | ce7242b80278426a798c13ce96657690db9332d9 (diff) | |
download | linux-61ba43947e61dcda4af0993135a7268e4c0465b9.tar.gz linux-61ba43947e61dcda4af0993135a7268e4c0465b9.tar.bz2 linux-61ba43947e61dcda4af0993135a7268e4c0465b9.zip |
[SCSI] bfa: Add support for max target ports discovery
- Changes to avoid discovering NPIV port as remote port by the other
NPIV ports created on same physical port when all the NPIV ports are
part of the same zone in a fabric.
- Provided mechanism to support maximum number of target ports for a
given initiator port (physical port + NPIV ports) irrespective of the
way in which the initiator and target ports are zoned in the fabric.
- Introduced module_parameter max_rport_logins to restrict number of
remote ports discovery which includes target and initiator remote ports.
Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcpim.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_fcpim.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c index f0f80e282e39..1633963c66ca 100644 --- a/drivers/scsi/bfa/bfa_fcpim.c +++ b/drivers/scsi/bfa/bfa_fcpim.c @@ -1466,7 +1466,13 @@ bfa_status_t bfa_itnim_get_ioprofile(struct bfa_itnim_s *itnim, struct bfa_itnim_ioprofile_s *ioprofile) { - struct bfa_fcpim_s *fcpim = BFA_FCPIM(itnim->bfa); + struct bfa_fcpim_s *fcpim; + + if (!itnim) + return BFA_STATUS_NO_FCPIM_NEXUS; + + fcpim = BFA_FCPIM(itnim->bfa); + if (!fcpim->io_profile) return BFA_STATUS_IOPROFILE_OFF; @@ -1484,6 +1490,10 @@ void bfa_itnim_clear_stats(struct bfa_itnim_s *itnim) { int j; + + if (!itnim) + return; + memset(&itnim->stats, 0, sizeof(itnim->stats)); memset(&itnim->ioprofile, 0, sizeof(itnim->ioprofile)); for (j = 0; j < BFA_IOBUCKET_MAX; j++) |