From: Yi Zou Date: Thu, 30 Jul 2009 00:03:50 +0000 (-0700) Subject: [SCSI] fcoe: Fix validation of mac address when checking for spma support X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a7f0c7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [SCSI] fcoe: Fix validation of mac address when checking for spma support Fix this bug of validating the wrong mac address while checking for SAN MAC address support from LLD as we should check ha->addr not ctlr.ctl_src_addr. Signed-off-by: Yi Zou Signed-off-by: Robert Love Signed-off-by: James Bottomley Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 0a5609bb5817..b7dfc6ebed36 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -329,7 +329,7 @@ static int fcoe_netdev_config(struct fc_lport *lp, struct net_device *netdev) rcu_read_lock(); for_each_dev_addr(netdev, ha) { if ((ha->type == NETDEV_HW_ADDR_T_SAN) && - (is_valid_ether_addr(fc->ctlr.ctl_src_addr))) { + (is_valid_ether_addr(ha->addr))) { memcpy(fc->ctlr.ctl_src_addr, ha->addr, ETH_ALEN); fc->ctlr.spma = 1; break;