diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-10-27 13:37:53 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-11 19:22:33 -0500 |
commit | a8adb83208020c913f010cb4e26d09e25300db8e (patch) | |
tree | 2245ca9f0dba5139946c99d45b80e7f2ce324b74 /drivers/scsi/lpfc/lpfc_nportdisc.c | |
parent | 87af33fe5f78c27cf9e43c6e586dd6efd4be3e40 (diff) |
[SCSI] lpfc 8.2.3 : Miscellaneous Small Fixes - part 2
Miscellaneous Small Fixes - part 2
- Fix ndlp left in PLOGI state after link up
- Fix cannot rcv unsol ELS frames after running HBA resets for a few minutes
- Fix HBQ buffer_count implemention
- Fix RPI leak
- Fix crash while deleting vports while HBA is reset
- Revert the FCP Fbits offset back to 7
- Fix panic when deleting vports
- Remove unused code in switch statement outside of a case
- Reject PLOGI from invalid PName or NName of 0
- Ignore PLOGI responses from WWPName or WWNName of 0
- Fix debugfs hbqinfo display for ppc
- Added 8G to list of supported speeds for sysfs parameter
- Defer ndlp cleanup to dev-loss timeout handler
- Added support for WRITE_VPARMS mailbox command by applications
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nportdisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index bba1fb6103f6..c654c787c3e6 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
@@ -287,6 +287,24 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
287 | pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; | 287 | pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; |
288 | lp = (uint32_t *) pcmd->virt; | 288 | lp = (uint32_t *) pcmd->virt; |
289 | sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t)); | 289 | sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t)); |
290 | if (wwn_to_u64(sp->portName.u.wwn) == 0) { | ||
291 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | ||
292 | "0140 PLOGI Reject: invalid nname\n"); | ||
293 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | ||
294 | stat.un.b.lsRjtRsnCodeExp = LSEXP_INVALID_PNAME; | ||
295 | lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, | ||
296 | NULL); | ||
297 | return 0; | ||
298 | } | ||
299 | if (wwn_to_u64(sp->nodeName.u.wwn) == 0) { | ||
300 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | ||
301 | "0141 PLOGI Reject: invalid pname\n"); | ||
302 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | ||
303 | stat.un.b.lsRjtRsnCodeExp = LSEXP_INVALID_NNAME; | ||
304 | lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, | ||
305 | NULL); | ||
306 | return 0; | ||
307 | } | ||
290 | if ((lpfc_check_sparm(vport, ndlp, sp, CLASS3) == 0)) { | 308 | if ((lpfc_check_sparm(vport, ndlp, sp, CLASS3) == 0)) { |
291 | /* Reject this request because invalid parameters */ | 309 | /* Reject this request because invalid parameters */ |
292 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | 310 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; |
@@ -821,6 +839,12 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, | |||
821 | 839 | ||
822 | lp = (uint32_t *) prsp->virt; | 840 | lp = (uint32_t *) prsp->virt; |
823 | sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t)); | 841 | sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t)); |
842 | if (wwn_to_u64(sp->portName.u.wwn) == 0 || | ||
843 | wwn_to_u64(sp->nodeName.u.wwn) == 0) { | ||
844 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | ||
845 | "0142 PLOGI RSP: Invalid WWN.\n"); | ||
846 | goto out; | ||
847 | } | ||
824 | if (!lpfc_check_sparm(vport, ndlp, sp, CLASS3)) | 848 | if (!lpfc_check_sparm(vport, ndlp, sp, CLASS3)) |
825 | goto out; | 849 | goto out; |
826 | /* PLOGI chkparm OK */ | 850 | /* PLOGI chkparm OK */ |
@@ -906,9 +930,7 @@ out: | |||
906 | "0261 Cannot Register NameServer login\n"); | 930 | "0261 Cannot Register NameServer login\n"); |
907 | } | 931 | } |
908 | 932 | ||
909 | /* Free this node since the driver cannot login or has the wrong | 933 | ndlp->nlp_flag |= NLP_DEFER_RM; |
910 | sparm */ | ||
911 | lpfc_nlp_not_used(ndlp); | ||
912 | return NLP_STE_FREED_NODE; | 934 | return NLP_STE_FREED_NODE; |
913 | } | 935 | } |
914 | 936 | ||
@@ -1795,7 +1817,7 @@ lpfc_cmpl_plogi_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
1795 | 1817 | ||
1796 | irsp = &rspiocb->iocb; | 1818 | irsp = &rspiocb->iocb; |
1797 | if (irsp->ulpStatus) { | 1819 | if (irsp->ulpStatus) { |
1798 | lpfc_nlp_not_used(ndlp); | 1820 | ndlp->nlp_flag |= NLP_DEFER_RM; |
1799 | return NLP_STE_FREED_NODE; | 1821 | return NLP_STE_FREED_NODE; |
1800 | } | 1822 | } |
1801 | return ndlp->nlp_state; | 1823 | return ndlp->nlp_state; |