aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe.c
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2009-11-03 11:49:43 -0800
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 12:01:22 -0600
commit5bab87e6d465d54a2b5899e0f583d42f00dbee2e (patch)
tree77a7efbf8165b0eff95cee4ba795ab35598cb97a /drivers/scsi/fcoe/fcoe.c
parentbf361707c81f8e8e43e332bfc8838bae76ae021a (diff)
downloadkernel_samsung_tuna-5bab87e6d465d54a2b5899e0f583d42f00dbee2e.zip
kernel_samsung_tuna-5bab87e6d465d54a2b5899e0f583d42f00dbee2e.tar.gz
kernel_samsung_tuna-5bab87e6d465d54a2b5899e0f583d42f00dbee2e.tar.bz2
[SCSI] fcoe: Fix getting san mac for VLAN interface
Make sure we are get the SAN MAC address from the real netdev if the input netdev is a VLAN device. 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>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.c')
-rw-r--r--drivers/scsi/fcoe/fcoe.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 2274fcd..c1fd756 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -249,6 +249,7 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe,
{
struct fcoe_ctlr *fip = &fcoe->ctlr;
struct netdev_hw_addr *ha;
+ struct net_device *real_dev;
u8 flogi_maddr[ETH_ALEN];
const struct net_device_ops *ops;
@@ -272,8 +273,10 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe,
/* look for SAN MAC address, if multiple SAN MACs exist, only
* use the first one for SPMA */
+ real_dev = (netdev->priv_flags & IFF_802_1Q_VLAN) ?
+ vlan_dev_real_dev(netdev) : netdev;
rcu_read_lock();
- for_each_dev_addr(netdev, ha) {
+ for_each_dev_addr(real_dev, ha) {
if ((ha->type == NETDEV_HW_ADDR_T_SAN) &&
(is_valid_ether_addr(ha->addr))) {
memcpy(fip->ctl_src_addr, ha->addr, ETH_ALEN);