Skip to content

Commit d2f8095

Browse files
Vasu DevJames Bottomley
authored andcommitted
[SCSI] fcoe: fix broken fcoe interface reset
Reset using "fcoeadm -r" also needs to restart FIP before doing libfc lport reset, this is needed for new switch firmware requiring FIP solicitation before doing FLOGI again during reset. So this patch does this by doing fcoe_ctlr_link_down and then fcoe_ctlr_link_up to reset the interface. The fcoe_ctlr_link_down call path also does lport reset and then fcoe_ctlr_link_up re-starts the fabric login after doing FIP solicitation first to get reset feature working again. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
1 parent f2f96d2 commit d2f8095

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/scsi/fcoe/fcoe.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2130,7 +2130,13 @@ void fcoe_percpu_clean(struct fc_lport *lport)
21302130
int fcoe_reset(struct Scsi_Host *shost)
21312131
{
21322132
struct fc_lport *lport = shost_priv(shost);
2133-
fc_lport_reset(lport);
2133+
struct fcoe_port *port = lport_priv(lport);
2134+
struct fcoe_interface *fcoe = port->priv;
2135+
2136+
fcoe_ctlr_link_down(&fcoe->ctlr);
2137+
fcoe_clean_pending_queue(fcoe->ctlr.lp);
2138+
if (!fcoe_link_ok(fcoe->ctlr.lp))
2139+
fcoe_ctlr_link_up(&fcoe->ctlr);
21342140
return 0;
21352141
}
21362142

0 commit comments

Comments
 (0)