]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
enic: Replace firmware devcmd CMD_ENABLE with CMD_ENABLE_WAIT
authorVasanthy Kolluri <vkolluri@cisco.com>
Wed, 20 Oct 2010 10:17:09 +0000 (10:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Oct 2010 08:26:48 +0000 (01:26 -0700)
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>
drivers/net/enic/enic_main.c
drivers/net/enic/vnic_dev.c
drivers/net/enic/vnic_dev.h

index 622106d8c055a796666f646ec039949ddda08e00..a63d2babdd8db4bc8fa6ca1ec54547e64eba94bd 100644 (file)
@@ -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;
index 11dc8f73e4bece529088d5a5c900c3917c6afb0c..fb35d8b176686b75a62856d1a1da539a6113d568 100644 (file)
@@ -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)
index 3f00143120802ca1e8f496cb0f406208b2ab24fb..05f9a24cd45974e6463891af6b154facc0b24e0d 100644 (file)
@@ -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);