Commit 82594f8f authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller

bnx2x: Avoid using zero MAC

Prevent bnx2x devices which are used mainly for storage from using zero
MAC addresses as their primary MAC address.
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e438c5d6
...@@ -10832,14 +10832,12 @@ static void bnx2x_get_cnic_mac_hwinfo(struct bnx2x *bp) ...@@ -10832,14 +10832,12 @@ static void bnx2x_get_cnic_mac_hwinfo(struct bnx2x *bp)
} }
} }
if (IS_MF_STORAGE_SD(bp)) /* If this is a storage-only interface, use SAN mac as
/* Zero primary MAC configuration */ * primary MAC. Notice that for SD this is already the case,
memset(bp->dev->dev_addr, 0, ETH_ALEN); * as the SAN mac was copied from the primary MAC.
*/
if (IS_MF_FCOE_AFEX(bp) || IS_MF_FCOE_SD(bp)) if (IS_MF_FCOE_AFEX(bp))
/* use FIP MAC as primary MAC */
memcpy(bp->dev->dev_addr, fip_mac, ETH_ALEN); memcpy(bp->dev->dev_addr, fip_mac, ETH_ALEN);
} else { } else {
val2 = SHMEM_RD(bp, dev_info.port_hw_config[port]. val2 = SHMEM_RD(bp, dev_info.port_hw_config[port].
iscsi_mac_upper); iscsi_mac_upper);
......
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