aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_lps.c
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2010-03-03 20:43:45 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-03-04 05:45:24 -0500
commita046bf0559018ba3d16c412fc4e1aa2be5f11f36 (patch)
treee2f1583a2eadfe2211cf77fc25c03549cf5d0af9 /drivers/scsi/bfa/bfa_lps.c
parent82794a2e4153657d12a0c29272e40b47eaadb748 (diff)
[SCSI] bfa: Fix to allow creation of only 190 vports on CNA.
Brocade CNA currently supports only 190 vports (instead of 191), since there are only 192 unicast cam entries reserved for FCoE. Brocade CNA has a total of 256 unicast cam entries (192 FCoE + 64 LL) 192 cam entries = 1 burned in mac + 1 baseport FPMA mac + 190 vport FPMA macs. Made changes to the code to support only 190 vports. 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.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfa_lps.c b/drivers/scsi/bfa/bfa_lps.c
index c8c2564af725..66b9b15f4294 100644
--- a/drivers/scsi/bfa/bfa_lps.c
+++ b/drivers/scsi/bfa/bfa_lps.c
@@ -18,6 +18,7 @@
18#include <bfa.h> 18#include <bfa.h>
19#include <bfi/bfi_lps.h> 19#include <bfi/bfi_lps.h>
20#include <cs/bfa_debug.h> 20#include <cs/bfa_debug.h>
21#include <defs/bfa_defs_pci.h>
21 22
22BFA_TRC_FILE(HAL, LPS); 23BFA_TRC_FILE(HAL, LPS);
23BFA_MODULE(lps); 24BFA_MODULE(lps);
@@ -25,6 +26,12 @@ BFA_MODULE(lps);
25#define BFA_LPS_MIN_LPORTS (1) 26#define BFA_LPS_MIN_LPORTS (1)
26#define BFA_LPS_MAX_LPORTS (256) 27#define BFA_LPS_MAX_LPORTS (256)
27 28
29/*
30 * Maximum Vports supported per physical port or vf.
31 */
32#define BFA_LPS_MAX_VPORTS_SUPP_CB 255
33#define BFA_LPS_MAX_VPORTS_SUPP_CT 190
34
28/** 35/**
29 * forward declarations 36 * forward declarations
30 */ 37 */
@@ -598,6 +605,19 @@ bfa_lps_cvl_event(struct bfa_lps_s *lps)
598 bfa_cb_lps_cvl_event(lps->bfa->bfad, lps->uarg); 605 bfa_cb_lps_cvl_event(lps->bfa->bfad, lps->uarg);
599} 606}
600 607
608u32
609bfa_lps_get_max_vport(struct bfa_s *bfa)
610{
611 struct bfa_ioc_attr_s ioc_attr;
612
613 bfa_get_attr(bfa, &ioc_attr);
614
615 if (ioc_attr.pci_attr.device_id == BFA_PCI_DEVICE_ID_CT)
616 return (BFA_LPS_MAX_VPORTS_SUPP_CT);
617 else
618 return (BFA_LPS_MAX_VPORTS_SUPP_CB);
619}
620
601/** 621/**
602 * lps_public BFA LPS public functions 622 * lps_public BFA LPS public functions
603 */ 623 */