netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vipul Pandya <vipul@chelsio.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, divy@chelsio.com, dm@chelsio.com,
	swise@opengridcomputing.com, leedom@chelsio.com,
	felix@chelsio.com, Vipul Pandya <vipul@chelsio.com>,
	Jay Hernandez <jay@chelsio.com>
Subject: [PATCH 6/7] cxgb4: Inform caller if driver didn't upgrade firmware
Date: Wed, 26 Sep 2012 18:09:41 +0530	[thread overview]
Message-ID: <1348663182-20190-7-git-send-email-vipul@chelsio.com> (raw)
In-Reply-To: <1348663182-20190-1-git-send-email-vipul@chelsio.com>

If a card had already been initialized, on reloading cxgb4 driver firmware
required an upgrade but the upgrade did not happen. In that case a mailbox
timeout would occur during T4 configuration file stuff. The fix is to let the
caller know the firmware was not upgraded so a reset would be issued before
starting the T4 config stuff.

Signed-off-by: Jay Hernandez <jay@chelsio.com>
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index b9cd08d..a3f866d 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -933,7 +933,13 @@ static int upgrade_fw(struct adapter *adap)
 		if (!ret)
 			dev_info(dev, "firmware upgraded to version %pI4 from "
 				 FW_FNAME "\n", &hdr->fw_ver);
+	} else {
+		/*
+		 * Tell our caller that we didn't upgrade the firmware.
+		 */
+		ret = -EINVAL;
 	}
+
 out:	release_firmware(fw);
 	return ret;
 }
-- 
1.7.1

  parent reply	other threads:[~2012-09-26 12:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 12:39 [PATCH 0/7] Add Chelsio T4 firmware configuration file support Vipul Pandya
2012-09-26 12:39 ` [PATCH 1/7] cxgb4: Fix incorrect values for MEMWIN*_APERTURE and MEMWIN*_BASE Vipul Pandya
2012-09-26 12:39 ` [PATCH 2/7] cxgb4: Add functions to read memory via PCIE memory window Vipul Pandya
2012-09-26 12:39 ` [PATCH 3/7] cxgb4/cxgb4vf: Code cleanup to enable T4 Configuration File support Vipul Pandya
2012-09-26 12:39 ` [PATCH 4/7] cxgb4: Add support for T4 configuration file Vipul Pandya
2012-09-26 12:39 ` [PATCH 5/7] cxgb4: Add support for T4 hardwired driver configuration settings Vipul Pandya
2012-09-26 12:39 ` Vipul Pandya [this message]
2012-09-26 12:39 ` [PATCH 7/7] cxgb4: Don't attempt to upgrade T4 firmware when cxgb4 will end up as a slave Vipul Pandya
2012-09-27 21:56 ` [PATCH 0/7] Add Chelsio T4 firmware configuration file support David Miller

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=1348663182-20190-7-git-send-email-vipul@chelsio.com \
    --to=vipul@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=divy@chelsio.com \
    --cc=dm@chelsio.com \
    --cc=felix@chelsio.com \
    --cc=jay@chelsio.com \
    --cc=leedom@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=swise@opengridcomputing.com \
    /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;
as well as URLs for NNTP newsgroup(s).