aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe
diff options
context:
space:
mode:
authorVasu Dev <vasu.dev@intel.com>2011-10-28 14:34:23 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-31 05:27:43 -0400
commit907c07d45199f954ddcf66c2c9763c87d012cb15 (patch)
tree4d25bde865cc84feebf93d73c7dd186a6e15be2a /drivers/scsi/fcoe
parentb6e3c84034b93e6acc895711f74730e235dfe9d2 (diff)
[SCSI] libfc: improve flogi retries to avoid lport stuck
Adds more cases to do flogi retry, now also retry on getting bad response due to either no ELS response or flogi response payload length not large enough. In those cases flogi was not retried and that was leaving lport offline. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r--drivers/scsi/fcoe/fcoe.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 61384ee4049b..cefbe44bb84a 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -2347,14 +2347,11 @@ static void fcoe_flogi_resp(struct fc_seq *seq, struct fc_frame *fp, void *arg)
2347 goto done; 2347 goto done;
2348 2348
2349 mac = fr_cb(fp)->granted_mac; 2349 mac = fr_cb(fp)->granted_mac;
2350 if (is_zero_ether_addr(mac)) { 2350 /* pre-FIP */
2351 /* pre-FIP */ 2351 if (is_zero_ether_addr(mac))
2352 if (fcoe_ctlr_recv_flogi(fip, lport, fp)) { 2352 fcoe_ctlr_recv_flogi(fip, lport, fp);
2353 fc_frame_free(fp); 2353 if (!is_zero_ether_addr(mac))
2354 return; 2354 fcoe_update_src_mac(lport, mac);
2355 }
2356 }
2357 fcoe_update_src_mac(lport, mac);
2358done: 2355done:
2359 fc_lport_flogi_resp(seq, fp, lport); 2356 fc_lport_flogi_resp(seq, fp, lport);
2360} 2357}