Re: newbus flaw

From: John-Mark Gurney (gurney_j_at_efn.org)
Date: 05/12/04

  • Next message: Dag-Erling Smørgrav: "Re: newbus flaw"
    Date: Wed, 12 May 2004 10:41:48 -0700
    To: Dag-Erling Smørgrav <des@des.no>
    
    

    Dag-Erling Smørgrav wrote this message on Wed, May 12, 2004 at 15:26 +0200:
    > John-Mark Gurney <gurney_j@efn.org> writes:
    > > You are incorrect in assuming you can't find out if another child already
    > > exists.. Usually this is a problem of properly allocating resources so
    > > that you know the other child exists. Since you are using identify, you
    > > already don't have a "self describing" bus, which means that you have
    > > to either use hints, or another method to make sure that your device
    > > doesn't already exist.
    >
    > It's not quite that simple. See the block comment at the top of
    > src/sys/dev/ichwd/ichwd.c for an explanation.

    I couldn't find ichwd, but I could find ichsmb?

    In ichsmb.c, doing the device_add_child in _probe is not correct. It
    should be done at attach time, and removed at detach time. The probe
    maybe be called multiple times.

    As far as the assumption of only one process calling methods, I would
    enforce it by making sure that once a device is attached, any other
    attempts to attach fail.. That should also solve the problem.

    -- 
      John-Mark Gurney				Voice: +1 415 225 5579
         "All that I will do, has been done, All that I have, has not."
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Dag-Erling Smørgrav: "Re: newbus flaw"