diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/scsi/bfa/bfa_lps.c | 20 | ||||
| -rw-r--r-- | drivers/scsi/bfa/fcs_vport.h | 1 | ||||
| -rw-r--r-- | drivers/scsi/bfa/include/bfa_svc.h | 1 | ||||
| -rw-r--r-- | drivers/scsi/bfa/include/fcs/bfa_fcs_lport.h | 8 | ||||
| -rw-r--r-- | drivers/scsi/bfa/lport_api.c | 3 | ||||
| -rw-r--r-- | drivers/scsi/bfa/vport.c | 17 |
6 files changed, 24 insertions, 26 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 | */ |
diff --git a/drivers/scsi/bfa/fcs_vport.h b/drivers/scsi/bfa/fcs_vport.h index 32565ba666eb..13c32ebf946c 100644 --- a/drivers/scsi/bfa/fcs_vport.h +++ b/drivers/scsi/bfa/fcs_vport.h | |||
| @@ -26,7 +26,6 @@ void bfa_fcs_vport_cleanup(struct bfa_fcs_vport_s *vport); | |||
| 26 | void bfa_fcs_vport_online(struct bfa_fcs_vport_s *vport); | 26 | void bfa_fcs_vport_online(struct bfa_fcs_vport_s *vport); |
| 27 | void bfa_fcs_vport_offline(struct bfa_fcs_vport_s *vport); | 27 | void bfa_fcs_vport_offline(struct bfa_fcs_vport_s *vport); |
| 28 | void bfa_fcs_vport_delete_comp(struct bfa_fcs_vport_s *vport); | 28 | void bfa_fcs_vport_delete_comp(struct bfa_fcs_vport_s *vport); |
| 29 | u32 bfa_fcs_vport_get_max(struct bfa_fcs_s *fcs); | ||
| 30 | 29 | ||
| 31 | #endif /* __FCS_VPORT_H__ */ | 30 | #endif /* __FCS_VPORT_H__ */ |
| 32 | 31 | ||
diff --git a/drivers/scsi/bfa/include/bfa_svc.h b/drivers/scsi/bfa/include/bfa_svc.h index 2e4372f66b8b..0d7ed4d963a7 100644 --- a/drivers/scsi/bfa/include/bfa_svc.h +++ b/drivers/scsi/bfa/include/bfa_svc.h | |||
| @@ -293,6 +293,7 @@ void bfa_uf_free(struct bfa_uf_s *uf); | |||
| 293 | * bfa lport service api | 293 | * bfa lport service api |
| 294 | */ | 294 | */ |
| 295 | 295 | ||
| 296 | u32 bfa_lps_get_max_vport(struct bfa_s *bfa); | ||
| 296 | struct bfa_lps_s *bfa_lps_alloc(struct bfa_s *bfa); | 297 | struct bfa_lps_s *bfa_lps_alloc(struct bfa_s *bfa); |
| 297 | void bfa_lps_delete(struct bfa_lps_s *lps); | 298 | void bfa_lps_delete(struct bfa_lps_s *lps); |
| 298 | void bfa_lps_discard(struct bfa_lps_s *lps); | 299 | void bfa_lps_discard(struct bfa_lps_s *lps); |
diff --git a/drivers/scsi/bfa/include/fcs/bfa_fcs_lport.h b/drivers/scsi/bfa/include/fcs/bfa_fcs_lport.h index 967ceb0eb074..ceaefd3060f4 100644 --- a/drivers/scsi/bfa/include/fcs/bfa_fcs_lport.h +++ b/drivers/scsi/bfa/include/fcs/bfa_fcs_lport.h | |||
| @@ -34,14 +34,6 @@ struct bfa_fcs_s; | |||
| 34 | struct bfa_fcs_fabric_s; | 34 | struct bfa_fcs_fabric_s; |
| 35 | 35 | ||
| 36 | /* | 36 | /* |
| 37 | * @todo : need to move to a global config file. | ||
| 38 | * Maximum Vports supported per physical port or vf. | ||
| 39 | */ | ||
| 40 | #define BFA_FCS_MAX_VPORTS_SUPP_CB 255 | ||
| 41 | #define BFA_FCS_MAX_VPORTS_SUPP_CT 191 | ||
| 42 | |||
| 43 | /* | ||
| 44 | * @todo : need to move to a global config file. | ||
| 45 | * Maximum Rports supported per port (physical/logical). | 37 | * Maximum Rports supported per port (physical/logical). |
| 46 | */ | 38 | */ |
| 47 | #define BFA_FCS_MAX_RPORTS_SUPP 256 /* @todo : tentative value */ | 39 | #define BFA_FCS_MAX_RPORTS_SUPP 256 /* @todo : tentative value */ |
diff --git a/drivers/scsi/bfa/lport_api.c b/drivers/scsi/bfa/lport_api.c index 1e06792cd4c2..4a4ccce99364 100644 --- a/drivers/scsi/bfa/lport_api.c +++ b/drivers/scsi/bfa/lport_api.c | |||
| @@ -235,7 +235,8 @@ bfa_fcs_port_get_info(struct bfa_fcs_port_s *port, | |||
| 235 | port_info->port_wwn = bfa_fcs_port_get_pwwn(port); | 235 | port_info->port_wwn = bfa_fcs_port_get_pwwn(port); |
| 236 | port_info->node_wwn = bfa_fcs_port_get_nwwn(port); | 236 | port_info->node_wwn = bfa_fcs_port_get_nwwn(port); |
| 237 | 237 | ||
| 238 | port_info->max_vports_supp = bfa_fcs_vport_get_max(port->fcs); | 238 | port_info->max_vports_supp = |
| 239 | bfa_lps_get_max_vport(port->fcs->bfa); | ||
| 239 | port_info->num_vports_inuse = | 240 | port_info->num_vports_inuse = |
| 240 | bfa_fcs_fabric_vport_count(port->fabric); | 241 | bfa_fcs_fabric_vport_count(port->fabric); |
| 241 | port_info->max_rports_supp = BFA_FCS_MAX_RPORTS_SUPP; | 242 | port_info->max_rports_supp = BFA_FCS_MAX_RPORTS_SUPP; |
diff --git a/drivers/scsi/bfa/vport.c b/drivers/scsi/bfa/vport.c index 75d6f058a461..3dce9e1c947d 100644 --- a/drivers/scsi/bfa/vport.c +++ b/drivers/scsi/bfa/vport.c | |||
| @@ -616,21 +616,6 @@ bfa_fcs_vport_delete_comp(struct bfa_fcs_vport_s *vport) | |||
| 616 | bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_DELCOMP); | 616 | bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_DELCOMP); |
| 617 | } | 617 | } |
| 618 | 618 | ||
| 619 | u32 | ||
| 620 | bfa_fcs_vport_get_max(struct bfa_fcs_s *fcs) | ||
| 621 | { | ||
| 622 | struct bfa_ioc_attr_s ioc_attr; | ||
| 623 | |||
| 624 | bfa_get_attr(fcs->bfa, &ioc_attr); | ||
| 625 | |||
| 626 | if (ioc_attr.pci_attr.device_id == BFA_PCI_DEVICE_ID_CT) | ||
| 627 | return BFA_FCS_MAX_VPORTS_SUPP_CT; | ||
| 628 | else | ||
| 629 | return BFA_FCS_MAX_VPORTS_SUPP_CB; | ||
| 630 | } | ||
| 631 | |||
| 632 | |||
| 633 | |||
| 634 | /** | 619 | /** |
| 635 | * fcs_vport_api Virtual port API | 620 | * fcs_vport_api Virtual port API |
| 636 | */ | 621 | */ |
| @@ -667,7 +652,7 @@ bfa_fcs_vport_create(struct bfa_fcs_vport_s *vport, struct bfa_fcs_s *fcs, | |||
| 667 | return BFA_STATUS_VPORT_EXISTS; | 652 | return BFA_STATUS_VPORT_EXISTS; |
| 668 | 653 | ||
| 669 | if (bfa_fcs_fabric_vport_count(&fcs->fabric) == | 654 | if (bfa_fcs_fabric_vport_count(&fcs->fabric) == |
| 670 | bfa_fcs_vport_get_max(fcs)) | 655 | bfa_lps_get_max_vport(fcs->bfa)) |
| 671 | return BFA_STATUS_VPORT_MAX; | 656 | return BFA_STATUS_VPORT_MAX; |
| 672 | 657 | ||
| 673 | vport->lps = bfa_lps_alloc(fcs->bfa); | 658 | vport->lps = bfa_lps_alloc(fcs->bfa); |
