Commit 01bdcb62 authored by Robert Love's avatar Robert Love

bnx2fc: Make the fcoe_cltr the SCSI host parent

The fcoemon userspace daemon is searching for the a hostX
under the the /sys/bus/fcoe/devices/ctlrX/ entries. When
interfaces created using fcoe_sysfs and fcoe.ko this linkage
is setup correctly, but bnx2fc is not doing the same thing
and therefore fcoemon does not create the fcoe interface
for bnx2fc.

This patch sets up the correct linkage for bnx2fc such that
fcoemon will work correctly with fcoe_sysfs and bnx2fc.
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Acked-by: default avatarBhanu Prakash Gollapudi <bprakash@broadcom.com>
parent 8bb96604
......@@ -2133,6 +2133,7 @@ static int _bnx2fc_create(struct net_device *netdev,
}
ctlr = bnx2fc_to_ctlr(interface);
cdev = fcoe_ctlr_to_ctlr_dev(ctlr);
interface->vlan_id = vlan_id;
interface->timer_work_queue =
......@@ -2143,7 +2144,7 @@ static int _bnx2fc_create(struct net_device *netdev,
goto ifput_err;
}
lport = bnx2fc_if_create(interface, &interface->hba->pcidev->dev, 0);
lport = bnx2fc_if_create(interface, &cdev->dev, 0);
if (!lport) {
printk(KERN_ERR PFX "Failed to create interface (%s)\n",
netdev->name);
......@@ -2159,8 +2160,6 @@ static int _bnx2fc_create(struct net_device *netdev,
/* Make this master N_port */
ctlr->lp = lport;
cdev = fcoe_ctlr_to_ctlr_dev(ctlr);
if (link_state == BNX2FC_CREATE_LINK_UP)
cdev->enabled = FCOE_CTLR_ENABLED;
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment