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>
This commit is contained in:
Vasanthy Kolluri 2011-02-04 16:17:16 +00:00 committed by David S. Miller
parent 115d56f723
commit 6916142580
2 changed files with 17 additions and 13 deletions

View 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

View 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");