Re: newbus flaw
From: Doug Rabson (dfr_at_nlsystems.com)
Date: 05/13/04
- Previous message: Michael Bushkov: "Re: IPC nsswitch implementation (fwd)"
- 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 ]
To: des@des.no (Dag-Erling Smørgrav) Date: Thu, 13 May 2004 09:27:01 +0100
On Wednesday 12 May 2004 21:30, Dag-Erling Smørgrav wrote:
> John-Mark Gurney <gurney_j@efn.org> writes:
> > 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?
>
> just didn't think about it. the documentation is somewhat lacking,
> so some of the code is based on examining existing code and headers
> and guessing at what it all means.
>
> > 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.
>
> it'll all go pear-shaped if you don't. if an ichwd device already
> exists, it is a leftover from a previous module load / unload cycle
> and the driver_t it references no longer exists. ichwd_identify()
> should probably KASSERT that the device it finds isn't attached - I'm
> pretty sure it can't happen.
When the old module unloaded, its driver will have detached from the
device which it created. There is no reference to an old driver_t. Its
perfectly safe for the new driver to use the old device.
_______________________________________________
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: Michael Bushkov: "Re: IPC nsswitch implementation (fwd)"
- 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: global data via module howto
... : M. Warner Losh wrote: ... In common case we have a driver for "bus":
... : If child could work on several buses it declares itself several times: one for each
... (freebsd-hackers) - Re: global data via module howto
... In common case we have a driver for "bus" ... If child could work
on several buses it declares itself several times ... In common case I'll put DRIVER_MODULE
in a child ... (freebsd-hackers) - Re: Drugged drivers.
... Doug either doesn't know anything ... > bit of a bad idea to solely blame
the driver. ... >>> involve some loss of memory, particularly in a child,
something you ... I brought it up in response to someone else mentioning they had ...
(uk.transport) - Re: The Speed Trap - BBC1 Scotland
... >> Where the driver has not, by their own actions, caused the accident, ...
OK, very slowly now, the speed of the car did ... not cause the child to run into
the street. ... >> some drivers,this is a road where people follow the highway code
and ... (uk.rec.cycling) - Re: The Speed Trap - BBC1 Scotland
... > Marz wrote: ... Where the driver has not, by their own actions,
caused the accident, ... The speed of the vehicle dictates how much reaction time there
could be ... point of view of a parent and child at school, ... (uk.rec.cycling)