diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2012-08-22 19:52:43 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-24 12:10:57 +0400 |
commit | ce7242b80278426a798c13ce96657690db9332d9 (patch) | |
tree | 13f5bd2249c0ac6c544325cda5692bc804386a17 /drivers/scsi/bfa/bfa_fcbuild.c | |
parent | 9aec02497590cac5abdb5c044e3ec57010b1d808 (diff) | |
download | talos-obmc-linux-ce7242b80278426a798c13ce96657690db9332d9.tar.gz talos-obmc-linux-ce7242b80278426a798c13ce96657690db9332d9.zip |
[SCSI] bfa: Add support to register node symbolic name with name server
- Changes to register node symbolic name with name server on the fabric
by sending CT commands RNN_ID and RSNN_NN.
Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcbuild.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_fcbuild.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfa_fcbuild.c b/drivers/scsi/bfa/bfa_fcbuild.c index 17b59b8b5644..273cee90b3b4 100644 --- a/drivers/scsi/bfa/bfa_fcbuild.c +++ b/drivers/scsi/bfa/bfa_fcbuild.c @@ -1252,6 +1252,27 @@ fc_rspnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id, } u16 +fc_rsnn_nn_build(struct fchs_s *fchs, void *pyld, u32 s_id, + wwn_t node_name, u8 *name) +{ + struct ct_hdr_s *cthdr = (struct ct_hdr_s *) pyld; + struct fcgs_rsnn_nn_req_s *rsnn_nn = + (struct fcgs_rsnn_nn_req_s *) (cthdr + 1); + u32 d_id = bfa_hton3b(FC_NAME_SERVER); + + fc_gs_fchdr_build(fchs, d_id, s_id, 0); + fc_gs_cthdr_build(cthdr, s_id, GS_RSNN_NN); + + memset(rsnn_nn, 0, sizeof(struct fcgs_rsnn_nn_req_s)); + + rsnn_nn->node_name = node_name; + rsnn_nn->snn_len = (u8) strlen((char *)name); + strncpy((char *)rsnn_nn->snn, (char *)name, rsnn_nn->snn_len); + + return sizeof(struct fcgs_rsnn_nn_req_s) + sizeof(struct ct_hdr_s); +} + +u16 fc_gid_ft_build(struct fchs_s *fchs, void *pyld, u32 s_id, u8 fc4_type) { |