public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Dept-GELinuxNICDev@qlogic.com
Cc: netdev@vger.kernel.org, manish.chopra@qlogic.com,
	kernel-janitors@vger.kernel.org
Subject: [patch] qlcnic: fix a loop exit condition better
Date: Thu, 24 Dec 2015 09:21:22 +0000	[thread overview]
Message-ID: <20151224092122.GG29642@mwanda> (raw)
In-Reply-To: <20151215201734.GJ5177@mwanda>

In the original code, if we succeeded on the last iteration through the
loop then we still returned failure.

Fixes: 389e4e04ad2d ('qlcnic: fix a timeout loop')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
index b1a452f..3490675 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
@@ -252,7 +252,7 @@ int qlcnic_83xx_check_vnic_state(struct qlcnic_adapter *adapter)
 		state = QLCRDX(ahw, QLC_83XX_VNIC_STATE);
 	}
 
-	if (!idc->vnic_wait_limit) {
+	if (state != QLCNIC_DEV_NPAR_OPER) {
 		dev_err(&adapter->pdev->dev,
 			"vNIC mode not operational, state check timed out.\n");
 		return -EIO;

  reply	other threads:[~2015-12-24  9:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 10:16 [patch] qlcnic: fix a timeout loop Dan Carpenter
2015-12-15 13:46 ` Manish Chopra
2015-12-15 13:56   ` [patch v2] " Dan Carpenter
2015-12-15 18:13     ` David Miller
2015-12-15 20:13       ` Dan Carpenter
2015-12-15 20:17         ` Dan Carpenter
2015-12-24  9:21           ` Dan Carpenter [this message]
2015-12-24 16:02             ` [patch] qlcnic: fix a loop exit condition better David Miller
2015-12-15 16:35   ` [patch] qlcnic: fix a timeout loop walter harms

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151224092122.GG29642@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=Dept-GELinuxNICDev@qlogic.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=manish.chopra@qlogic.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox