enic: Bug Fix: Reorder firmware devcmds - CMD_INIT and CMD_IG_VLAN_REWRITE_MODE
authorVasanthy Kolluri <vkolluri@cisco.com>
Fri, 4 Feb 2011 16:17:16 +0000 (16:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Feb 2011 19:49:03 +0000 (11:49 -0800)
Firmware requires CMD_IG_VLAN_REWRITE_MODE be issued before a CMD_INIT.

Signed-off-by: Christian Benvenuti <benve@cisco.com>
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.h
drivers/net/enic/enic_main.c

index f38ad634989c1a8938a61f767b38420d4b50fe4f..7316267e3ade2834da5d224564cb3e9e1fae904d 100644 (file)
@@ -32,7 +32,7 @@
 
 #define DRV_NAME               "enic"
 #define DRV_DESCRIPTION                "Cisco VIC Ethernet NIC Driver"
-#define DRV_VERSION            "2.1.1.4"
+#define DRV_VERSION            "2.1.1.5"
 #define DRV_COPYRIGHT          "Copyright 2008-2011 Cisco Systems, Inc"
 
 #define ENIC_BARS_MAX          6
index 3893370d95a8bd3f2424f4a46456fa0f2ab1ac66..d6cdecc7d1e6627f7b16bc4cc55409a0c0bf9f92 100644 (file)
@@ -2359,13 +2359,6 @@ static int enic_dev_init(struct enic *enic)
                goto err_out_free_vnic_resources;
        }
 
-       err = enic_dev_set_ig_vlan_rewrite_mode(enic);
-       if (err) {
-               dev_err(dev,
-                       "Failed to set ingress vlan rewrite mode, aborting.\n");
-               goto err_out_free_vnic_resources;
-       }
-
        switch (vnic_dev_get_intr_mode(enic->vdev)) {
        default:
                netif_napi_add(netdev, &enic->napi[0], enic_poll, 64);
@@ -2504,6 +2497,22 @@ static int __devinit enic_probe(struct pci_dev *pdev,
                goto err_out_vnic_unregister;
        }
 
+       /* Setup devcmd lock
+        */
+
+       spin_lock_init(&enic->devcmd_lock);
+
+       /*
+        * Set ingress vlan rewrite mode before vnic initialization
+        */
+
+       err = enic_dev_set_ig_vlan_rewrite_mode(enic);
+       if (err) {
+               dev_err(dev,
+                       "Failed to set ingress vlan rewrite mode, aborting.\n");
+               goto err_out_dev_close;
+       }
+
        /* Issue device init to initialize the vnic-to-switch link.
         * We'll start with carrier off and wait for link UP
         * notification later to turn on carrier.  We don't need
@@ -2527,11 +2536,6 @@ static int __devinit enic_probe(struct pci_dev *pdev,
                }
        }
 
-       /* Setup devcmd lock
-        */
-
-       spin_lock_init(&enic->devcmd_lock);
-
        err = enic_dev_init(enic);
        if (err) {
                dev_err(dev, "Device initialization failed, aborting\n");