Skip to content

Commit

Permalink
cnic: Fix bogus iSCSI MAC address
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Chan authored and David S. Miller committed Dec 3, 2009
1 parent 8b065b6 commit dd2e4db
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dd2e4db

Please sign in to comment.