diff options
author | Vasanthy Kolluri <vkolluri@cisco.com> | 2010-10-20 06:17:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 04:26:48 -0400 |
commit | 2db77e0f331d343511d08e204be5e22f934e1a68 (patch) | |
tree | 03b86c7f5aab8e7623deb25499f4cca3962e0771 /drivers/net/enic | |
parent | c76fd32d0504c0450edb0e00890aa32e3ff1f73d (diff) |
enic: Replace firmware devcmd CMD_ENABLE with CMD_ENABLE_WAIT
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r-- | drivers/net/enic/enic_main.c | 2 | ||||
-rw-r--r-- | drivers/net/enic/vnic_dev.c | 10 | ||||
-rw-r--r-- | 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 622106d8c055..a63d2babdd8d 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) | |||
1787 | int err; | 1787 | int err; |
1788 | 1788 | ||
1789 | spin_lock(&enic->devcmd_lock); | 1789 | spin_lock(&enic->devcmd_lock); |
1790 | err = vnic_dev_enable(enic->vdev); | 1790 | err = vnic_dev_enable_wait(enic->vdev); |
1791 | spin_unlock(&enic->devcmd_lock); | 1791 | spin_unlock(&enic->devcmd_lock); |
1792 | 1792 | ||
1793 | return err; | 1793 | return err; |
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c index 11dc8f73e4be..fb35d8b17668 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) | |||
487 | return vnic_dev_cmd(vdev, CMD_CLOSE, &a0, &a1, wait); | 487 | return vnic_dev_cmd(vdev, CMD_CLOSE, &a0, &a1, wait); |
488 | } | 488 | } |
489 | 489 | ||
490 | int vnic_dev_enable(struct vnic_dev *vdev) | 490 | int vnic_dev_enable_wait(struct vnic_dev *vdev) |
491 | { | 491 | { |
492 | u64 a0 = 0, a1 = 0; | 492 | u64 a0 = 0, a1 = 0; |
493 | int wait = 1000; | 493 | int wait = 1000; |
494 | return vnic_dev_cmd(vdev, CMD_ENABLE, &a0, &a1, wait); | 494 | int err; |
495 | |||
496 | err = vnic_dev_cmd(vdev, CMD_ENABLE_WAIT, &a0, &a1, wait); | ||
497 | if (err == ERR_ECMDUNKNOWN) | ||
498 | return vnic_dev_cmd(vdev, CMD_ENABLE, &a0, &a1, wait); | ||
499 | |||
500 | return err; | ||
495 | } | 501 | } |
496 | 502 | ||
497 | int vnic_dev_disable(struct vnic_dev *vdev) | 503 | 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 3f0014312080..05f9a24cd459 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); | |||
111 | u32 vnic_dev_msg_lvl(struct vnic_dev *vdev); | 111 | u32 vnic_dev_msg_lvl(struct vnic_dev *vdev); |
112 | u32 vnic_dev_mtu(struct vnic_dev *vdev); | 112 | u32 vnic_dev_mtu(struct vnic_dev *vdev); |
113 | int vnic_dev_close(struct vnic_dev *vdev); | 113 | int vnic_dev_close(struct vnic_dev *vdev); |
114 | int vnic_dev_enable(struct vnic_dev *vdev); | 114 | int vnic_dev_enable_wait(struct vnic_dev *vdev); |
115 | int vnic_dev_disable(struct vnic_dev *vdev); | 115 | int vnic_dev_disable(struct vnic_dev *vdev); |
116 | int vnic_dev_open(struct vnic_dev *vdev, int arg); | 116 | int vnic_dev_open(struct vnic_dev *vdev, int arg); |
117 | int vnic_dev_open_done(struct vnic_dev *vdev, int *done); | 117 | int vnic_dev_open_done(struct vnic_dev *vdev, int *done); |