diff options
author | Jing Huang <huangj@brocade.com> | 2010-07-08 22:48:12 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:04:06 -0400 |
commit | 15b64a835def4c784c6e62ad762677f5cb56eba2 (patch) | |
tree | 0d6ca06f6472c2bb71d254dbbc255ea6f18f8988 /drivers/scsi/bfa/bfa_iocfc.c | |
parent | 1769f990fc182695bc215ce4369688064addcd1e (diff) |
[SCSI] bfa: ioc attributes fix
This patch fixes the APIs to obtain ioc attributes
- fix API to obtain wwpn, wwnn, and mac.
- add API to get mfg wwpn, wwnn, and mac.
- fix API to obtain wwn of boot target.
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.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/scsi/bfa/bfa_iocfc.c b/drivers/scsi/bfa/bfa_iocfc.c index d3f1052744d3..6f54bea356c6 100644 --- a/drivers/scsi/bfa/bfa_iocfc.c +++ b/drivers/scsi/bfa/bfa_iocfc.c | |||
@@ -861,13 +861,23 @@ bfa_iocfc_is_operational(struct bfa_s *bfa) | |||
861 | * Return boot target port wwns -- read from boot information in flash. | 861 | * Return boot target port wwns -- read from boot information in flash. |
862 | */ | 862 | */ |
863 | void | 863 | void |
864 | bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t **wwns) | 864 | bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t *wwns) |
865 | { | 865 | { |
866 | struct bfa_iocfc_s *iocfc = &bfa->iocfc; | 866 | struct bfa_iocfc_s *iocfc = &bfa->iocfc; |
867 | struct bfi_iocfc_cfgrsp_s *cfgrsp = iocfc->cfgrsp; | 867 | struct bfi_iocfc_cfgrsp_s *cfgrsp = iocfc->cfgrsp; |
868 | int i; | ||
869 | |||
870 | if (cfgrsp->pbc_cfg.boot_enabled && cfgrsp->pbc_cfg.nbluns) { | ||
871 | bfa_trc(bfa, cfgrsp->pbc_cfg.nbluns); | ||
872 | *nwwns = cfgrsp->pbc_cfg.nbluns; | ||
873 | for (i = 0; i < cfgrsp->pbc_cfg.nbluns; i++) | ||
874 | wwns[i] = cfgrsp->pbc_cfg.blun[i].tgt_pwwn; | ||
875 | |||
876 | return; | ||
877 | } | ||
868 | 878 | ||
869 | *nwwns = cfgrsp->bootwwns.nwwns; | 879 | *nwwns = cfgrsp->bootwwns.nwwns; |
870 | *wwns = cfgrsp->bootwwns.wwn; | 880 | memcpy(wwns, cfgrsp->bootwwns.wwn, sizeof(cfgrsp->bootwwns.wwn)); |
871 | } | 881 | } |
872 | 882 | ||
873 | void | 883 | void |