From c1ec1f1bf9cb1ba80e79a74d48bcfb5da246d6f6 Mon Sep 17 00:00:00 2001
From: Andrew Vasquez <andrew.vasquez@qlogic.com>
Date: Thu, 24 Apr 2008 15:21:24 -0700
Subject: [PATCH] [SCSI] qla2xxx: Correct ISP84XX verify-chip response
 handling.

Earlier code could trigger an infinite-retry if 1st invocation
returned a non-CS_COMPLETE status.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
 drivers/scsi/qla2xxx/qla_mbx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 7d0a8a4c77196..a9cb8291f58ef 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -2982,8 +2982,8 @@ qla84xx_verify_chip(struct scsi_qla_host *ha, uint16_t *status)
 	/* We update the firmware with only one data sequence. */
 	options |= VCO_END_OF_DATA;
 
-	retry = 0;
 	do {
+		retry = 0;
 		memset(mn, 0, sizeof(*mn));
 		mn->p.req.entry_type = VERIFY_CHIP_IOCB_TYPE;
 		mn->p.req.entry_count = 1;
-- 
GitLab