DragonFly kernel List (threaded) for 2007-05
DragonFly BSD
DragonFly kernel List (threaded) for 2007-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Crash while iterating over devices and resource


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 5 May 2007 09:58:02 -0700 (PDT)

    One other thing I noticed with BUS_GET_RESOURCE_LIST is that those few
    drivers which implement it do recurse up one level.  So, for example,
    ndis/if_ndis_pci.c calls BUS_GET_RESOURCE_LIST() expecting to get
    the resources from the pci bus device.  The method is really only used
    for PCI busses.

    I'm not sure resources can be properly iterated using that DEVMETHOD,
    even with the changes made to the default.  By definition the
    implementation is picking up the resources from a parent device,
    not the device the method is being called on.

    The whole thing is a real mess.  The original implementation never
    separated child functions from parent functions in the DEVMETHOD
    namespace so some DEVMETHODs take the parent device as an argument
    and some don't.  Yuch.

						-Matt




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]