Commit e0afe53f authored by Vasanthy Kolluri's avatar Vasanthy Kolluri Committed by David S. Miller

enic: Bug fix: Reset driver count of registered unicast addresses to zero during device reset

During a device reset, clear the counter for the no. of unicast addresses registered.
Also, rename the routines that update unicast and multicast address lists.
Signed-off-by: default avatarChristian Benvenuti <benve@cisco.com>
Signed-off-by: default avatarDanny Guo <dannguo@cisco.com>
Signed-off-by: default avatarVasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: default avatarRoopa Prabhu <roprabhu@cisco.com>
Signed-off-by: default avatarDavid Wang <dwang2@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab532cf3
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#define DRV_NAME "enic" #define DRV_NAME "enic"
#define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver" #define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver"
#define DRV_VERSION "2.1.1.6" #define DRV_VERSION "2.1.1.7"
#define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc" #define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc"
#define ENIC_BARS_MAX 6 #define ENIC_BARS_MAX 6
......
...@@ -874,9 +874,10 @@ static struct net_device_stats *enic_get_stats(struct net_device *netdev) ...@@ -874,9 +874,10 @@ static struct net_device_stats *enic_get_stats(struct net_device *netdev)
return net_stats; return net_stats;
} }
static void enic_reset_multicast_list(struct enic *enic) static void enic_reset_addr_lists(struct enic *enic)
{ {
enic->mc_count = 0; enic->mc_count = 0;
enic->uc_count = 0;
enic->flags = 0; enic->flags = 0;
} }
...@@ -941,7 +942,7 @@ static int enic_set_mac_address(struct net_device *netdev, void *p) ...@@ -941,7 +942,7 @@ static int enic_set_mac_address(struct net_device *netdev, void *p)
return enic_dev_add_station_addr(enic); return enic_dev_add_station_addr(enic);
} }
static void enic_add_multicast_addr_list(struct enic *enic) static void enic_update_multicast_addr_list(struct enic *enic)
{ {
struct net_device *netdev = enic->netdev; struct net_device *netdev = enic->netdev;
struct netdev_hw_addr *ha; struct netdev_hw_addr *ha;
...@@ -996,7 +997,7 @@ static void enic_add_multicast_addr_list(struct enic *enic) ...@@ -996,7 +997,7 @@ static void enic_add_multicast_addr_list(struct enic *enic)
enic->mc_count = mc_count; enic->mc_count = mc_count;
} }
static void enic_add_unicast_addr_list(struct enic *enic) static void enic_update_unicast_addr_list(struct enic *enic)
{ {
struct net_device *netdev = enic->netdev; struct net_device *netdev = enic->netdev;
struct netdev_hw_addr *ha; struct netdev_hw_addr *ha;
...@@ -1073,9 +1074,9 @@ static void enic_set_rx_mode(struct net_device *netdev) ...@@ -1073,9 +1074,9 @@ static void enic_set_rx_mode(struct net_device *netdev)
} }
if (!promisc) { if (!promisc) {
enic_add_unicast_addr_list(enic); enic_update_unicast_addr_list(enic);
if (!allmulti) if (!allmulti)
enic_add_multicast_addr_list(enic); enic_update_multicast_addr_list(enic);
} }
} }
...@@ -2067,7 +2068,7 @@ static void enic_reset(struct work_struct *work) ...@@ -2067,7 +2068,7 @@ static void enic_reset(struct work_struct *work)
enic_dev_hang_notify(enic); enic_dev_hang_notify(enic);
enic_stop(enic->netdev); enic_stop(enic->netdev);
enic_dev_hang_reset(enic); enic_dev_hang_reset(enic);
enic_reset_multicast_list(enic); enic_reset_addr_lists(enic);
enic_init_vnic_resources(enic); enic_init_vnic_resources(enic);
enic_set_rss_nic_cfg(enic); enic_set_rss_nic_cfg(enic);
enic_dev_set_ig_vlan_rewrite_mode(enic); enic_dev_set_ig_vlan_rewrite_mode(enic);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment