[lkml]   [2010]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 27/30] staging/vme: rework the bus model
    On Wed, Oct 27, 2010 at 10:16:21 +0100, Martyn Welch wrote:
    > On 26/10/10 02:02, Emilio G. Cota wrote:
    > > On Mon, Oct 25, 2010 at 12:24:38 +0100, Martyn Welch wrote:
    > >> On 23/10/10 00:27, Emilio G. Cota wrote:
    > >>>> * installing drivers even before the bridges they need are present
    > >>>> seems counter-intuitive and wrong.
    > >>
    > >> There are plenty of instances where a driver can be loaded before the
    > >> bus is probed or a device is even present. When the bus become
    > >> available, the probe routine will be run.
    > >
    > > That would be acceptable if and only if no other alternative was available.
    > >
    > > It doesn't make any sense to constrain ourselves to installing
    > > drivers only BEFORE loading bridge drivers.
    > >
    > I have no idea what your doing, but that simply isn't the case. Your
    > right - that really would not make any sense, however I'm happily
    > loading the bridge drivers before any VME device drivers here.

    /me scratches his head and goes back the code again.

    I see, so after calling driver_register() the core will initiate
    the binding--I was wrongly thinking that binding would only happen
    after registering a device with device_register().

    In fact I claimed this from what I remembered from the code. But
    this was months ago, and my memory is highly unreliable.
    Sorry about that :(

    However I just remembered something, related to the unique slot
    numbers. Let me know if this is correct or not, but in fact
    I think this is what triggered me to write a new model.

    Imagine the following situation:

    - insmod vme_driver1.ko bus=0,0,0 slot=1,2,3

    Then two days after I want to install another driver:

    - insmod vme_driver2.ko bus=0,0,0 slot=X,Y,Z

    Now X,Y,Z cannot be in (1,2,3), because those are understood
    as physical slots, even if they're not (this is not VME64x)

    So, anytime I need to install a device, I must know the slot
    numbers of all other devices--even though there's no
    physical meaning to it!

    In the model I proposed device id's ("slots") are unique
    to each driver.

    Does this make sense?



     \ /
      Last update: 2010-10-27 17:43    [W:0.021 / U:0.308 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site