diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2013-03-11 01:17:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-12 07:54:25 -0400 |
commit | 82594f8f47bc1167d55776cfb599633ec4ac8e77 (patch) | |
tree | fecc46e7f9fe91ebfc5f8b84ce71778d724614d9 | |
parent | e438c5d651e2a7b7d6d1bad23cc3a878392e6a5c (diff) |
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: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index f685d2e77fcb..e5662a141451 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -10832,14 +10832,12 @@ static void bnx2x_get_cnic_mac_hwinfo(struct bnx2x *bp) | |||
10832 | } | 10832 | } |
10833 | } | 10833 | } |
10834 | 10834 | ||
10835 | if (IS_MF_STORAGE_SD(bp)) | 10835 | /* If this is a storage-only interface, use SAN mac as |
10836 | /* Zero primary MAC configuration */ | 10836 | * primary MAC. Notice that for SD this is already the case, |
10837 | memset(bp->dev->dev_addr, 0, ETH_ALEN); | 10837 | * as the SAN mac was copied from the primary MAC. |
10838 | 10838 | */ | |
10839 | if (IS_MF_FCOE_AFEX(bp) || IS_MF_FCOE_SD(bp)) | 10839 | if (IS_MF_FCOE_AFEX(bp)) |
10840 | /* use FIP MAC as primary MAC */ | ||
10841 | memcpy(bp->dev->dev_addr, fip_mac, ETH_ALEN); | 10840 | memcpy(bp->dev->dev_addr, fip_mac, ETH_ALEN); |
10842 | |||
10843 | } else { | 10841 | } else { |
10844 | val2 = SHMEM_RD(bp, dev_info.port_hw_config[port]. | 10842 | val2 = SHMEM_RD(bp, dev_info.port_hw_config[port]. |
10845 | iscsi_mac_upper); | 10843 | iscsi_mac_upper); |