diff options
author | Vasanthy Kolluri <vkolluri@cisco.com> | 2011-02-17 03:53:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-17 17:14:08 -0500 |
commit | e0afe53fbea3823a1b1faef8d7701dd73bb74d5c (patch) | |
tree | 89a5b15895b251d4ec20406a0ac0906845c97b19 | |
parent | ab532cf32b4055028ad095d3c1fee9eec28ed25e (diff) |
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: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@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>
-rw-r--r-- | drivers/net/enic/enic.h | 2 | ||||
-rw-r--r-- | drivers/net/enic/enic_main.c | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h index 57fcaeea94f7..5f4eb45345c1 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.6" | 35 | #define DRV_VERSION "2.1.1.7" |
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 0c243704ca40..a625a0e09169 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -874,9 +874,10 @@ static struct net_device_stats *enic_get_stats(struct net_device *netdev) | |||
874 | return net_stats; | 874 | return net_stats; |
875 | } | 875 | } |
876 | 876 | ||
877 | static void enic_reset_multicast_list(struct enic *enic) | 877 | static void enic_reset_addr_lists(struct enic *enic) |
878 | { | 878 | { |
879 | enic->mc_count = 0; | 879 | enic->mc_count = 0; |
880 | enic->uc_count = 0; | ||
880 | enic->flags = 0; | 881 | enic->flags = 0; |
881 | } | 882 | } |
882 | 883 | ||
@@ -941,7 +942,7 @@ static int enic_set_mac_address(struct net_device *netdev, void *p) | |||
941 | return enic_dev_add_station_addr(enic); | 942 | return enic_dev_add_station_addr(enic); |
942 | } | 943 | } |
943 | 944 | ||
944 | static void enic_add_multicast_addr_list(struct enic *enic) | 945 | static void enic_update_multicast_addr_list(struct enic *enic) |
945 | { | 946 | { |
946 | struct net_device *netdev = enic->netdev; | 947 | struct net_device *netdev = enic->netdev; |
947 | struct netdev_hw_addr *ha; | 948 | struct netdev_hw_addr *ha; |
@@ -996,7 +997,7 @@ static void enic_add_multicast_addr_list(struct enic *enic) | |||
996 | enic->mc_count = mc_count; | 997 | enic->mc_count = mc_count; |
997 | } | 998 | } |
998 | 999 | ||
999 | static void enic_add_unicast_addr_list(struct enic *enic) | 1000 | static void enic_update_unicast_addr_list(struct enic *enic) |
1000 | { | 1001 | { |
1001 | struct net_device *netdev = enic->netdev; | 1002 | struct net_device *netdev = enic->netdev; |
1002 | struct netdev_hw_addr *ha; | 1003 | struct netdev_hw_addr *ha; |
@@ -1073,9 +1074,9 @@ static void enic_set_rx_mode(struct net_device *netdev) | |||
1073 | } | 1074 | } |
1074 | 1075 | ||
1075 | if (!promisc) { | 1076 | if (!promisc) { |
1076 | enic_add_unicast_addr_list(enic); | 1077 | enic_update_unicast_addr_list(enic); |
1077 | if (!allmulti) | 1078 | if (!allmulti) |
1078 | enic_add_multicast_addr_list(enic); | 1079 | enic_update_multicast_addr_list(enic); |
1079 | } | 1080 | } |
1080 | } | 1081 | } |
1081 | 1082 | ||
@@ -2067,7 +2068,7 @@ static void enic_reset(struct work_struct *work) | |||
2067 | enic_dev_hang_notify(enic); | 2068 | enic_dev_hang_notify(enic); |
2068 | enic_stop(enic->netdev); | 2069 | enic_stop(enic->netdev); |
2069 | enic_dev_hang_reset(enic); | 2070 | enic_dev_hang_reset(enic); |
2070 | enic_reset_multicast_list(enic); | 2071 | enic_reset_addr_lists(enic); |
2071 | enic_init_vnic_resources(enic); | 2072 | enic_init_vnic_resources(enic); |
2072 | enic_set_rss_nic_cfg(enic); | 2073 | enic_set_rss_nic_cfg(enic); |
2073 | enic_dev_set_ig_vlan_rewrite_mode(enic); | 2074 | enic_dev_set_ig_vlan_rewrite_mode(enic); |