diff options
Diffstat (limited to 'drivers/scsi/libfc/fc_lport.c')
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 3f2f72390145..bd2f77197447 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
@@ -452,56 +452,6 @@ static void fc_lport_recv_rnid_req(struct fc_seq *sp, struct fc_frame *in_fp, | |||
452 | } | 452 | } |
453 | 453 | ||
454 | /** | 454 | /** |
455 | * fc_lport_recv_adisc_req() - Handle received Address Discovery Request | ||
456 | * @lport: Fibre Channel local port recieving the ADISC | ||
457 | * @sp: current sequence in the ADISC exchange | ||
458 | * @fp: ADISC request frame | ||
459 | * | ||
460 | * Locking Note: The lport lock is expected to be held before calling | ||
461 | * this function. | ||
462 | */ | ||
463 | static void fc_lport_recv_adisc_req(struct fc_seq *sp, struct fc_frame *in_fp, | ||
464 | struct fc_lport *lport) | ||
465 | { | ||
466 | struct fc_frame *fp; | ||
467 | struct fc_exch *ep = fc_seq_exch(sp); | ||
468 | struct fc_els_adisc *req, *rp; | ||
469 | struct fc_seq_els_data rjt_data; | ||
470 | size_t len; | ||
471 | u32 f_ctl; | ||
472 | |||
473 | FC_LPORT_DBG(lport, "Received ADISC request while in state %s\n", | ||
474 | fc_lport_state(lport)); | ||
475 | |||
476 | req = fc_frame_payload_get(in_fp, sizeof(*req)); | ||
477 | if (!req) { | ||
478 | rjt_data.fp = NULL; | ||
479 | rjt_data.reason = ELS_RJT_LOGIC; | ||
480 | rjt_data.explan = ELS_EXPL_NONE; | ||
481 | lport->tt.seq_els_rsp_send(sp, ELS_LS_RJT, &rjt_data); | ||
482 | } else { | ||
483 | len = sizeof(*rp); | ||
484 | fp = fc_frame_alloc(lport, len); | ||
485 | if (fp) { | ||
486 | rp = fc_frame_payload_get(fp, len); | ||
487 | memset(rp, 0, len); | ||
488 | rp->adisc_cmd = ELS_LS_ACC; | ||
489 | rp->adisc_wwpn = htonll(lport->wwpn); | ||
490 | rp->adisc_wwnn = htonll(lport->wwnn); | ||
491 | hton24(rp->adisc_port_id, | ||
492 | fc_host_port_id(lport->host)); | ||
493 | sp = lport->tt.seq_start_next(sp); | ||
494 | f_ctl = FC_FC_EX_CTX | FC_FC_LAST_SEQ; | ||
495 | f_ctl |= FC_FC_END_SEQ | FC_FC_SEQ_INIT; | ||
496 | fc_fill_fc_hdr(fp, FC_RCTL_ELS_REP, ep->did, ep->sid, | ||
497 | FC_TYPE_ELS, f_ctl, 0); | ||
498 | lport->tt.seq_send(lport, sp, fp); | ||
499 | } | ||
500 | } | ||
501 | fc_frame_free(in_fp); | ||
502 | } | ||
503 | |||
504 | /** | ||
505 | * fc_lport_recv_logo_req() - Handle received fabric LOGO request | 455 | * fc_lport_recv_logo_req() - Handle received fabric LOGO request |
506 | * @lport: Fibre Channel local port recieving the LOGO | 456 | * @lport: Fibre Channel local port recieving the LOGO |
507 | * @sp: current sequence in the LOGO exchange | 457 | * @sp: current sequence in the LOGO exchange |
@@ -849,9 +799,6 @@ static void fc_lport_recv_req(struct fc_lport *lport, struct fc_seq *sp, | |||
849 | case ELS_RNID: | 799 | case ELS_RNID: |
850 | recv = fc_lport_recv_rnid_req; | 800 | recv = fc_lport_recv_rnid_req; |
851 | break; | 801 | break; |
852 | case ELS_ADISC: | ||
853 | recv = fc_lport_recv_adisc_req; | ||
854 | break; | ||
855 | } | 802 | } |
856 | 803 | ||
857 | recv(sp, fp, lport); | 804 | recv(sp, fp, lport); |