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:53:51 -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.

    Sorry, I had an out of date cvsup and hadn't received ichwd yet.

    You're always going to be a child of nexus, and since I assume from
    the comment that there can only ever be one child. Also, why do you
    find_child w/ unit number 0, but then add a child with unit -1? Why
    not add it unit 0, and make it fail if that already exists?

    Also, it seems to me that if dev already exists, that you shouldn't
    reset the driver and desc. This should be harmless, but if for some
    reason you are called on an attached device, it could cause problems.

    -- 
      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"

    Relevant Pages