Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2013 21:29:21 +0000 (UTC)
From:      David C Somayajulu <davidcs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254976 - head/sys/dev/qlxgbe
Message-ID:  <201308272129.r7RLTL0f072183@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davidcs
Date: Tue Aug 27 21:29:21 2013
New Revision: 254976
URL: http://svnweb.freebsd.org/changeset/base/254976

Log:
  Fix bug in Flash access code
  
  Submitted by: David C Somayajulu

Modified:
  head/sys/dev/qlxgbe/ql_misc.c

Modified: head/sys/dev/qlxgbe/ql_misc.c
==============================================================================
--- head/sys/dev/qlxgbe/ql_misc.c	Tue Aug 27 21:28:12 2013	(r254975)
+++ head/sys/dev/qlxgbe/ql_misc.c	Tue Aug 27 21:29:21 2013	(r254976)
@@ -321,7 +321,7 @@ qla_get_fdt(qla_host_t *ha)
 
 	} while ((count < 10000) && (data32 != 0x6));
 
-	if (count == 0 && data32 != 0x6) {
+	if (data32 != 0x6) {
 		qla_sem_unlock(ha, Q8_FLASH_UNLOCK);
 		device_printf(ha->pci_dev,
 			"%s: Poll Q8_FLASH_STATUS failed\n",
@@ -401,7 +401,7 @@ qla_flash_write_enable(qla_host_t *ha, i
 
 	} while ((count < 10000) && (data32 != 0x6));
 			
-	if (count == 0 && data32 != 0x6) {
+	if (data32 != 0x6) {
 		device_printf(ha->pci_dev,
 			"%s: Poll Q8_FLASH_STATUS failed\n",
 			__func__);
@@ -432,7 +432,7 @@ qla_erase_flash_sector(qla_host_t *ha, u
 
 	} while (((count++) < 1000) && (data32 != 0x6));
 
-	if (count == 0 && data32 != 0x6) {
+	if (data32 != 0x6) {
 		device_printf(ha->pci_dev,
 			"%s: Poll Q8_FLASH_STATUS failed\n",
 			__func__);
@@ -479,7 +479,7 @@ qla_erase_flash_sector(qla_host_t *ha, u
 
 	} while (((count++) < 1000) && (data32 != 0x6));
 
-	if (count == 0 && data32 != 0x6) {
+	if (data32 != 0x6) {
 		device_printf(ha->pci_dev,
 			"%s: Poll Q8_FLASH_STATUS failed\n",
 			__func__);
@@ -575,7 +575,7 @@ qla_wr_flash32(qla_host_t *ha, uint32_t 
 
 	} while ((count < 10000) && (data32 != 0x6)); 
 
-	if (count == 0 && data32 != 0x6) {
+	if (data32 != 0x6) {
 		device_printf(ha->pci_dev,
 			"%s: Poll Q8_FLASH_STATUS failed\n",
 			__func__);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308272129.r7RLTL0f072183>