Skip to content

Commit

Permalink
enic: Decouple mac address registration and deregistration from port …
Browse files Browse the repository at this point in the history
…profile set operation

This patch removes VM mac address registration and deregistration code during
port profile set operation. We can delay mac address registration until
enic_open.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roopa Prabhu authored and David S. Miller committed Feb 7, 2011
1 parent 6e30dd4 commit 8a37555
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 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.2"
#define DRV_VERSION "2.1.1.2a"
#define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc"

#define ENIC_BARS_MAX 6
Expand Down
6 changes: 0 additions & 6 deletions drivers/net/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1381,9 +1381,6 @@ static int enic_set_vf_port(struct net_device *netdev, int vf,

if (is_zero_ether_addr(netdev->dev_addr))
random_ether_addr(netdev->dev_addr);
} else if (new_pp.request == PORT_REQUEST_DISASSOCIATE) {
if (!is_zero_ether_addr(enic->pp.mac_addr))
enic_dev_del_addr(enic, enic->pp.mac_addr);
}

memcpy(&enic->pp, &new_pp, sizeof(struct enic_port_profile));
Expand All @@ -1392,9 +1389,6 @@ static int enic_set_vf_port(struct net_device *netdev, int vf,
if (err)
goto set_port_profile_cleanup;

if (!is_zero_ether_addr(enic->pp.mac_addr))
enic_dev_add_addr(enic, enic->pp.mac_addr);

set_port_profile_cleanup:
memset(enic->pp.vf_mac, 0, ETH_ALEN);

Expand Down

0 comments on commit 8a37555

Please sign in to comment.