From 4aacb7afb6afd78efe26427e74fa56a5fc72fad3 Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Thu, 23 Dec 2010 07:43:01 +0000 Subject: cnic: Support NIC Partition mode Add a common function cnic_read_bnx2x_iscsi_mac() to read the iSCSI MAC address at any specified shared memory location. In NIC Partition mode, we need to get the MAC address from the MF_CFG area of shared memory. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/cnic.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/net/cnic.h') diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h index 8e947b7e070..fb3b7531ea2 100644 --- a/drivers/net/cnic.h +++ b/drivers/net/cnic.h @@ -422,6 +422,9 @@ struct bnx2x_bd_chain_next { (CNIC_RD(dev, BNX2X_SHMEM2_ADDR(base, size)) > \ offsetof(struct shmem2_region, field))) +#define BNX2X_MF_CFG_ADDR(base, field) \ + ((base) + offsetof(struct mf_cfg, field)) + #define CNIC_PORT(cp) ((cp)->pfid & 1) #define CNIC_FUNC(cp) ((cp)->func) #define CNIC_PATH(cp) (!BNX2X_CHIP_IS_E2(cp->chip_id) ? 0 :\ -- cgit v1.2.3