Re: newbus flaw
From: John-Mark Gurney (gurney_j_at_efn.org)
Date: 05/12/04
- Previous message: Dag-Erling Smørgrav: "Re: newbus flaw"
- In reply to: Dag-Erling Smørgrav: "Re: newbus flaw"
- Next in thread: Dag-Erling Smørgrav: "Re: newbus flaw"
- Reply: Dag-Erling Smørgrav: "Re: newbus flaw"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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"
- Previous message: Dag-Erling Smørgrav: "Re: newbus flaw"
- In reply to: Dag-Erling Smørgrav: "Re: newbus flaw"
- Next in thread: Dag-Erling Smørgrav: "Re: newbus flaw"
- Reply: Dag-Erling Smørgrav: "Re: newbus flaw"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Thread question
... Any threads that are started by the main thread can start child ... >>#2
is incorrect. ... >>continue to execute. ... (comp.lang.java.programmer) - Re: newbus flaw
... John-Mark Gurney writes: ... > You are incorrect in assuming you can't
find out if another child already ... Usually this is a problem of properly allocating resources
so ... > that you know the other child exists. ... (freebsd-arch) - Re: defunct processes dont always go away when parent does waitpid(-1)
... > Rob Y wrote: ... >> should clean them all up, ... it
takes only one child. ... That would be incorrect. ... (comp.unix.aix) - Re: unix pipe problems
... > '&buffer' is incorrect. ... > You never initialized 'wordsize'
in the child. ... that the child process finishes before the parent can ever send
... (comp.unix.programmer) - Re: children not getting eof from pipe
... > The value of $read here is incorrect except for the last child. ...
> children are reading from the same pipe, ... Prev by Date: ... (comp.lang.perl.misc)