Skip to content

Commit 01bdcb6

Browse files
author
Robert Love
committed
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: Robert Love <[email protected]> Acked-by: Bhanu Prakash Gollapudi <[email protected]>
1 parent 8bb9660 commit 01bdcb6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/scsi/bnx2fc/bnx2fc_fcoe.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,6 +2133,7 @@ static int _bnx2fc_create(struct net_device *netdev,
21332133
}
21342134

21352135
ctlr = bnx2fc_to_ctlr(interface);
2136+
cdev = fcoe_ctlr_to_ctlr_dev(ctlr);
21362137
interface->vlan_id = vlan_id;
21372138

21382139
interface->timer_work_queue =
@@ -2143,7 +2144,7 @@ static int _bnx2fc_create(struct net_device *netdev,
21432144
goto ifput_err;
21442145
}
21452146

2146-
lport = bnx2fc_if_create(interface, &interface->hba->pcidev->dev, 0);
2147+
lport = bnx2fc_if_create(interface, &cdev->dev, 0);
21472148
if (!lport) {
21482149
printk(KERN_ERR PFX "Failed to create interface (%s)\n",
21492150
netdev->name);
@@ -2159,8 +2160,6 @@ static int _bnx2fc_create(struct net_device *netdev,
21592160
/* Make this master N_port */
21602161
ctlr->lp = lport;
21612162

2162-
cdev = fcoe_ctlr_to_ctlr_dev(ctlr);
2163-
21642163
if (link_state == BNX2FC_CREATE_LINK_UP)
21652164
cdev->enabled = FCOE_CTLR_ENABLED;
21662165
else

0 commit comments

Comments
 (0)