Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d391966a authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen
Browse files

scsi: libfc: send LOGO for PLOGI failure



When running in point-to-multipoint mode PLOGI is done after FLOGI
completed. So when the PLOGI fails we should be sending a LOGO to the
remote port.

[mkp: Applied by hand]

Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
Reviewed-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Tested-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 166f310b
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -547,15 +547,23 @@ static void fc_rport_timeout(struct work_struct *work)
 */
static void fc_rport_error(struct fc_rport_priv *rdata, struct fc_frame *fp)
{
	struct fc_lport *lport = rdata->local_port;

	FC_RPORT_DBG(rdata, "Error %ld in state %s, retries %d\n",
		     IS_ERR(fp) ? -PTR_ERR(fp) : 0,
		     fc_rport_state(rdata), rdata->retries);

	switch (rdata->rp_state) {
	case RPORT_ST_FLOGI:
		rdata->flags &= ~FC_RP_STARTED;
		fc_rport_enter_delete(rdata, RPORT_EV_FAILED);
		break;
	case RPORT_ST_PLOGI:
		if (lport->point_to_multipoint) {
			rdata->flags &= ~FC_RP_STARTED;
			fc_rport_enter_delete(rdata, RPORT_EV_FAILED);
		} else
			fc_rport_enter_logo(rdata);
		break;
	case RPORT_ST_RTV:
		fc_rport_enter_ready(rdata);