Skip to content

Commit

Permalink
[SCSI] fcoe: Fix setting lport's WWNN/WWPN to use san mac address
Browse files Browse the repository at this point in the history
We are still using netdev->dev_addr to generate lport's WWNN/WWPN even if the
LLD has support for NETDEV_HW_ADDR_T_SAN. Instead, we should just use the
fip->ctl_src_addr, which is the NETDEV_HW_ADDR_T_SAN if LLD supports it or it
is just the netdev->dev_addr if it does not.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Yi Zou authored and James Bottomley committed Dec 4, 2009
1 parent 5bab87e commit 75ea89e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,10 @@ static int fcoe_netdev_config(struct fc_lport *lport, struct net_device *netdev)
setup_timer(&port->timer, fcoe_queue_timer, (unsigned long)lport);

if (!lport->vport) {
wwnn = fcoe_wwn_from_mac(netdev->dev_addr, 1, 0);
wwnn = fcoe_wwn_from_mac(fcoe->ctlr.ctl_src_addr, 1, 0);
fc_set_wwnn(lport, wwnn);
/* XXX - 3rd arg needs to be vlan id */
wwpn = fcoe_wwn_from_mac(netdev->dev_addr, 2, 0);
wwpn = fcoe_wwn_from_mac(fcoe->ctlr.ctl_src_addr, 2, 0);
fc_set_wwpn(lport, wwpn);
}

Expand Down

0 comments on commit 75ea89e

Please sign in to comment.