linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/17] lpfc: Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get.
@ 2015-12-16 23:11 James Smart
  2015-12-17  8:02 ` Hannes Reinecke
  0 siblings, 1 reply; 2+ messages in thread
From: James Smart @ 2015-12-16 23:11 UTC (permalink / raw)
  To: linux-scsi


Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
---
 drivers/scsi/lpfc/lpfc_sli.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index f9585cd..6aae828 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -16173,7 +16173,7 @@ fail_fcf_read:
 }
 
 /**
- * lpfc_check_next_fcf_pri
+ * lpfc_check_next_fcf_pri_level
  * phba pointer to the lpfc_hba struct for this port.
  * This routine is called from the lpfc_sli4_fcf_rr_next_index_get
  * routine when the rr_bmask is empty. The FCF indecies are put into the
@@ -16329,8 +16329,12 @@ next_priority:
 
 	if (next_fcf_index < LPFC_SLI4_FCF_TBL_INDX_MAX &&
 		phba->fcf.fcf_pri[next_fcf_index].fcf_rec.flag &
-		LPFC_FCF_FLOGI_FAILED)
+		LPFC_FCF_FLOGI_FAILED) {
+		if (list_is_singular(&phba->fcf.fcf_pri_list))
+			return LPFC_FCOE_FCF_NEXT_NONE;
+
 		goto next_priority;
+	}
 
 	lpfc_printf_log(phba, KERN_INFO, LOG_FIP,
 			"2845 Get next roundrobin failover FCF (x%x)\n",
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 01/17] lpfc: Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get.
  2015-12-16 23:11 [PATCH 01/17] lpfc: Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get James Smart
@ 2015-12-17  8:02 ` Hannes Reinecke
  0 siblings, 0 replies; 2+ messages in thread
From: Hannes Reinecke @ 2015-12-17  8:02 UTC (permalink / raw)
  To: James Smart, linux-scsi

On 12/17/2015 12:11 AM, James Smart wrote:
>
> Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get.
>
> Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
> Signed-off-by: James Smart <james.smart@avagotech.com>
> ---
>   drivers/scsi/lpfc/lpfc_sli.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index f9585cd..6aae828 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -16173,7 +16173,7 @@ fail_fcf_read:
>   }
>
>   /**
> - * lpfc_check_next_fcf_pri
> + * lpfc_check_next_fcf_pri_level
>    * phba pointer to the lpfc_hba struct for this port.
>    * This routine is called from the lpfc_sli4_fcf_rr_next_index_get
>    * routine when the rr_bmask is empty. The FCF indecies are put into the
> @@ -16329,8 +16329,12 @@ next_priority:
>
>   	if (next_fcf_index < LPFC_SLI4_FCF_TBL_INDX_MAX &&
>   		phba->fcf.fcf_pri[next_fcf_index].fcf_rec.flag &
> -		LPFC_FCF_FLOGI_FAILED)
> +		LPFC_FCF_FLOGI_FAILED) {
> +		if (list_is_singular(&phba->fcf.fcf_pri_list))
> +			return LPFC_FCOE_FCF_NEXT_NONE;
> +
>   		goto next_priority;
> +	}
>
>   	lpfc_printf_log(phba, KERN_INFO, LOG_FIP,
>   			"2845 Get next roundrobin failover FCF (x%x)\n",
>
Hehe. I think I've hit that one once.

Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes

-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-17  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16 23:11 [PATCH 01/17] lpfc: Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get James Smart
2015-12-17  8:02 ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).