netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rajesh Borundia <rajesh.borundia@qlogic.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <Dept-HSGLinuxNICDev@qlogic.com>
Subject: [PATCH net 2/3] qlcnic: Set driver version before registering netdev
Date: Mon, 4 Aug 2014 11:51:17 -0400	[thread overview]
Message-ID: <1407167478-22277-3-git-send-email-rajesh.borundia@qlogic.com> (raw)
In-Reply-To: <1407167478-22277-1-git-send-email-rajesh.borundia@qlogic.com>

o Earlier, set_drv_version was getting called after register_netdev.
  This was resulting in a race between set_drv_version and FLR called
  from open(). Moving set_drv_version before register_netdev avoids
  the race.

o Log response code in error message on CDRP failure.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c  |    2 +-
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
index 304e247..ffbae29 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
@@ -136,7 +136,7 @@ int qlcnic_82xx_issue_cmd(struct qlcnic_adapter *adapter,
 	rsp = qlcnic_poll_rsp(adapter);
 
 	if (rsp == QLCNIC_CDRP_RSP_TIMEOUT) {
-		dev_err(&pdev->dev, "card response timeout.\n");
+		dev_err(&pdev->dev, "command timeout, response = 0x%x\n", rsp);
 		cmd->rsp.arg[0] = QLCNIC_RCODE_TIMEOUT;
 	} else if (rsp == QLCNIC_CDRP_RSP_FAIL) {
 		cmd->rsp.arg[0] = QLCRD32(adapter, QLCNIC_CDRP_ARG(1), &err);
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 4fc1867..158e1d9 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2623,13 +2623,13 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (err)
 		goto err_out_disable_mbx_intr;
 
+	if (adapter->portnum == 0)
+		qlcnic_set_drv_version(adapter);
+
 	err = qlcnic_setup_netdev(adapter, netdev, pci_using_dac);
 	if (err)
 		goto err_out_disable_mbx_intr;
 
-	if (adapter->portnum == 0)
-		qlcnic_set_drv_version(adapter);
-
 	pci_set_drvdata(pdev, adapter);
 
 	if (qlcnic_82xx_check(adapter))
-- 
1.6.3.3

  parent reply	other threads:[~2014-08-04 16:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 15:51 [PATCH net 0/3] qlcnic: Bug fixes Rajesh Borundia
2014-08-04 15:51 ` [PATCH net 1/3] qlcnic: Fix update of ethtool stats Rajesh Borundia
2014-08-04 15:51 ` Rajesh Borundia [this message]
2014-08-04 15:51 ` [PATCH net 3/3] qlcnic: Initialize dcbnl_ops before register_netdev Rajesh Borundia
2014-08-05 23:24 ` [PATCH net 0/3] qlcnic: Bug fixes 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=1407167478-22277-3-git-send-email-rajesh.borundia@qlogic.com \
    --to=rajesh.borundia@qlogic.com \
    --cc=Dept-HSGLinuxNICDev@qlogic.com \
    --cc=davem@davemloft.net \
    --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;
as well as URLs for NNTP newsgroup(s).