summaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2009-12-02 16:15:37 +0100
committerDavid S. Miller <davem@davemloft.net>2009-12-03 04:57:20 +0100
commitdd2e4dbce32a2802088f6d0132046afec9bfb2ad (patch)
treee764df404792bb6e2e2315c8905e484519443fe2 /drivers/net/cnic.c
parentcnic: Fix bnx2x ring shutdown. (diff)
downloadlinux-dd2e4dbce32a2802088f6d0132046afec9bfb2ad.tar.xz
linux-dd2e4dbce32a2802088f6d0132046afec9bfb2ad.zip
cnic: Fix bogus iSCSI MAC address
Fix code to read the proper iSCSI MAC address for bnx2x devices. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic.c')
-rw-r--r--drivers/net/cnic.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index fb1cadb0e1f5..bb6ce8ddcb29 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -3997,15 +3997,19 @@ static void cnic_get_bnx2x_iscsi_info(struct cnic_dev *dev)
if (base < 0xa0000 || base >= 0xc0000)
return;
- val = BNX2X_SHMEM_ADDR(base,
+ addr = BNX2X_SHMEM_ADDR(base,
dev_info.port_hw_config[port].iscsi_mac_upper);
+ val = CNIC_RD(dev, addr);
+
dev->mac_addr[0] = (u8) (val >> 8);
dev->mac_addr[1] = (u8) val;
- val = BNX2X_SHMEM_ADDR(base,
+ addr = BNX2X_SHMEM_ADDR(base,
dev_info.port_hw_config[port].iscsi_mac_lower);
+ val = CNIC_RD(dev, addr);
+
dev->mac_addr[2] = (u8) (val >> 24);
dev->mac_addr[3] = (u8) (val >> 16);
dev->mac_addr[4] = (u8) (val >> 8);