diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2011-05-04 19:49:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-05 13:44:34 -0400 |
commit | 426b92415074d6d268c7aac4561efecd3785d0b1 (patch) | |
tree | cfa867eb72253bcebdd20713a5cb71124d6cdedc /drivers | |
parent | f9a3ebbe657b5dcd562224b32d1703da499063db (diff) |
bnx2x: Do storage mac address validation for SF mode.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_main.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 1b3c9f664306..660c94560266 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c | |||
@@ -8560,15 +8560,6 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp) | |||
8560 | BNX2X_DEV_INFO("Read iSCSI MAC: " | 8560 | BNX2X_DEV_INFO("Read iSCSI MAC: " |
8561 | "0x%x:0x%04x\n", val2, val); | 8561 | "0x%x:0x%04x\n", val2, val); |
8562 | bnx2x_set_mac_buf(iscsi_mac, val, val2); | 8562 | bnx2x_set_mac_buf(iscsi_mac, val, val2); |
8563 | |||
8564 | /* Disable iSCSI OOO if MAC configuration is | ||
8565 | * invalid. | ||
8566 | */ | ||
8567 | if (!is_valid_ether_addr(iscsi_mac)) { | ||
8568 | bp->flags |= NO_ISCSI_OOO_FLAG | | ||
8569 | NO_ISCSI_FLAG; | ||
8570 | memset(iscsi_mac, 0, ETH_ALEN); | ||
8571 | } | ||
8572 | } else | 8563 | } else |
8573 | bp->flags |= NO_ISCSI_OOO_FLAG | NO_ISCSI_FLAG; | 8564 | bp->flags |= NO_ISCSI_OOO_FLAG | NO_ISCSI_FLAG; |
8574 | 8565 | ||
@@ -8581,13 +8572,6 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp) | |||
8581 | "0x%x:0x%04x\n", val2, val); | 8572 | "0x%x:0x%04x\n", val2, val); |
8582 | bnx2x_set_mac_buf(fip_mac, val, val2); | 8573 | bnx2x_set_mac_buf(fip_mac, val, val2); |
8583 | 8574 | ||
8584 | /* Disable FCoE if MAC configuration is | ||
8585 | * invalid. | ||
8586 | */ | ||
8587 | if (!is_valid_ether_addr(fip_mac)) { | ||
8588 | bp->flags |= NO_FCOE_FLAG; | ||
8589 | memset(bp->fip_mac, 0, ETH_ALEN); | ||
8590 | } | ||
8591 | } else | 8575 | } else |
8592 | bp->flags |= NO_FCOE_FLAG; | 8576 | bp->flags |= NO_FCOE_FLAG; |
8593 | } | 8577 | } |
@@ -8618,6 +8602,22 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp) | |||
8618 | else if (!IS_MF(bp)) | 8602 | else if (!IS_MF(bp)) |
8619 | memcpy(fip_mac, iscsi_mac, ETH_ALEN); | 8603 | memcpy(fip_mac, iscsi_mac, ETH_ALEN); |
8620 | } | 8604 | } |
8605 | |||
8606 | /* Disable iSCSI if MAC configuration is | ||
8607 | * invalid. | ||
8608 | */ | ||
8609 | if (!is_valid_ether_addr(iscsi_mac)) { | ||
8610 | bp->flags |= NO_ISCSI_FLAG; | ||
8611 | memset(iscsi_mac, 0, ETH_ALEN); | ||
8612 | } | ||
8613 | |||
8614 | /* Disable FCoE if MAC configuration is | ||
8615 | * invalid. | ||
8616 | */ | ||
8617 | if (!is_valid_ether_addr(fip_mac)) { | ||
8618 | bp->flags |= NO_FCOE_FLAG; | ||
8619 | memset(bp->fip_mac, 0, ETH_ALEN); | ||
8620 | } | ||
8621 | #endif | 8621 | #endif |
8622 | } | 8622 | } |
8623 | 8623 | ||