enic: Fix address deregistration for sriov vf during port profile disassociate
authorRoopa Prabhu <roprabhu@cisco.com>
Sat, 11 Feb 2012 21:37:37 +0000 (21:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2012 05:47:41 +0000 (00:47 -0500)
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>
drivers/net/ethernet/cisco/enic/enic.h
drivers/net/ethernet/cisco/enic/enic_pp.c

index 54fd9c314b382748b4b9402ae737a2e1bfdce8ee..e65d431d43785c41786dd2b1eeac41b168e093f0 100644 (file)
@@ -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
index 22bf03a1829e190e66928da74d52f5392c11772f..c758674643ce28bf236bd46c63724c259bcdcafe 100644 (file)
@@ -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);
 
@@ -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);