diff options
Diffstat (limited to 'drivers/scsi/bfa/bfa_lps.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_lps.c | 20 |
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 | ||
22 | BFA_TRC_FILE(HAL, LPS); | 23 | BFA_TRC_FILE(HAL, LPS); |
23 | BFA_MODULE(lps); | 24 | BFA_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 | ||
608 | u32 | ||
609 | bfa_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 | */ |