diff options
author | Vasanthy Kolluri <vkolluri@cisco.com> | 2011-02-04 19:17:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-07 22:49:03 +0300 |
commit | 69161425800ac6cc28ac448bef5f21d09cb4f92a (patch) | |
tree | 255783fba56b0a5b839be8c55d8a91684e52c11f /drivers/net/enic/enic_main.c | |
parent | 115d56f723c45088ddf46fac1ebba7c333039150 (diff) | |
download | linux-69161425800ac6cc28ac448bef5f21d09cb4f92a.tar.xz |
enic: Bug Fix: Reorder firmware devcmds - CMD_INIT and CMD_IG_VLAN_REWRITE_MODE
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>
Diffstat (limited to 'drivers/net/enic/enic_main.c')
-rw-r--r-- | drivers/net/enic/enic_main.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 3893370d95a8..d6cdecc7d1e6 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -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"); |