diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2010-03-05 22:37:57 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-03-07 02:37:00 -0500 |
commit | 0a4b1fc0b24fc7adbaf8413f2992ce1395991a78 (patch) | |
tree | 9a07aeee614e2e3f3191aee552effc467163fb33 /drivers/scsi/bfa/bfa_lps.c | |
parent | f58e9ebbf78bd36c6cf1ca651280d39efe73a7c0 (diff) |
[SCSI] bfa: Replace bfa_get_attr() with specific APIs
bfa_ioc_attr_s is a big structure and some times could cause
stack overflow if defined locally, so add specific APIs that
are needed to replace the use of ioc_attr local var.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_lps.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_lps.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/scsi/bfa/bfa_lps.c b/drivers/scsi/bfa/bfa_lps.c index d2d48a619c30..ad06f6189092 100644 --- a/drivers/scsi/bfa/bfa_lps.c +++ b/drivers/scsi/bfa/bfa_lps.c | |||
@@ -631,11 +631,7 @@ bfa_lps_cvl_event(struct bfa_lps_s *lps) | |||
631 | u32 | 631 | u32 |
632 | bfa_lps_get_max_vport(struct bfa_s *bfa) | 632 | bfa_lps_get_max_vport(struct bfa_s *bfa) |
633 | { | 633 | { |
634 | struct bfa_ioc_attr_s ioc_attr; | 634 | if (bfa_ioc_devid(&bfa->ioc) == BFA_PCI_DEVICE_ID_CT) |
635 | |||
636 | bfa_get_attr(bfa, &ioc_attr); | ||
637 | |||
638 | if (ioc_attr.pci_attr.device_id == BFA_PCI_DEVICE_ID_CT) | ||
639 | return BFA_LPS_MAX_VPORTS_SUPP_CT; | 635 | return BFA_LPS_MAX_VPORTS_SUPP_CT; |
640 | else | 636 | else |
641 | return BFA_LPS_MAX_VPORTS_SUPP_CB; | 637 | return BFA_LPS_MAX_VPORTS_SUPP_CB; |