lkml.org 
[lkml]   [2003]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectkobject_init() sets kobj->subsys wrong?
Date
Pat, I need your help tracking this one down... :-)

Your recent patch creating find_bus("scsi") always returns NULL. I see
that's because bus_subsys.list is empty. Now, why is it empty, when the
SCSI driver did a bus_register()? It comes down to the code in
kobject_add(), where struct subsystem *s = kobj->subsys == NULL, thus the
list_add_tail code never gets called in there.

The calls go something like this:

scsi_sysfs_register()
bus_register(&scsi_bus_type)
subsystem_register(scsi_bus_type->subsys)
subsystem_init()
kobject_init() sets kobj->subsys = subsys_get(kobj->subsys) which
seems wrong
kobject_register()
kobject_add() where kobject->subsys is NULL

Strange, but true, and it may be kobject_init() that's borked setting
kobj->subsys.

Please advise.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer, Architect
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.065 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site