netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 3/5] bnx2x: Read FIP mac from SHMEM in single function mode
@ 2011-07-21 17:57 Vlad Zolotarov
  2011-07-21 20:01 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Vlad Zolotarov @ 2011-07-21 17:57 UTC (permalink / raw)
  To: Dave Miller; +Cc: Eilon Greenstein, netdev@vger.kernel.org

Read FIP MAC address from SHMEM's "port" section
similar to what we do in a MF mode when we read it from 
a "func" section of SHMEM.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x/bnx2x_main.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 121df1f..6ee9fc8 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -9251,6 +9251,12 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp)
 		val = SHMEM_RD(bp, dev_info.port_hw_config[port].
 				   iscsi_mac_lower);
 		bnx2x_set_mac_buf(iscsi_mac, val, val2);
+
+		val2 = SHMEM_RD(bp, dev_info.port_hw_config[port].
+				    fcoe_fip_mac_upper);
+		val = SHMEM_RD(bp, dev_info.port_hw_config[port].
+				   fcoe_fip_mac_lower);
+		bnx2x_set_mac_buf(fip_mac, val, val2);
 #endif
 	}
 
@@ -9258,13 +9264,9 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp)
 	memcpy(bp->dev->perm_addr, bp->dev->dev_addr, ETH_ALEN);
 
 #ifdef BCM_CNIC
-	/* Set the FCoE MAC in modes other then MF_SI */
-	if (!CHIP_IS_E1x(bp)) {
-		if (IS_MF_SD(bp))
-			memcpy(fip_mac, bp->dev->dev_addr, ETH_ALEN);
-		else if (!IS_MF(bp))
-			memcpy(fip_mac, iscsi_mac, ETH_ALEN);
-	}
+	/* Set the FCoE MAC in MF_SD mode */
+	if (!CHIP_IS_E1x(bp) && IS_MF_SD(bp))
+		memcpy(fip_mac, bp->dev->dev_addr, ETH_ALEN);
 
 	/* Disable iSCSI if MAC configuration is
 	 * invalid.
-- 
1.7.4.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next 3/5] bnx2x: Read FIP mac from SHMEM in single function mode
  2011-07-21 17:57 [PATCH net-next 3/5] bnx2x: Read FIP mac from SHMEM in single function mode Vlad Zolotarov
@ 2011-07-21 20:01 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-07-21 20:01 UTC (permalink / raw)
  To: vladz; +Cc: eilong, netdev

From: "Vlad Zolotarov" <vladz@broadcom.com>
Date: Thu, 21 Jul 2011 20:57:52 +0300

> Read FIP MAC address from SHMEM's "port" section
> similar to what we do in a MF mode when we read it from 
> a "func" section of SHMEM.
> 
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-21 20:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-21 17:57 [PATCH net-next 3/5] bnx2x: Read FIP mac from SHMEM in single function mode Vlad Zolotarov
2011-07-21 20:01 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).