From 29d898e909e3d086055e2649f5a24d4c2c1ca884 Mon Sep 17 00:00:00 2001 From: Joe Eykholt Date: Tue, 25 Aug 2009 14:02:49 -0700 Subject: [SCSI] libfc: clean up point-to-point discovery code. The discovery code had a special-case for the point-to-point mode, which used a bunch of code that wasn't really needed. Now that rport_create adds the rport to the discovery list, completely skip discovery for the point-to-point case. Signed-off-by: Joe Eykholt Signed-off-by: Robert Love Signed-off-by: James Bottomley --- drivers/scsi/libfc/fc_lport.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'drivers/scsi/libfc/fc_lport.c') diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index f33e5732e3f..7000df57369 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -708,7 +708,8 @@ static void fc_lport_enter_ready(struct fc_lport *lport) fc_lport_state_enter(lport, LPORT_ST_READY); - lport->tt.disc_start(fc_lport_disc_callback, lport); + if (!lport->ptp_rp) + lport->tt.disc_start(fc_lport_disc_callback, lport); } /** @@ -794,8 +795,6 @@ static void fc_lport_recv_flogi_req(struct fc_seq *sp_in, fc_lport_ptp_setup(lport, remote_fid, remote_wwpn, get_unaligned_be64(&flp->fl_wwnn)); - lport->tt.disc_start(fc_lport_disc_callback, lport); - out: sp = fr_seq(rx_fp); fc_frame_free(rx_fp); @@ -1512,14 +1511,6 @@ static void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, fc_lport_enter_dns(lport); } } - - if (flp) { - csp_flags = ntohs(flp->fl_csp.sp_features); - if ((csp_flags & FC_SP_FT_FPORT) == 0) { - lport->tt.disc_start(fc_lport_disc_callback, - lport); - } - } } else { FC_LPORT_DBG(lport, "Bad FLOGI response\n"); } -- cgit v1.2.3-18-g5258