aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic
diff options
context:
space:
mode:
authorVasanthy Kolluri <vkolluri@cisco.com>2011-02-04 11:17:16 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-07 14:49:03 -0500
commit69161425800ac6cc28ac448bef5f21d09cb4f92a (patch)
tree255783fba56b0a5b839be8c55d8a91684e52c11f /drivers/net/enic
parent115d56f723c45088ddf46fac1ebba7c333039150 (diff)
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')
-rw-r--r--drivers/net/enic/enic.h2
-rw-r--r--drivers/net/enic/enic_main.c28
2 files changed, 17 insertions, 13 deletions
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index f38ad634989c..7316267e3ade 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -32,7 +32,7 @@
32 32
33#define DRV_NAME "enic" 33#define DRV_NAME "enic"
34#define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver" 34#define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver"
35#define DRV_VERSION "2.1.1.4" 35#define DRV_VERSION "2.1.1.5"
36#define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc" 36#define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc"
37 37
38#define ENIC_BARS_MAX 6 38#define ENIC_BARS_MAX 6
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)
2359 goto err_out_free_vnic_resources; 2359 goto err_out_free_vnic_resources;
2360 } 2360 }
2361 2361
2362 err = enic_dev_set_ig_vlan_rewrite_mode(enic);
2363 if (err) {
2364 dev_err(dev,
2365 "Failed to set ingress vlan rewrite mode, aborting.\n");
2366 goto err_out_free_vnic_resources;
2367 }
2368
2369 switch (vnic_dev_get_intr_mode(enic->vdev)) { 2362 switch (vnic_dev_get_intr_mode(enic->vdev)) {
2370 default: 2363 default:
2371 netif_napi_add(netdev, &enic->napi[0], enic_poll, 64); 2364 netif_napi_add(netdev, &enic->napi[0], enic_poll, 64);
@@ -2504,6 +2497,22 @@ static int __devinit enic_probe(struct pci_dev *pdev,
2504 goto err_out_vnic_unregister; 2497 goto err_out_vnic_unregister;
2505 } 2498 }
2506 2499
2500 /* Setup devcmd lock
2501 */
2502
2503 spin_lock_init(&enic->devcmd_lock);
2504
2505 /*
2506 * Set ingress vlan rewrite mode before vnic initialization
2507 */
2508
2509 err = enic_dev_set_ig_vlan_rewrite_mode(enic);
2510 if (err) {
2511 dev_err(dev,
2512 "Failed to set ingress vlan rewrite mode, aborting.\n");
2513 goto err_out_dev_close;
2514 }
2515
2507 /* Issue device init to initialize the vnic-to-switch link. 2516 /* Issue device init to initialize the vnic-to-switch link.
2508 * We'll start with carrier off and wait for link UP 2517 * We'll start with carrier off and wait for link UP
2509 * notification later to turn on carrier. We don't need 2518 * notification later to turn on carrier. We don't need
@@ -2527,11 +2536,6 @@ static int __devinit enic_probe(struct pci_dev *pdev,
2527 } 2536 }
2528 } 2537 }
2529 2538
2530 /* Setup devcmd lock
2531 */
2532
2533 spin_lock_init(&enic->devcmd_lock);
2534
2535 err = enic_dev_init(enic); 2539 err = enic_dev_init(enic);
2536 if (err) { 2540 if (err) {
2537 dev_err(dev, "Device initialization failed, aborting\n"); 2541 dev_err(dev, "Device initialization failed, aborting\n");