summaryrefslogtreecommitdiff
path: root/drivers/scsi/bfa/bfa_iocfc.c
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-07-09 06:46:26 +0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 21:04:04 +0400
commitd9883548a0b0afec4786e6c5cd8d03d43a30b779 (patch)
treed7ec50fa682ef49063c80f8d77ca85a4fa38b052 /drivers/scsi/bfa/bfa_iocfc.c
parented96932470e4ca3aab29518a748dc1162853b456 (diff)
downloadlinux-d9883548a0b0afec4786e6c5cd8d03d43a30b779.tar.xz
[SCSI] bfa: PBC vport create
This patch enables creating PBC vport. During fcs init, fcs will read PBC vport using bfa iocfc API and invoke fcb callback to add the pbc vport entries into a list. The pbc vport list will be traversed in the subsequent pci probe process and vport will be created using fc transport provided vport create function. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_iocfc.c')
-rw-r--r--drivers/scsi/bfa/bfa_iocfc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfa_iocfc.c b/drivers/scsi/bfa/bfa_iocfc.c
index afa3da08b788..d3f1052744d3 100644
--- a/drivers/scsi/bfa/bfa_iocfc.c
+++ b/drivers/scsi/bfa/bfa_iocfc.c
@@ -882,6 +882,17 @@ bfa_iocfc_get_pbc_boot_cfg(struct bfa_s *bfa, struct bfa_boot_pbc_s *pbcfg)
memcpy(pbcfg->pblun, cfgrsp->pbc_cfg.blun, sizeof(pbcfg->pblun));
}
+int
+bfa_iocfc_get_pbc_vports(struct bfa_s *bfa, struct bfi_pbc_vport_s *pbc_vport)
+{
+ struct bfa_iocfc_s *iocfc = &bfa->iocfc;
+ struct bfi_iocfc_cfgrsp_s *cfgrsp = iocfc->cfgrsp;
+
+ memcpy(pbc_vport, cfgrsp->pbc_cfg.vport, sizeof(cfgrsp->pbc_cfg.vport));
+ return cfgrsp->pbc_cfg.nvports;
+}
+
+
#endif