Skip to content

Commit

Permalink
bnx2fc: Make the fcoe_cltr the SCSI host parent
Browse files Browse the repository at this point in the history
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: Robert Love <[email protected]>
Acked-by: Bhanu Prakash Gollapudi <[email protected]>
  • Loading branch information
Robert Love committed Mar 25, 2013
1 parent 8bb9660 commit 01bdcb6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/scsi/bnx2fc/bnx2fc_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit 01bdcb6

Please sign in to comment.