@@ -259,40 +259,6 @@ fc_plogi_acc_build(struct fchs_s *fchs, void *pld, u32 d_id, u32 s_id,
259259 node_name , pdu_size , bb_cr , FC_ELS_ACC );
260260}
261261
262- enum fc_parse_status
263- fc_plogi_rsp_parse (struct fchs_s * fchs , int len , wwn_t port_name )
264- {
265- struct fc_els_cmd_s * els_cmd = (struct fc_els_cmd_s * ) (fchs + 1 );
266- struct fc_logi_s * plogi ;
267- struct fc_ls_rjt_s * ls_rjt ;
268-
269- switch (els_cmd -> els_code ) {
270- case FC_ELS_LS_RJT :
271- ls_rjt = (struct fc_ls_rjt_s * ) (fchs + 1 );
272- if (ls_rjt -> reason_code == FC_LS_RJT_RSN_LOGICAL_BUSY )
273- return FC_PARSE_BUSY ;
274- else
275- return FC_PARSE_FAILURE ;
276- case FC_ELS_ACC :
277- plogi = (struct fc_logi_s * ) (fchs + 1 );
278- if (len < sizeof (struct fc_logi_s ))
279- return FC_PARSE_FAILURE ;
280-
281- if (!wwn_is_equal (plogi -> port_name , port_name ))
282- return FC_PARSE_FAILURE ;
283-
284- if (!plogi -> class3 .class_valid )
285- return FC_PARSE_FAILURE ;
286-
287- if (be16_to_cpu (plogi -> class3 .rxsz ) < (FC_MIN_PDUSZ ))
288- return FC_PARSE_FAILURE ;
289-
290- return FC_PARSE_OK ;
291- default :
292- return FC_PARSE_FAILURE ;
293- }
294- }
295-
296262enum fc_parse_status
297263fc_plogi_parse (struct fchs_s * fchs )
298264{
@@ -365,21 +331,6 @@ fc_prli_rsp_parse(struct fc_prli_s *prli, int len)
365331 return FC_PARSE_OK ;
366332}
367333
368- enum fc_parse_status
369- fc_prli_parse (struct fc_prli_s * prli )
370- {
371- if (prli -> parampage .type != FC_TYPE_FCP )
372- return FC_PARSE_FAILURE ;
373-
374- if (!prli -> parampage .imagepair )
375- return FC_PARSE_FAILURE ;
376-
377- if (!prli -> parampage .servparams .initiator )
378- return FC_PARSE_FAILURE ;
379-
380- return FC_PARSE_OK ;
381- }
382-
383334u16
384335fc_logo_build (struct fchs_s * fchs , struct fc_logo_s * logo , u32 d_id , u32 s_id ,
385336 u16 ox_id , wwn_t port_name )
@@ -450,55 +401,6 @@ fc_adisc_rsp_parse(struct fc_adisc_s *adisc, int len, wwn_t port_name,
450401 return FC_PARSE_OK ;
451402}
452403
453- enum fc_parse_status
454- fc_adisc_parse (struct fchs_s * fchs , void * pld , u32 host_dap , wwn_t node_name ,
455- wwn_t port_name )
456- {
457- struct fc_adisc_s * adisc = (struct fc_adisc_s * ) pld ;
458-
459- if (adisc -> els_cmd .els_code != FC_ELS_ACC )
460- return FC_PARSE_FAILURE ;
461-
462- if ((adisc -> nport_id == (host_dap ))
463- && wwn_is_equal (adisc -> orig_port_name , port_name )
464- && wwn_is_equal (adisc -> orig_node_name , node_name ))
465- return FC_PARSE_OK ;
466-
467- return FC_PARSE_FAILURE ;
468- }
469-
470- enum fc_parse_status
471- fc_pdisc_parse (struct fchs_s * fchs , wwn_t node_name , wwn_t port_name )
472- {
473- struct fc_logi_s * pdisc = (struct fc_logi_s * ) (fchs + 1 );
474-
475- if (pdisc -> class3 .class_valid != 1 )
476- return FC_PARSE_FAILURE ;
477-
478- if ((be16_to_cpu (pdisc -> class3 .rxsz ) <
479- (FC_MIN_PDUSZ - sizeof (struct fchs_s )))
480- || (pdisc -> class3 .rxsz == 0 ))
481- return FC_PARSE_FAILURE ;
482-
483- if (!wwn_is_equal (pdisc -> port_name , port_name ))
484- return FC_PARSE_FAILURE ;
485-
486- if (!wwn_is_equal (pdisc -> node_name , node_name ))
487- return FC_PARSE_FAILURE ;
488-
489- return FC_PARSE_OK ;
490- }
491-
492- enum fc_parse_status
493- fc_abts_rsp_parse (struct fchs_s * fchs , int len )
494- {
495- if ((fchs -> cat_info == FC_CAT_BA_ACC )
496- || (fchs -> cat_info == FC_CAT_BA_RJT ))
497- return FC_PARSE_OK ;
498-
499- return FC_PARSE_FAILURE ;
500- }
501-
502404u16
503405fc_logo_acc_build (struct fchs_s * fchs , void * pld , u32 d_id , u32 s_id ,
504406 __be16 ox_id )
@@ -666,29 +568,6 @@ fc_rpsc_acc_build(struct fchs_s *fchs, struct fc_rpsc_acc_s *rpsc_acc,
666568 return sizeof (struct fc_rpsc_acc_s );
667569}
668570
669- u16
670- fc_pdisc_rsp_parse (struct fchs_s * fchs , int len , wwn_t port_name )
671- {
672- struct fc_logi_s * pdisc = (struct fc_logi_s * ) (fchs + 1 );
673-
674- if (len < sizeof (struct fc_logi_s ))
675- return FC_PARSE_LEN_INVAL ;
676-
677- if (pdisc -> els_cmd .els_code != FC_ELS_ACC )
678- return FC_PARSE_ACC_INVAL ;
679-
680- if (!wwn_is_equal (pdisc -> port_name , port_name ))
681- return FC_PARSE_PWWN_NOT_EQUAL ;
682-
683- if (!pdisc -> class3 .class_valid )
684- return FC_PARSE_NWWN_NOT_EQUAL ;
685-
686- if (be16_to_cpu (pdisc -> class3 .rxsz ) < (FC_MIN_PDUSZ ))
687- return FC_PARSE_RXSZ_INVAL ;
688-
689- return FC_PARSE_OK ;
690- }
691-
692571static void
693572fc_gs_cthdr_build (struct ct_hdr_s * cthdr , u32 s_id , u16 cmd_code )
694573{
@@ -752,19 +631,6 @@ fc_gpnid_build(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id,
752631 return sizeof (fcgs_gpnid_req_t ) + sizeof (struct ct_hdr_s );
753632}
754633
755- u16
756- fc_ct_rsp_parse (struct ct_hdr_s * cthdr )
757- {
758- if (be16_to_cpu (cthdr -> cmd_rsp_code ) != CT_RSP_ACCEPT ) {
759- if (cthdr -> reason_code == CT_RSN_LOGICAL_BUSY )
760- return FC_PARSE_BUSY ;
761- else
762- return FC_PARSE_FAILURE ;
763- }
764-
765- return FC_PARSE_OK ;
766- }
767-
768634u16
769635fc_gs_rjt_build (struct fchs_s * fchs , struct ct_hdr_s * cthdr ,
770636 u32 d_id , u32 s_id , u16 ox_id , u8 reason_code ,
0 commit comments