Skip to content

Commit

Permalink
enic: Bug Fix: Reorder firmware devcmds - CMD_INIT and CMD_IG_VLAN_RE…
Browse files Browse the repository at this point in the history
…WRITE_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>
  • Loading branch information
Vasanthy Kolluri authored and David S. Miller committed Feb 7, 2011
1 parent 115d56f commit 6916142
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion drivers/net/enic/enic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 16 additions & 12 deletions drivers/net/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand All @@ -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");
Expand Down

0 comments on commit 6916142

Please sign in to comment.