Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Dec 1999 17:57:07 -0700
From:      Warner Losh <imp@village.org>
To:        Mike Smith <msmith@FreeBSD.ORG>
Cc:        nate@mt.sri.com (Nate Williams), mobile@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/pccard pccard.c src/sys/isa sio.c src/sys/dev/ed if_ed_pccard.c src/sys/dev/ep if_ep_pccard.c 
Message-ID:  <199912020057.RAA05497@harmony.village.org>
In-Reply-To: Your message of "Wed, 01 Dec 1999 16:44:49 PST." <199912020044.QAA03272@mass.cdrom.com> 
References:  <199912020044.QAA03272@mass.cdrom.com>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199912020044.QAA03272@mass.cdrom.com> Mike Smith writes:
: > > In the old old code this only 
: > > worked because the pcic interrupt handler wasn't masked, so the detach 
: > > routine could preempt the device interrupt handler and set the gone flag.
: > 
: > Do you have a better solution than this?  This was the 'most' correct
: > solution I could come up with.  (I'd love to hear about a better
: > solution than this).
: 
: I've already proposed it; a bus method that a child can use to verify via 
: a hardware accessor in the parent bus that the hardware it "owns" is 
: still physically present.

The problem with this is that the device is gone.  The child is
detached and therefore can't be used to call a bus method unless the
child driver caches a pointer to its parent.

: > The only other solution I could envision was one involving re-writing
: > all of the drivers to modify them so they would have timeouts reading
: > hardware (difficult and time consuming), but this wouldn't work in
: > newbus due to softc going away. :(
: 
: Again, the softc _can't_ go away until the driver lets it.  The driver 
: shouldn't let it until it's finished with it.  End of story.

Agreed.  However, the only way that it can do this currently is to
block in detach until all references to softc have gone out of scope.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912020057.RAA05497>