aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic/enic_main.c
diff options
context:
space:
mode:
authorVasanthy Kolluri <vkolluri@cisco.com>2010-06-24 06:50:00 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-25 23:46:01 -0400
commit99ef563901a18d44a6c2eadd2b958e2e83aeca51 (patch)
tree29bbf0fe2457effbaa62281eca6aff2191cc9f75 /drivers/net/enic/enic_main.c
parentf8cac14acff870203ea7f61f1a92c5486d1774fa (diff)
enic: Use a lighter reset operation for enic devices
The port profile information for a dynamic enic device is set by the upper layers, that are oblivious to the device reset operation. We do not want a reset operation erase the network state of a dynamic enic device as there is no way to set up the port profile information again. Hence a lighter reset operation called hang reset is used. Hang reset, unlike soft reset does not reset the network state and resets the host side state only. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 7f98af1eb1ea..d7434b7b4c52 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -812,9 +812,10 @@ static struct net_device_stats *enic_get_stats(struct net_device *netdev)
812 return net_stats; 812 return net_stats;
813} 813}
814 814
815static void enic_reset_mcaddrs(struct enic *enic) 815static void enic_reset_multicast_list(struct enic *enic)
816{ 816{
817 enic->mc_count = 0; 817 enic->mc_count = 0;
818 enic->flags = 0;
818} 819}
819 820
820static int enic_set_mac_addr(struct net_device *netdev, char *addr) 821static int enic_set_mac_addr(struct net_device *netdev, char *addr)
@@ -1847,15 +1848,15 @@ static int enic_dev_open(struct enic *enic)
1847 return err; 1848 return err;
1848} 1849}
1849 1850
1850static int enic_dev_soft_reset(struct enic *enic) 1851static int enic_dev_hang_reset(struct enic *enic)
1851{ 1852{
1852 int err; 1853 int err;
1853 1854
1854 err = enic_dev_wait(enic->vdev, vnic_dev_soft_reset, 1855 err = enic_dev_wait(enic->vdev, vnic_dev_hang_reset,
1855 vnic_dev_soft_reset_done, 0); 1856 vnic_dev_hang_reset_done, 0);
1856 if (err) 1857 if (err)
1857 printk(KERN_ERR PFX 1858 printk(KERN_ERR PFX
1858 "vNIC soft reset failed, err %d.\n", err); 1859 "vNIC hang reset failed, err %d.\n", err);
1859 1860
1860 return err; 1861 return err;
1861} 1862}
@@ -1906,9 +1907,8 @@ static void enic_reset(struct work_struct *work)
1906 spin_unlock(&enic->devcmd_lock); 1907 spin_unlock(&enic->devcmd_lock);
1907 1908
1908 enic_stop(enic->netdev); 1909 enic_stop(enic->netdev);
1909 enic_dev_soft_reset(enic); 1910 enic_dev_hang_reset(enic);
1910 vnic_dev_init(enic->vdev, 0); 1911 enic_reset_multicast_list(enic);
1911 enic_reset_mcaddrs(enic);
1912 enic_init_vnic_resources(enic); 1912 enic_init_vnic_resources(enic);
1913 enic_set_niccfg(enic); 1913 enic_set_niccfg(enic);
1914 enic_dev_set_ig_vlan_rewrite_mode(enic); 1914 enic_dev_set_ig_vlan_rewrite_mode(enic);