Skip to content

Commit

Permalink
enic: Fix address deregistration for sriov vf during port profile dis…
Browse files Browse the repository at this point in the history
…associate

This patch fixes erroneous PF address deregistration in cases where
a port profile disassociate is called on an already disassociated interface.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: sujith sankar <ssujith@cisco.com>
Signed-off-by: ChingWei Chang <cwchang@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roopa Prabhu authored and David S. Miller committed Feb 13, 2012
1 parent ee556fe commit 9f1de88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cisco/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.33"
#define DRV_VERSION "2.1.1.34"
#define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc"

#define ENIC_BARS_MAX 6
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/cisco/enic/enic_pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int enic_pp_disassociate(struct enic *enic, int vf,
if (!is_zero_ether_addr(pp->mac_addr))
ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_del_addr,
pp->mac_addr);
else if (!is_zero_ether_addr(netdev->dev_addr))
else if (vf == PORT_SELF_VF && !is_zero_ether_addr(netdev->dev_addr))
ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_del_addr,
netdev->dev_addr);

Expand Down Expand Up @@ -294,7 +294,7 @@ static int enic_pp_associate(struct enic *enic, int vf,
if (!is_zero_ether_addr(pp->mac_addr))
ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_add_addr,
pp->mac_addr);
else if (!is_zero_ether_addr(netdev->dev_addr))
else if (vf == PORT_SELF_VF && !is_zero_ether_addr(netdev->dev_addr))
ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_add_addr,
netdev->dev_addr);

Expand Down

0 comments on commit 9f1de88

Please sign in to comment.