netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vasanthy Kolluri <vkolluri@cisco.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, roprabhu@cisco.com, dwang2@cisco.com
Subject: [net-next-2.6 PATCH 3/5] enic: Replace firmware devcmd CMD_ENABLE with CMD_ENABLE_WAIT
Date: Wed, 20 Oct 2010 13:17:09 -0700	[thread overview]
Message-ID: <20101020201709.26870.4150.stgit@savbu-pc100.cisco.com> (raw)
In-Reply-To: <20101020201609.26870.80308.stgit@savbu-pc100.cisco.com>

From: Vasanthy Kolluri <vkolluri@cisco.com>

Replace no wait CMD_ENABLE firmware devcmd with CMD_ENABLE_WAIT

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
---
 drivers/net/enic/enic_main.c |    2 +-
 drivers/net/enic/vnic_dev.c  |   10 ++++++++--
 drivers/net/enic/vnic_dev.h  |    2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)


diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 622106d..a63d2ba 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1787,7 +1787,7 @@ static int enic_dev_enable(struct enic *enic)
 	int err;
 
 	spin_lock(&enic->devcmd_lock);
-	err = vnic_dev_enable(enic->vdev);
+	err = vnic_dev_enable_wait(enic->vdev);
 	spin_unlock(&enic->devcmd_lock);
 
 	return err;
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c
index 11dc8f7..fb35d8b 100644
--- a/drivers/net/enic/vnic_dev.c
+++ b/drivers/net/enic/vnic_dev.c
@@ -487,11 +487,17 @@ int vnic_dev_close(struct vnic_dev *vdev)
 	return vnic_dev_cmd(vdev, CMD_CLOSE, &a0, &a1, wait);
 }
 
-int vnic_dev_enable(struct vnic_dev *vdev)
+int vnic_dev_enable_wait(struct vnic_dev *vdev)
 {
 	u64 a0 = 0, a1 = 0;
 	int wait = 1000;
-	return vnic_dev_cmd(vdev, CMD_ENABLE, &a0, &a1, wait);
+	int err;
+
+	err = vnic_dev_cmd(vdev, CMD_ENABLE_WAIT, &a0, &a1, wait);
+	if (err == ERR_ECMDUNKNOWN)
+		return vnic_dev_cmd(vdev, CMD_ENABLE, &a0, &a1, wait);
+
+	return err;
 }
 
 int vnic_dev_disable(struct vnic_dev *vdev)
diff --git a/drivers/net/enic/vnic_dev.h b/drivers/net/enic/vnic_dev.h
index 3f00143..05f9a24 100644
--- a/drivers/net/enic/vnic_dev.h
+++ b/drivers/net/enic/vnic_dev.h
@@ -111,7 +111,7 @@ u32 vnic_dev_port_speed(struct vnic_dev *vdev);
 u32 vnic_dev_msg_lvl(struct vnic_dev *vdev);
 u32 vnic_dev_mtu(struct vnic_dev *vdev);
 int vnic_dev_close(struct vnic_dev *vdev);
-int vnic_dev_enable(struct vnic_dev *vdev);
+int vnic_dev_enable_wait(struct vnic_dev *vdev);
 int vnic_dev_disable(struct vnic_dev *vdev);
 int vnic_dev_open(struct vnic_dev *vdev, int arg);
 int vnic_dev_open_done(struct vnic_dev *vdev, int *done);


  parent reply	other threads:[~2010-10-20 20:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20 20:16 [net-next-2.6 PATCH 0/5] enic: updates to version 1.4.1.6 Vasanthy Kolluri
2010-10-20 20:16 ` [net-next-2.6 PATCH 1/5] enic: Add support for multiple hardware receive queues Vasanthy Kolluri
2010-10-20 20:17 ` [net-next-2.6 PATCH 2/5] enic: Make firmware cognizant of the user set mac address Vasanthy Kolluri
2010-10-20 20:17 ` Vasanthy Kolluri [this message]
2010-10-20 20:17 ` [net-next-2.6 PATCH 4/5] enic: Change min MTU Vasanthy Kolluri
2010-10-20 20:17 ` [net-next-2.6 PATCH 5/5] enic: Fix log message Vasanthy Kolluri
2010-10-21  8:34 ` [net-next-2.6 PATCH 0/5] enic: updates to version 1.4.1.6 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=20101020201709.26870.4150.stgit@savbu-pc100.cisco.com \
    --to=vkolluri@cisco.com \
    --cc=davem@davemloft.net \
    --cc=dwang2@cisco.com \
    --cc=netdev@vger.kernel.org \
    --cc=roprabhu@cisco.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).