On 09/30/2009 04:04 PM, Joe Eykholt wrote:
Mike Christie wrote:
On 09/30/2009 01:36 PM, Mike Christie wrote:

Actually, I think I messed up on fcoe in RHEL 5.x. It looks like enic
uses SET_NETDEV_DEV like it should and other drivers do. In RHEL 5 that
sets the the pci device to netdev->class_dev.dev. For fcoe then I should
pass scsi_add_host netdev->class_dev.dev.


Yeah, fcoe is definately busted in RHEL 5. Here is a patch that fixes it.


There's another place in that file that refers to class_dev.dev->parent
to find the module owner. I think that should change too.


You are right. Here is a patch that fixes both.
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index faa9ddf..53a4bbc 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -566,7 +566,7 @@ static int fcoe_if_create(struct net_device *netdev)
        dev_add_pack(&fc->fip_packet_type);
 
        /* configure lport scsi host properties */
-       rc = fcoe_shost_config(lp, shost, netdev->class_dev.dev->parent);
+       rc = fcoe_shost_config(lp, shost, netdev->class_dev.dev);
        if (rc) {
                FCOE_NETDEV_DBG(netdev, "Could not configure shost for the "
                                "interface\n");
@@ -1487,7 +1487,7 @@ fcoe_netdev_to_module_owner(const struct net_device 
*netdev)
        if (!netdev)
                return NULL;
 
-       dev = netdev->class_dev.dev->parent;
+       dev = netdev->class_dev.dev;
        if (!dev)
                return NULL;
 
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to