diff options
author | James Smart <james.smart@emulex.com> | 2010-10-22 11:05:36 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-10-25 17:35:36 -0400 |
commit | 5ac6b303834aa74855ecc3db98b4b1d9cad0de2f (patch) | |
tree | 62a3dc32a25d30dcdc4790151e1a01f51b431e9b /drivers/scsi/lpfc/lpfc_els.c | |
parent | 32622bdea031a5a6a6efd6dac9b317de46d5c6f8 (diff) |
[SCSI] lpfc 8.3.18: FC/FCoE Discovery fixes
FC/FCoE Discovery fixes:
- Call the lpfc_drain_txq only for SLI4 hba
- In lpfc_cmpl_els_fdisc, fix code path that does not free IOCB.
- Treated firmware matching FCF property with different index as error
- Propagate error returns from lpfc_issue_els_flogi()
- Refactored lpfc_unregister_unused_fcf() to create a post
lpfc_dev_loss_tmo handler call for SLI-4 devices. Allows checking of
fcf after last ndlp released so that fcf can be released if no longer
in use.
- Replaced individual FCF_XXXX_DISC flag clearing in lieu of aggregate
FCF_DISCOVERY flag upon succesful completion of flogi.
- Correct setting of altBbCredit value in sparams to correct issue with
logins with remote loop-based devices.
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index e6ca12f6c6cb..b16311d60c66 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -523,12 +523,6 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
523 | spin_lock_irq(shost->host_lock); | 523 | spin_lock_irq(shost->host_lock); |
524 | vport->fc_flag |= FC_PUBLIC_LOOP; | 524 | vport->fc_flag |= FC_PUBLIC_LOOP; |
525 | spin_unlock_irq(shost->host_lock); | 525 | spin_unlock_irq(shost->host_lock); |
526 | } else { | ||
527 | /* | ||
528 | * If we are a N-port connected to a Fabric, fixup sparam's so | ||
529 | * logins to devices on remote loops work. | ||
530 | */ | ||
531 | vport->fc_sparam.cmn.altBbCredit = 1; | ||
532 | } | 526 | } |
533 | 527 | ||
534 | vport->fc_myDID = irsp->un.ulpWord[4] & Mask_DID; | 528 | vport->fc_myDID = irsp->un.ulpWord[4] & Mask_DID; |
@@ -1175,12 +1169,13 @@ lpfc_initial_flogi(struct lpfc_vport *vport) | |||
1175 | return 0; | 1169 | return 0; |
1176 | } | 1170 | } |
1177 | 1171 | ||
1178 | if (lpfc_issue_els_flogi(vport, ndlp, 0)) | 1172 | if (lpfc_issue_els_flogi(vport, ndlp, 0)) { |
1179 | /* This decrement of reference count to node shall kick off | 1173 | /* This decrement of reference count to node shall kick off |
1180 | * the release of the node. | 1174 | * the release of the node. |
1181 | */ | 1175 | */ |
1182 | lpfc_nlp_put(ndlp); | 1176 | lpfc_nlp_put(ndlp); |
1183 | 1177 | return 0; | |
1178 | } | ||
1184 | return 1; | 1179 | return 1; |
1185 | } | 1180 | } |
1186 | 1181 | ||
@@ -1645,6 +1640,13 @@ lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry) | |||
1645 | memcpy(pcmd, &vport->fc_sparam, sizeof(struct serv_parm)); | 1640 | memcpy(pcmd, &vport->fc_sparam, sizeof(struct serv_parm)); |
1646 | sp = (struct serv_parm *) pcmd; | 1641 | sp = (struct serv_parm *) pcmd; |
1647 | 1642 | ||
1643 | /* | ||
1644 | * If we are a N-port connected to a Fabric, fix-up paramm's so logins | ||
1645 | * to device on remote loops work. | ||
1646 | */ | ||
1647 | if ((vport->fc_flag & FC_FABRIC) && !(vport->fc_flag & FC_PUBLIC_LOOP)) | ||
1648 | sp->cmn.altBbCredit = 1; | ||
1649 | |||
1648 | if (sp->cmn.fcphLow < FC_PH_4_3) | 1650 | if (sp->cmn.fcphLow < FC_PH_4_3) |
1649 | sp->cmn.fcphLow = FC_PH_4_3; | 1651 | sp->cmn.fcphLow = FC_PH_4_3; |
1650 | 1652 | ||
@@ -6452,7 +6454,7 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
6452 | * to update the MAC address. | 6454 | * to update the MAC address. |
6453 | */ | 6455 | */ |
6454 | lpfc_register_new_vport(phba, vport, ndlp); | 6456 | lpfc_register_new_vport(phba, vport, ndlp); |
6455 | return ; | 6457 | goto out; |
6456 | } | 6458 | } |
6457 | 6459 | ||
6458 | if (vport->fc_flag & FC_VPORT_NEEDS_INIT_VPI) | 6460 | if (vport->fc_flag & FC_VPORT_NEEDS_INIT_VPI) |