aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Love <robert.w.love@intel.com>2013-03-25 14:00:26 -0400
committerRobert Love <robert.w.love@intel.com>2013-03-25 15:19:15 -0400
commit01bdcb626f80838f55ec2af993daef50b9c59c49 (patch)
tree745c7ca9d9fe3599b626d0ea570f8fbe9024c914
parent8bb9660418e05bb1845ac1a2428444d78e322cc7 (diff)
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 <robert.w.love@intel.com> Acked-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 2daf4b0da434..cc4791cf575b 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -2133,6 +2133,7 @@ static int _bnx2fc_create(struct net_device *netdev,
2133 } 2133 }
2134 2134
2135 ctlr = bnx2fc_to_ctlr(interface); 2135 ctlr = bnx2fc_to_ctlr(interface);
2136 cdev = fcoe_ctlr_to_ctlr_dev(ctlr);
2136 interface->vlan_id = vlan_id; 2137 interface->vlan_id = vlan_id;
2137 2138
2138 interface->timer_work_queue = 2139 interface->timer_work_queue =
@@ -2143,7 +2144,7 @@ static int _bnx2fc_create(struct net_device *netdev,
2143 goto ifput_err; 2144 goto ifput_err;
2144 } 2145 }
2145 2146
2146 lport = bnx2fc_if_create(interface, &interface->hba->pcidev->dev, 0); 2147 lport = bnx2fc_if_create(interface, &cdev->dev, 0);
2147 if (!lport) { 2148 if (!lport) {
2148 printk(KERN_ERR PFX "Failed to create interface (%s)\n", 2149 printk(KERN_ERR PFX "Failed to create interface (%s)\n",
2149 netdev->name); 2150 netdev->name);
@@ -2159,8 +2160,6 @@ static int _bnx2fc_create(struct net_device *netdev,
2159 /* Make this master N_port */ 2160 /* Make this master N_port */
2160 ctlr->lp = lport; 2161 ctlr->lp = lport;
2161 2162
2162 cdev = fcoe_ctlr_to_ctlr_dev(ctlr);
2163
2164 if (link_state == BNX2FC_CREATE_LINK_UP) 2163 if (link_state == BNX2FC_CREATE_LINK_UP)
2165 cdev->enabled = FCOE_CTLR_ENABLED; 2164 cdev->enabled = FCOE_CTLR_ENABLED;
2166 else 2165 else